Region ccm overflowed by 4 bytes

After a long pause (got busy with other things, sorry), I tried to build the firmware to see all the progress that happened in the mean time. Unfortunately, I’m getting this error:

/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: /home/sheep/dev/3rdparty/openmv/src/../firmware/OPENMV2/firmware.elf section `._user_heap_stack' will not fit in region `CCM'
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: region `CCM' overflowed by 4 bytes
collect2: error: ld returned 1 exit status
Makefile:371: recipe for target 'firmware' failed
make: *** [firmware] Error 1

The setup is the same as I had previously with working firmware. I just did “git pull” in the main repository and in the “micropython” one. Then “make clean” and “make”. Are there any changes to the build process? Any ideas as to what I might be doing wrong? Did I skip an important step?

If you’re sure you have all the latest changes, the only other thing I could think of is the toolchain version, anyway an easy fix is to reduce the heap size:

_heap_size  = 0xD800;       /* required amount of heap */

_heap_size  = 0xD700;       /* required amount of heap */

Thank you, that let it compile.

However, when I flashed it, I got the dreaded:

Failed to init sensor, error:-2

in the


file, and of course I can’t connect to the camera with the IDE…

This is the one with the new sensor.

Tested on the one with the old sensor (from the fire sale), and I get the same error.

How to you upload the binary ?

We have a new CDC bootloader now, so there are 3 sets of firmware images:

  • bootloader.* (CDC bootloader images)
  • firmware.* (main application firmware images)
  • openmv.* (combined bootloader+firmware images)

After you build the images, you can upload any or all of them combined, however you should do a make flash_dfu or flash_bin to upload the combined image (openmv.dfu/bin).

The IDE uses the new CDC bootloader to update just the main fw image.

I first tried “make flash_dfu”, then “make flash_bin”, and then “make flash_boot” followed by “make flash_image” – all with the same result.

hmm, could you try the attached firmware images ? (1.29 MB)

That works. I guess it’s the environment then. I’m using whatever comes by default in Ubuntu…

FWIW I’m using

gcc version 5.2.1 20151202 (release)

Hmm, I have “arm-none-eabi-gcc (15:4.9.3+svn227297-1) 4.9.3 20150529 (prerelease)” – must be one of the things I installed for the Micro:Bit port of micropython.