Why STM32 add DEBUG preprocessor symbol after code generation with Device Configuration Tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8:29 AM
Hi!
I have tested this in all my projects.
I have several compilation flavours with several symbols but you can test this issue only with default flavours: Release and Debug.
- Delete DEBUG preprocessor symbol in Debug flavour
- Open device configuration tool
- Click code generation
- After that, DEBUG symbol is again added to Debug flavour.
This symbol is not used and isn't a problem but in my projects and flavours I want not this symbol because may be confused to others developers. I can solve it by creating flavours based in Release but I would like to know if there is any option to avoid this behaviour
Thanks!!
Solved! Go to Solution.
- Labels:
-
DEBUG
-
STM32CubeIDE
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8:43 AM
No option. Hardcoded behavior if debug type build configuration.
As workaround possibly remove original Debug configuration and create a new one based on Release type
Takes care starting from Release type, compiler optimizations are not debug compliant so you will have to set them to proper values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8:43 AM
No option. Hardcoded behavior if debug type build configuration.
As workaround possibly remove original Debug configuration and create a new one based on Release type
Takes care starting from Release type, compiler optimizations are not debug compliant so you will have to set them to proper values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8:48 AM
Thanks a lot!! I was going crazy... hahah
