Usage Flash and SRAM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-02-03 4:24 PM
Posted on February 04, 2016 at 01:24
Hello
I'm using the IAR compiler.As you know, I can get the usage of Flash and SRAM inside of ST32f429 from ''Map'' file.But I need to get those value on the my source code.Is there any solution to get usage when compile time.Here is my code but it didn't get right usage value.#pragma segment=''.text''#pragma segment=''.rodata''#pragma segment=''HEAP''VOID MakeFreeInfo(VOID){ unsigned int end_of_prog_text; unsigned int end_of_prog_rodata; unsigned int end_of_data; /* Get end of program address */ end_of_prog_rodata = ((U32) __sfe(''.rodata'') + 4) & 0xFFFFFFFC; end_of_prog_text = ((U32) __sfe(''.text'') + 4) & 0xFFFFFFFC; if (end_of_prog_rodata > end_of_prog_text) { USAGE_FLASH = end_of_prog_rodata - Addr_ROM; } else { USAGE_FLASH = end_of_prog_text - Addr_ROM; }...}Thank you,Young
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
