Page 1 of 1

Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 12:47 pm
by deshipu
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:

Code: Select all

/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?

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 12:56 pm
by iabdalkader
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:

Code: Select all

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

Code: Select all

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

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 3:08 pm
by deshipu
Thank you, that let it compile.

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

Code: Select all

FATAL ERROR:
Failed to init sensor, error:-2
in the

Code: Select all

ERROR.log
file, and of course I can't connect to the camera with the IDE...

This is the one with the new sensor.

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 3:28 pm
by deshipu
Tested on the one with the old sensor (from the fire sale), and I get the same error.

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 3:48 pm
by iabdalkader
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.

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 3:53 pm
by deshipu
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.

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 3:58 pm
by iabdalkader
deshipu wrote: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 ?

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 4:03 pm
by deshipu
That works. I guess it's the environment then. I'm using whatever comes by default in Ubuntu...

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 4:09 pm
by iabdalkader
FWIW I'm using

Code: Select all

gcc version 5.2.1 20151202 (release)

Re: Region ccm overflowed by 4 bytes

Posted: Wed May 18, 2016 4:12 pm
by deshipu
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.