|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Variable Zero InitializationInformation in this article applies to:
QUESTIONThe C51 User's Guide states that the file INIT.A51 initializes variables that were explicitly initialized in the 'C' source. Does it also initialize variables that are implicitly initialized to zero, or does it rely on the zeroing of memory in STARTUP.A51 to do this? Is there a difference in the following two statements, or are they identical?
ANSWERYes, the compiler relies on the zero initialization in the STARTUP file. For strict ANSI compliance, it is important that the settings match with your hardware. When you make explicit assignments such as:
the variables get set to zero by the INIT.A51 file. This behavior allows you to use non-volatile memory for variables. MORE INFORMATION
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.