- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi! I am new to Modus and psoc6.
I have a few questions about Release vs Debug builds.
1)
The Makefile CONFIG variable seems to be the way to build the project in Release or Debug mode.
The IDE build configuration does not seem to affect the actual code build.
IDE Debug build config -> builds with the CONFIG setting hard coded in Makefile
IDE Release build config -> builds with the CONFIG setting hard coded in Makefile.
In the Makefile, if I set CONFIG=Release, I see -DNDEBUG in my GCC build.
In the Makefile, if I set CONFIG=Debug, I see -DDEBUG in my GCC build.
This is the result I expect for a Debug vs Release build.
Changing the IDE build config does not give me the DEBUG/NDEBUG I expect.
Can anyone confirm this? What's the best way to accomplish this?
2)
Launch configurations are not behaving reliably either with specifying the hexfile path in project settings.
a) ${config_name:MyProject} -> always renders to Debug, despite IDE Build Configuration
b) Hard code ALL launches to load the Release hex file (the IDE generated all launches to load the Debug hex file)
With everything set to Release, Makefile and IDE, and my launch config, it still Error's out when it tries to program
Error: couldn't open /Users/mike/work/xxxx/yyyy/MyProject/build/CY8CPROTO-062-4343W/Debug/MyProject.hex
What is the proper way to manage which build configuration / hexfile that the launch will use?
Does IDE Build Configuration actually do anything?
I've also learned that IDE 'exclude files from build' does nothing, and I had to include/e
Thanks!
Solved! Go to Solution.
- Labels:
-
ModusToolbox General
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apologies for the delay in our response. I believe this thread was missed. Your observations are correct. The idea behind the design of ModusToolbox is to make it IDE agnostic which is the reason it is not tied to the Eclipse IDE build settings. All the build settings should be made in the makefile -
Please refer to Section 2.7.1 Use Eclipse IDE in ModusToolbox User Guide.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm seeing the same thing, even when I refresh launches or "make eclipse" per https://www.cypress.com/file/524836/download
It only builds the Debug version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see the same behavior. Can't get the build Config to change based on IDE setting.
@Infineon,
This looks like a bug in the IDE, can you confirm?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apologies for the delay in our response. I believe this thread was missed. Your observations are correct. The idea behind the design of ModusToolbox is to make it IDE agnostic which is the reason it is not tied to the Eclipse IDE build settings. All the build settings should be made in the makefile -
Please refer to Section 2.7.1 Use Eclipse IDE in ModusToolbox User Guide.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rakshith,
I did miss that in the documentation. It was not entirely intuitive since Modus does custom export the project to the Eclipse IDE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read that doc several times, and it's still confusing because the terms DEBUG and RELEASE are being used, but only by name, not by definition. If all the IDE menus are not useful, they should just be excluded in the MTB Eclipse distro. That said..
Do I understand correctly that the differences between DEBUG and RELEASE are only optimization, and are hardcoded in the nested makefiles of MTB?
Per 4.5.1.4, If a user want to have other differences between Debug and Release, like other compiler flags, include directories, #defines , etc could we define two directories CONFIG_DEBUG and CONFIG_RELEASE and then put a different makefile in each one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats a good concept. I am actually doing that for the linker scripts. I have different linker scripts in debug and release sub folders, and the makefile linker_script path has /$(CONFIG)/ in its path so it grabs the right one.
Specifying different app makefiles this way might be possible starting up higher in the BSP makefile, assuming CONFIG can be up-leveled there, since the BSP makefile has a build recipe search:
# Set the default build recipe for this board if not set by the user
include $(dir $(lastword $(MAKEFILE_LIST)))/locate_recipe.mk
...but I havent played with this yet.