cancel
Showing results for 
Search instead for 
Did you mean: 

Where are the original files when generating with SoftwarePackage BLE2?

ANauz.1
Senior II

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:

  • STM32Cube_FW_L0_V1.12.0/Drivers/BSP/STM32L0XXNucleo is not the same file
  • In X-CUBE-BLE2\3.1.0\Drivers\BSP there is only a L4XX file
  • Same in X-CUBE-BLE2\3.1.0\Projects\STM32L476RG-Nucleo\Applications\SampleApp\Src

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

1 ACCEPTED SOLUTION

Accepted Solutions
Houda GHABRI
ST Employee

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

View solution in original post

3 REPLIES 3
ANauz.1
Senior II

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

ANauz.1
Senior II

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

Houda GHABRI
ST Employee

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