This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Release mode does not work

Hi,

We are working NRF52832, SDK15.3. It works properly in debug mode but when I build in Release mode it is not working.

From my understanding debug mode will have symbols, so the code size should be larger.

But to my surprise when I compare the code size for Flash code size is more than Debug code size.

Debug code Hex size:  288KB

Release Mode code Hex file size: 388KB

Please help me to understand the difference in the Hex file code generated.

Parents
  • Hex files cannot contain debug symbols.  These can be found in the elf file.

    Which optimization is enabled in release mode? GCC "-O3" unrolls loops.

    I recommend looking at the map file for actual flash (and other address space) usage.

  • I have the same problem here.  The release version take significantly more Flash and and Ram memory and won't run.  The Debug version run fine.    

    I have plenty of Flash space left but Ram goes from 8.6 k to 2.6k left of 64 kb (nrf52832) when I set Release mode.  I suspect that there might be a conflict with Ram allocation, that prevent the program to run but I am not sure if I am wright and also what is the remedy.  

    What are the  optimisation parameters in SES ?  In release mode, the options for code generation is already set to : optimize for  size.  What else can I play with ?

    For now, I will use the Debug version with NRF_LOG_ENABLE and NRF_LOG_BACKEND_RTT_ENABLED  disable. My program will run on a battery powered nrf52832 module and use ESB communication/DFU.

  • Hi, please open your *emProject in a text editor to try and see if you can spot other configuration differences between "Release" and "Debug".  The Release configuration should obviously have consumed less memory.

Reply Children
No Data
Related