RAM bytes consumption

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

RAM bytes consumption

1,175 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vasanth on Wed Jun 23 22:02:29 MST 2010
I am using LPC1343 lpcxpresso board. I recently updated to v3.3.4 of LPCXpresso IDE. After that all release builds or debug builds shows data value as 520 in the "data" field of the console view. I came to know through this forum that this "data" represents
RAM bytes consumed. I know my projects consume only few bytes of RAM. Even if i increase/decrease the variables the data field shows a constant value of 520. I build several of my other projects, surprisingly all shows the same 520. But the example projects like "blinky" has no such issue with it.
I don't know what causes this in my projects. Why the data field always shows number 520? How to make v3.3.4 to show the actual RAM bytes consumed? Can someone clear it?:confused:

Original Attachment has been moved to: 1100481_properSimple64byteHid.zip

0 Kudos
Reply
6 Replies

1,135 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jush on Fri Jul 09 01:29:46 MST 2010

Quote: vasanth
At last i figured it out myself. It is because of cr_startup_lpc13.c file. While creating new project using MCU project wizards, lpcxpresso creates a default startup file. But i replaced the startup file with the one from blinky project. !





What did you do? Could you share on us? Coz I have the same problem of yours abot the RAM consumption.

Thanks.
0 Kudos
Reply

1,135 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by domen on Mon Jun 28 23:30:00 MST 2010

Quote: vasanth
I don't know where and how to use "arm-none-eabi-nm -S --size-sort blah.axf" as suggested by domen. Should i add this to the linker script ? Please be clear on this.



Use it in a terminal.
0 Kudos
Reply

1,135 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vasanth on Mon Jun 28 22:00:58 MST 2010
At last i figured it out myself. It is because of cr_startup_lpc13.c file. While creating new project using MCU project wizards, lpcxpresso creates a default startup file. But i replaced the startup file with the one from blinky project. Now it's O.K. :)!!!
0 Kudos
Reply

1,135 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vasanth on Thu Jun 24 22:48:56 MST 2010
I gone through projectname.map file. It clearly shows a variable of __ctype from ctype.o is adding an additional 512 (0x204) to the data image. I am new to the gcc tools and ARM. I don't know where and how to use "arm-none-eabi-nm -S --size-sort blah.axf" as suggested by domen. Should i add this to the linker script ? Please be clear on this.
0 Kudos
Reply

1,135 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jun 24 01:18:51 MST 2010
I suspect that this is data related to the C library ctype / locale.

In addition to using    arm-none-eabi-nm as suggested by domen, you might want to look at the [I]projectname.map[/I] file that is created automatically in the Debug (or Release) directory when you build your project. This gives lots of useful information about what has actually gone into your image.

Regards,
CodeRedSupport.
0 Kudos
Reply

1,135 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by domen on Wed Jun 23 23:34:03 MST 2010
arm-none-eabi-nm -S --size-sort blah.axf

It should contain a hint at least. Often it's just some data that you could mark "const", and it'd then get moved to .rodata (flash). Or maybe it's some libc stuff.
0 Kudos
Reply