2021-02-09 01:52 AM
Hello,
I'm using CubeMX with X-CUBE-BLE2 3.1.0 Software Package to generate the SampleApplication
I am generating for my L073RZ-NucleoBoard.
The code generated work, but each time I generate, I have to make modification in the generated file Drivers/BSP/STM32L0xx_nucleo.c
So I would like to make the modification in the original file, but I could not find it:
So, either I am missing the correct location, or maybe MX is using a template, but where is it to modify it to generate the file with my modification
Thank you for your help
Solved! Go to Solution.
2021-02-12 02:46 AM
Hi @ANauz.1 ,
Sorry for the delay.
Indeed STM32CubeMX use a template file to generate the STM32L0xx_nucleo.c.
You can find it under CubeMX install folder: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\templates\bsp\bsp_common_c_BZ64601_79509.ftl .
Please be careful when modifying template files to avoid possible problems .
Hope my answer helps you, when your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster,
Houda
2021-02-09 06:05 AM
On example of my "problem"
When generating, in the file Drivers/BSP/STM32L0xx_Nucleo/STM32L0xx_nucleo.c, the function:
static void BUTTON_USER_GPIO_Init(void)
is empty. And I could not find any file in repository (neither FW_L0_V1.12.0, X-CUBE-BLE2 or any other) with this function empty.
What I do not understand is that, on the other hand, in the same file, the function:
static void BUTTON_USER_EXTI_Callback(void)
is not empty.
So which is the definition of BUTTON_USER_GPIO_Init that is used and inserted in my project?
Thanks
2021-02-10 01:11 AM
Ok....
I removed the repository directory of the BLE Package.
I removed the repository directory of the L0 MCU.
...And MX is still capable of generating the files. It must use a file that is in another directory! But I could not figured out which one!
Does anybody have an idea?
Thank you
Antoine
2021-02-12 02:46 AM
Hi @ANauz.1 ,
Sorry for the delay.
Indeed STM32CubeMX use a template file to generate the STM32L0xx_nucleo.c.
You can find it under CubeMX install folder: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\templates\bsp\bsp_common_c_BZ64601_79509.ftl .
Please be careful when modifying template files to avoid possible problems .
Hope my answer helps you, when your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster,
Houda