How to make debug build a OpenMV ?

If I make a build with DEBUG=1 then I have build errors:

c:/program files (x86)/gnu tools arm embedded/7 2017-q4-major/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: c:/Projects/TrueStudio/openmv2/src/…/firmware/OPENMV3/firmware.elf section ._stack' will not fit in region CCM’
c:/program files (x86)/gnu tools arm embedded/7 2017-q4-major/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: section .fb_memory VMA [20020000,2007ffff] overlaps section ._stack VMA [2001f5a8,200205a7]
c:/program files (x86)/gnu tools arm embedded/7 2017-q4-major/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: region `CCM’ overflowed by 1448 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [firmware] Error 1


if I do without debugging, then everything is fine

You’re on the M4 build. That barely fits in the chip. The error says the debug image doesn’t fit on the chip. So, there can be no debug build for that unless you shrink down things.

I’am on the M7 build (OPENMV3). I did reduce OMV_HEAP_SIZE 55K to 50K and maked a build is OK.

Yes, my goal is to remove everything that is unnecessary for me.