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
Solved! Go to Solution.
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_INIT | 0x001000 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!
-----------------------------------------------------------------------------------------------------------------------
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_INIT | 0x001000 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!
-----------------------------------------------------------------------------------------------------------------------
Thank you Jennie!!! It works out like this.
Good to know. You are welcome!
Jennie