RAM and FLASH Consumption

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RAM and FLASH Consumption

3,822件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zeal007 on Thu Jul 08 00:24:15 MST 2010
[B]i am just a new user to this IDE. i just want to know and view the RAM and FLASH consumption of my projects. where can i view it??? thank you...:)[/B]
0 件の賞賛
返信
14 返答(返信)

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 13 03:30:31 MST 2010
A link map provides information about the link, including the following:           
[LIST]
[*]Where object files are mapped into memory.
[*]How common symbols are allocated.
[*]All archive members included in the link, with a mention of the  symbol which caused the archive member to be brought in.
[*]The values assigned to symbols.
[/LIST]
The layout of your image in memory is controlled via a linker script. By default this is automatically generated by LPCXPresso IDE, based on its built in knowledge of the MCU you are using (for example - it knows the address and sizes of your Flash and RAM). This is known as a managed linker script.

If you want to take closer control of where the linker places code and data in  memory, then you can use your own linker script instead of the managed linker script. Details of how to do this can be found in the knowledgebase entry...

Using your own linker scripts
http://lpcxpresso.code-red-tech.com/LPCXpresso/node/31
[login required]

Regards,
CodeRedSupport
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zeal007 on Tue Jul 13 02:55:07 MST 2010
hmmm... can i ask some help!

i just want to learn how to understand or read the 'filename.map', because i want to know how was the memory configuration done... may i know how is it? ? ?
thanks...
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun Jul 11 23:10:57 MST 2010
The hint is in the headings
Text data bss dec hex...
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zeal007 on Sun Jul 11 18:20:40 MST 2010
thanks sir...

one last, hehehe... are the values of 'text', 'data', and 'bss' in hex?
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by KaraMuraT on Fri Jul 09 04:30:06 MST 2010
Thanks for explanation.

OK, I've realized that I misunderstood something. It's not 2.8K for release, just 1428 for text + 4 for data. And it's a fair 1.4K for the things you've mentioned.
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jul 09 03:54:12 MST 2010
See earlier posting about what text, data and bss are. They are standard names in 32-bit code.

Blinky is really a template application that shows how a number of things are setup and although it is "only" blinking and LED, it also:
- sets up the chip, initialises the clock etc
- defines all the interrupt handlers and provides basic handlers for the various fault types
- creates a timer and blinks the LED based on the value

Don't forget you are also looking at the Debug build. The Release build is roughly half the size.

If you did nothing but blink the LED out of reset, and dispensed with everything else (vectors, data/bss initializations, clock setup etc etc) you can probably do it in <50 bytes - but I haven't tried.
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jul 09 03:42:25 MST 2010
"text" is code and is normally placed into Flash
"data" is data. This is placed into Flash AND RAM. This is because any initialized data  has to be kept in flash and then used to initialize the RAM at boot time
"bss" is zero initialized data and placed into RAM.

These are pretty standard names in any 32-bit application
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by KaraMuraT on Fri Jul 09 01:20:01 MST 2010
I'm still a bit ignorant about the ARM development, so my question could be funny

What is the "text" parameter? I'm a professional PIC developer and know every bit of a project. But I never faced a parameter like "text"? Why there is something like this, which only blinks a LED? And why we have to use that much flash for a simple purpose?

Here is the LPCXPresso1343_blinky project Release output:

text       data        bss        dec        hex    filename
1428          4          8       1440        5a0    LPCXpresso1343_blinky.axf
2.8K flash for a blinking LED?
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zeal007 on Fri Jul 09 01:10:17 MST 2010
THANKS SIR...

but,
text data bss dec hex filename
7988 524 32 8544 2160 LPCXpresso1114_systick_twinkle.axf

are the values of the text, data and bss set as hex already or not?... and what is BSS?...
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jul 09 00:07:05 MST 2010
First of all, the data is not 'overwritten' in the console. There is a console for each build. So, if you select the first project again, it will show the build console for that project. Note that this doesn't apply if you shut down the IDE and start again.

There is also another way to show the size of a built application. In your built project, open the Binaries folder, and select the .axf file. Now Right-click and select Binary utilities->Size and it will show a dialog with the text (code), data and bss sizes of your application.
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by domen on Thu Jul 08 23:32:34 MST 2010
FLASH: text+data
RAM: data+bss
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zeal007 on Thu Jul 08 17:50:13 MST 2010
but after i clean then build, it shows something like this:

text data bss dec hex filename
244 0 0 244 f4 core_cm0.o (ex libCMSISv1p30_LPC11xx.a)
868 4 0 872 368 system_LPC11xx.o (ex libCMSISv1p30_LPC11xx.a)

then while building, the console will overwrite a new, it shows something like this:

text data bss dec hex filename
8008 524 32 8564 2174 LPCXpresso1114_systick_twinkle.axf

question: which is the RAM, and which is the Flash consumption there? how can i view the first one before it was overwritten(if that was usefull)?... and what is the unit(KB or bytes)?... ^_^
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jul 08 03:07:52 MST 2010
One additional thought - remember that the numbers displayed at the end of the build are just for your code and data. You will have additional RAM requirements for the stack (which grows down from the top of the RAM), and potentially the heap (which will grow up from the end of your data).

Regards,
CodeRedSupport.
0 件の賞賛
返信

3,791件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jul 08 02:11:24 MST 2010
After building your project, in the build console, the sizes of the various sections are displayed.
Note that Debug builds will be larger than Release builds.
Also note, that if your application exceeds the RAM or Flash size for the part, the linker will give an error.
0 件の賞賛
返信