Hello guys I was reading a C source and I found a notation like this:
__no_init __root extern volatile unsigned char var[10] @ 0x4000000;
But I’ve no idea what that __no_init __root means, is it standard C?
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
These are C language extensions used in some compilers targeting embedded systems (for example, IAR’s AVR compiler).
__no_initwould mean that the compiler should not initialize the variable, and would be used when a variable is placed at a hardware register location and you don’t want the start-up of the program to set the register to 0.__rootis used to tell the compiler/linker that the variable or function should be kept in the binary image even if it isn’t actually used in the program. This might be useful for debugging purposes and to ‘size’ a program while development is in progress.