Skip to main content
Sidlauskas.David
Associate III
September 27, 2020
Solved

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

  • September 27, 2020
  • 2 replies
  • 1074 views

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

This topic has been closed for replies.
Best answer by TDK

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).

2 replies

TDK
TDKBest answer
September 27, 2020

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""."
Sidlauskas.David
Associate III
September 27, 2020

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