cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox™ General

ms360
New Contributor

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!

1 Reply
Panometric
Contributor

I'm seeing the same thing, even when I refresh launches or "make eclipse" per https://www.cypress.com/file/524836/download

Panometric_0-1637801010028.png

It only builds the Debug version. 

0 Likes