In which section is constant volatile variable stored in c.? In micro-controllers we should put such kind of variables in RAM. Right?
In which section is constant volatile variable stored in c.? In micro-controllers we should
Share
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.
A
const volatilevariable means that your C program can’t legally change it, but something else can. It would be logical to place this variable in RAM, but the compiler won’t complain if you tell it (via a linker script or a similar option) to place in ROM. It may also be useful to locate this variable where some memory-mapped device is, e.g. a read-only timer counter register or an ADC output register.