Memory full?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Memory full?

1,003 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wortel on Wed Feb 09 03:45:04 MST 2011
I've used the demo FreeRtOS and combined it with the i2c, spi, analog and UART demo's to get a working setup.
I do use the printf routine and retargeted it (done using the demo code) to output to the UART.

There arent any calculations yet done, only some small variables <20 bytes each for each demo to store some external data (gyro, accelero meter, temp).

Now I get this error message:

DescriptionResourcePathLocationType
make: *** [SimpleDemo.axf] Error 1SimpleDemoline 0C/C++ Problem
region MFlash32 overflowed by 192 bytesSimpleDemoline 0C/C++ Problem
SimpleDemo.axf section .data will not fit in region MFlash32SimpleDemoline 0C/C++ Problem

If I remove a single printf, the overflowed error indeed reduces. Does it mean that the memory is already full?  I almost can't believe it since I do not have that many things yet in my project.

Would an upgrade of red suite offer an solution?


The last time that it DID compile, this was my status:
   text   data    bss    dec    hexfilename
  31892    532   4552  36976   9070SimpleDemo.axf


From that I conclude that i used only 32k for code? and 6k for data? Far less than 128k I think...?
0 Kudos
Reply
3 Replies

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wortel on Wed Feb 09 07:03:16 MST 2011
Oh my!! I was sooo sure that I was having a 128k chip! But it is actually a 32k (LPC1751).

Owh, my bad... shame on me :$... thanks for the help!
0 Kudos
Reply

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Feb 09 04:51:53 MST 2011
If you are not trying to print out floating point values, then you can reduce the amount of space used by printf by defining the symbol [FONT=Courier New][SIZE=1]CR_INTEGER_PRINTF[/SIZE][/FONT] - see the section on "Reducing codesize of printf" in the FAQ at http://support.code-red-tech.com/CodeRedWiki/UsingPrintf for more details.

There is also more information on code and data sizes at:

http://support.code-red-tech.com/CodeRedWiki/FlashRamSize

Regards,
CodeRedSupport
0 Kudos
Reply

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Feb 09 04:33:54 MST 2011
You haven't said what your target is, but from the errors, I would assume that you are using one with only 32k of Flash. This error is reporting that you are trying to put more into flash than is available on the target device...

p.s. The amount of Flash used is text+data and the amount of RAM used is data+bss, plus whatever you use for stack and heap
0 Kudos
Reply