No Init variables inside an user section(IAR)

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

No Init variables inside an user section(IAR)

2,033件の閲覧回数
sebasira
Senior Contributor I

Hello everybody!

I've learnt how to define a section and how to place variables inside it. Now I want a constant variable not to be initialized. I'm usign IAR workbench.

Rigth now, I'm doing as follow

#pragma location="MY_SECTION"

const int var1;

And var1 is indeed inside MY_SECTION wich is part of the PFLASH. But if I add the __no_init modifier, then var1 is placed in RAM... So my question is how can I put a variable inside MY_SECTION so it is not initialized?

Thank you!!!

SebaS

ラベル(1)
0 件の賞賛
0 返答(返信)