__no_init keyword replacement in CodeWarrior?

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

__no_init keyword replacement in CodeWarrior?

ソリューションへジャンプ
2,244件の閲覧回数
amit_dhand
Contributor III

Hello,

 

I would like to use __no_init for some variables in CodeWarrior. But unfortunately CodeWarrior doesn't support this keyword. So I would like to know if there is any replacement for this keyword in CodeWarrior.

 

I am using CodeWarrior 10.6 for mcu s12zvc.

 

Please support.

 

Thanks

Amit Dhand

ラベル(1)
タグ(3)
1 解決策
1,981件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

hi Amit Dhand,

I suggest you use NO_INIT qualifier to the RAM section that you don't want be initialized.

NO_INIT: used for address ranges where read/write accesses are allowed. The linker does not initialize memory area defined with this qualifier at application startup. This is useful if your target has a battery-buffered RAM or to speed up application startup.

For example:

SEGMENTS

NOINITRAM= NO_INIT0x001000 TO 0x0010FF;

...

the NOINITRAM section is NO_INIT memory area.  Variables allocated in this segment are not initialized at application startup.

I will attach a video for you which showcase how NO_INIT works.

can this help you?


Have a great day,
Zhang Jun

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

元の投稿で解決策を見る

3 返答(返信)
1,982件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

hi Amit Dhand,

I suggest you use NO_INIT qualifier to the RAM section that you don't want be initialized.

NO_INIT: used for address ranges where read/write accesses are allowed. The linker does not initialize memory area defined with this qualifier at application startup. This is useful if your target has a battery-buffered RAM or to speed up application startup.

For example:

SEGMENTS

NOINITRAM= NO_INIT0x001000 TO 0x0010FF;

...

the NOINITRAM section is NO_INIT memory area.  Variables allocated in this segment are not initialized at application startup.

I will attach a video for you which showcase how NO_INIT works.

can this help you?


Have a great day,
Zhang Jun

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

1,981件の閲覧回数
amit_dhand
Contributor III

Thank you Jennie!!!  It works out like this.

0 件の賞賛
返信
1,981件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Good to know. You are welcome!

Jennie

0 件の賞賛
返信