Unused RAM in a MAP file

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

Unused RAM in a MAP file

1,024 Views
almin_svraka
Contributor I

Hello,

 

Intro:

Unused RAM is named/identified as RAM_13 by a linker in a map file for release; however, with debug enabled the unused RAM is named RAM_18 and sometimes like RAM_any-number.


Question:

Is there any way to find how the name/identifier for an unused RAM is generated ?

I mean, I would like to have the same or to know the identifier of unused RAM for release and for development (debug) or how the identifier for unused RAM is generated.

In other words, is it possible to know the identifier of unused RAM before the build process ? 


I appreciate any help in this matter !

Software: CodeWarrior Development Studio for MC9S12ZVML

0 Kudos
5 Replies

895 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

symbol likes RAM_13 is toolchain produced mid-symbol which is used by obj file. I don't think we can get it before build.

if you want to know a memory section name, please define it manually for each section in prm file, 


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

895 Views
almin_svraka
Contributor I

Hello,

I thank you for your quick reply.

The question was.

Is it possible to have an identifier for unused RAM memory for RELEASE and the same identifier for DEBUG ?

Basically, the linker creates one identifier for unused RAM for RELEASE and one for DEBUG (they have different names ex. RAM_13 and RAM 18), and it is critical for my project that the identifier is identical for RELEASE and for DEBUG.

In addition, the size of unused RAM for release and for debug is different.

The idea is to have the same identifier for unused RAM for both: RELEASE and DEBUG (development).

I attached two images.

I appreciate any help ! 

Best Regards,

Almin Svraka

0 Kudos

895 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI,

This mid-symbol is controlled by toolchain inside, as I know, CW doesn't have user interface to change this mid-symbol.

Could you please share why the difference symbol name in release/debug mode cause you trouble?


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

895 Views
almin_svraka
Contributor I

Hello,

I have a function that runs periodically, and its main task is to scan unused RAM. The unused RAM in a build for release has RAM_18 identifier, so I can use it like (a snippet of code below) to test all unused memory locations between _START and _END (to know if anything changed or not during run-time).

#define UNUSEDRAM_START (__SEG_START_RAM_18)
#define UNUSEDRAM_END (__SEG_END_RAM_18)

When I change the build type from RELEASE to DEBUG the linker generates an identifier, RAM_13, in a map file for unused RAM.

When I change the build type from DEBUG to RELEASE the linker generates an identifier, RAM_18 or RAM_XX  (XX can be any number), in a map file for unused RAM.

Basically, the goal is to have a common identifier for unused RAM (like RAM_UNUSED) independent from the BUILD type and not to change the code every time the build type is changed.

Can you help with this ?

Best Regards,

Almin Svraka

0 Kudos

895 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I don't think you can get unused memory with mid-segment name like RAM_18.

We can get start/end used section name with __SEG_START_ and __SEG_END_, the segment followed with it must be defined by users. when you use __SEG_END_ get a used address, the following memory addresses are unused memory in this segment.

 

0 Kudos