cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Cube IDE Usage

waddy
Associate II

Hi. Just bought the book "DSP using Arm Cortex-M Based Microcontrollers". Supplied after a great deal of searching with shared online resources. I'm trying to create an STM32 project and drop in basic GPIO example source code from the online resources. Got the project created, configured the Discovery board (STM32F407G-DISC1) and generated the code (which for reasons known only to themselves, ATM have littered with unnecessary comments - which, annoyingly,  keep reappearing every time code is generated). How do I merge the generated code with the GPIO example code ? Can't seem to get it to run using this method. Also, how do I get rid of those unnecessary comments ?

2 REPLIES 2
TDK
Guru

If you want to use generated code from CubeMX, and you want the ability to regenerate it if you change settings, you live with the limitations of that process, which uses comments to denote sections of user code. User code sections are retained when the code is regenerated. All other sections are deleted/regenerated.

You can generate code once and change it however you want. Shouldn't need to regenerate code if you're just dropping in the GPIO example. Or if you want to write entirely your own code, you can do that.

If you feel a post has answered your question, please click "Accept as Solution".
Issamos
Lead II

Hello @waddy

I suggest you to open the gpio exemple that go with your board and than do all modifications you want in this code.

Best regards.

II