cancel
Showing results for 
Search instead for 
Did you mean: 

User code regions are not generated everywhere when generation is set to .c/.h pair

Despair1337
Associate III

Hello,

I found in CubeIDE awesome feature, where it generate peripheral initialization as pair of ".c/.h" files per peripheral. So far, it works perfectly, but I noticed, that I can't anymore define user-code in some functions. For example:

This is how FMC Init function looks like, when everything is in main.c

0693W000004KKpeQAG.pngBut when is code generated in separate .c / .h file, it doesn't have user-code regions:

0693W000004KKpjQAG.pngSo, where should I put my code now? I know that I can make my own functions in those files and call them from main.c, but having user-code regions would be most elegant solution. Also, the other functions like "HAL_SDRAM_MspInit" have user code regions. Any ideas?

Thanks.

EDIT: Also, fmc.c miss USER CODE 1 region :(

3 REPLIES 3
Khouloud ZEMMELI
ST Employee

Hello @Despair1337​ 

Thanks for your feedback,

Could you please share some details about the part number used and the CubeMX/CubeIDE version (or share your ioc file)?

Thanks

Khouloud

Hi @Khouloud ZEMMELI​ ,

It's STM32F429I-DISC1, CubeIDE version is 1.4.2, latest SDK for F4. I'm also attaching .ioc file.

Thanks

Issue reproduced @Despair1337​  and it will be fixed.

Thanks for bringing this to our attention.

Regards,

Khouloud