Is there any good way to allocate RAM address of global variables in .h(header file) in a coding-declared order?

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

Is there any good way to allocate RAM address of global variables in .h(header file) in a coding-declared order?

ソリューションへジャンプ
1,072件の閲覧回数
ikkishingu
Contributor II

Is there any good way to allocate RAM address of global variables in .h(header file) in a coding-declared order?

 

[background of this question]
My customer uses in-house RAM monitor tool to monitor RAM values.
Now they define the global variables in .h file, and build on CW10.6, and MAP file is generated.
Whenever they add global variables, RAM address of global variables is changed.
This bothers them because they have to change RAM address settings of RAM monitor tool every time they add global variables.
They expect RAM address of global variables are not changed by the addition of global variables.

 

Best,

Ikki

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
868件の閲覧回数
trytohelp
NXP Employee
NXP Employee

Hi Iki,

There are some possibilities you can use.

@keyword or #pragma can be used to do that.

for instance:

unsigned int fiboCount@0x002000;    /* define the fiboCount at 0x002000 */

#pragma DATA_SEG my_data_test        /* my_data_test is defined in the prm file which is using the RAM_TEST memory section */

unsigned int counter;

#pragma DATA_SEG DEFAULT_RAM

unsigned fib1, fib2, fibo;            /* the default memory is used */

Attached you will find an example.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
868件の閲覧回数
trytohelp
NXP Employee
NXP Employee

Hi,

What is the processor your customer is using ?


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
868件の閲覧回数
ikkishingu
Contributor II

Hi,

Thank you for your responce.

> What is the processor your customer is using ?

S12ZVM, MagniV.

Best

Ikki

0 件の賞賛
返信
869件の閲覧回数
trytohelp
NXP Employee
NXP Employee

Hi Iki,

There are some possibilities you can use.

@keyword or #pragma can be used to do that.

for instance:

unsigned int fiboCount@0x002000;    /* define the fiboCount at 0x002000 */

#pragma DATA_SEG my_data_test        /* my_data_test is defined in the prm file which is using the RAM_TEST memory section */

unsigned int counter;

#pragma DATA_SEG DEFAULT_RAM

unsigned fib1, fib2, fibo;            /* the default memory is used */

Attached you will find an example.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
868件の閲覧回数
ikkishingu
Contributor II

Hi Pascal,

Thank you for your helpful info!!

Ikki

0 件の賞賛
返信