cancel
Showing results for 
Search instead for 
Did you mean: 

Why is there significantly more flash usage in default debug configuration than in release?

Sidlauskas.David
Associate II

I've been playing around with a simple F103 project on CubeIDE and notice that the default debug configuration requires much more flash than the release, 31.64K vs. 15.25K. Why is this?

What is the difference in these configurations that creates this Flash difference? And in what file is the configuration stored?

Thanks for the help,

Dave

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

The Debug config is typically at a much lower optimization level. It may also include extra information to make debugging easier. The Release is typically much smaller and faster, but harder to debug.

You can see the options/flags used for each configuration in project properties (C/C++ Build -> Settings -> Tool Settings).

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

View solution in original post

2 REPLIES 2
TDK
Guru

The Debug config is typically at a much lower optimization level. It may also include extra information to make debugging easier. The Release is typically much smaller and faster, but harder to debug.

You can see the options/flags used for each configuration in project properties (C/C++ Build -> Settings -> Tool Settings).

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

Thanks TDK. It was the code optimization level that made the difference. None in debug and -Os in release.