__no_init keyword replacement in CodeWarrior?

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

__no_init keyword replacement in CodeWarrior?

Jump to solution
818 Views
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

Labels (1)
1 Solution
556 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
557 Views
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!
-----------------------------------------------------------------------------------------------------------------------

556 Views
amit_dhand
Contributor III

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

0 Kudos
556 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Good to know. You are welcome!

Jennie

0 Kudos