manage and remove DEBUG flags for FW in production stage

Dear Nordic,

I need to release to the production stage a FW developed. I have two separated project: one for the bootloader and one for the application.

The bootloader is compiled with DEBUG_NRF and NRF_DFU_DEBUG_VERSION defines setted.

The application package is made by this script: 

nrfutil.exe pkg generate ^
--debug-mode ^
--application "%cd%\_build\release\release.hex" ^
--application-version 0000 ^
--hw-version 52 ^
--sd-req 0x0126 ^
--key-file private.pem "\_output\release.zip"

In DEBUG stage all works fine, but now I need to remove it, but If I compile the bootloader without DEBUG_NRF and NRF_DFU_DEBUG_VERSION defines or if I pack the FW without --debug-mode option nothing works.

I tried some different configuration but I can't find the right way to solve this issue. please can you help me suggesting what I should do with DEBUG defines?

Thanks!

Related