2023-09-01 08:55 AM
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 ?
2023-09-01 09:41 AM
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.
2023-09-01 09:43 AM - edited 2023-09-01 09:44 AM
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