Force to use register instead of ram memory

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

Force to use register instead of ram memory

ソリューションへジャンプ
1,503件の閲覧回数
jean-christoph7
Contributor III

Hello,

 

I've a function to test my ram a the begining of my software.

 

In this function, I fill whole the ram area with a pattern and I read the ram area to compare with the written pattern.

 

This function is written in C to be portable on other project.

 

This function uses 2 variables:

 

teStdReturnType MTST_TestRamIsOk(void)

{

 

teStdReturnType eReturn;

UINT32 u32Address;

..

return(eReturn);

}

 

Actually this function uses just registers, it is perfect because it doesn't use the ram memory.

 

But I need to be sure this function never use ram memory.

 

Is a directive or a command exist to force this function to use just registers ?

 

Thanks for your support.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,321件の閲覧回数
jean-christoph7
Contributor III
0 件の賞賛
返信
2 返答(返信)
1,321件の閲覧回数
TICS_Fiona
NXP Employee
NXP Employee

Hello jean-christophe

Please use 'register' to define the variable, like:

register UINT32 u32Address;

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,322件の閲覧回数
jean-christoph7
Contributor III

Thanks a lot!

0 件の賞賛
返信