Region ccm overflowed by 4 bytes

Discussion related to "under the hood" OpenMV topics.
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Region ccm overflowed by 4 bytes

Postby deshipu » Wed May 18, 2016 12:47 pm

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?
User avatar
iabdalkader
Posts: 1245
Joined: Sun May 24, 2015 3:53 pm

Re: Region ccm overflowed by 4 bytes

Postby iabdalkader » Wed May 18, 2016 12:56 pm

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 */
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Region ccm overflowed by 4 bytes

Postby deshipu » Wed May 18, 2016 3:08 pm

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.
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Region ccm overflowed by 4 bytes

Postby deshipu » Wed May 18, 2016 3:28 pm

Tested on the one with the old sensor (from the fire sale), and I get the same error.
User avatar
iabdalkader
Posts: 1245
Joined: Sun May 24, 2015 3:53 pm

Re: Region ccm overflowed by 4 bytes

Postby iabdalkader » Wed May 18, 2016 3:48 pm

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.
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Region ccm overflowed by 4 bytes

Postby deshipu » Wed May 18, 2016 3:53 pm

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.
User avatar
iabdalkader
Posts: 1245
Joined: Sun May 24, 2015 3:53 pm

Re: Region ccm overflowed by 4 bytes

Postby iabdalkader » Wed May 18, 2016 3:58 pm

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 ?
Attachments
OPENMV2.zip
development firmware images
(1.29 MiB) Downloaded 161 times
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Region ccm overflowed by 4 bytes

Postby deshipu » Wed May 18, 2016 4:03 pm

That works. I guess it's the environment then. I'm using whatever comes by default in Ubuntu...
User avatar
iabdalkader
Posts: 1245
Joined: Sun May 24, 2015 3:53 pm

Re: Region ccm overflowed by 4 bytes

Postby iabdalkader » Wed May 18, 2016 4:09 pm

FWIW I'm using

Code: Select all

gcc version 5.2.1 20151202 (release)
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Region ccm overflowed by 4 bytes

Postby deshipu » Wed May 18, 2016 4:12 pm

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.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests