Whilst working on my Embedded Systems Advanced OS coursework I ran into an issue whilst trying to define the location/size of my C heap and stack using the scatter-loading description file.

I kept getting the error
Execution region ARM_LIB_HEAP spans beyond 32 bit address space (base 0xc8804060, size 3380625504 bytes)

Turns out that I’d misunderstood how the EMPTY operator worked. I had:
ARM_LIB_HEAP 0xC8804060 EMPTY 0xC9804060
{
}

When in fact the EMPTY operator takes a size not an end location! Eventually I realised this and corrected it to

ARM_LIB_HEAP 0xC8804060 EMPTY 0x1000000
{
}

giving me my desired 16MB heap.

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>