Hello everybody! Please help with such a problem. I try to create a static array of 8-bit values, but when I launch the program, for some reason, irrespective of which values I write, after startup the array has all the values nothing, but zeros. Here is the code:
This is how I state the array:
int main(void) { static char string[10]={1,3,7,15,31,63,127,0,0,0}; ...
After the program is launched, I look at the memory and see that the array has all the values set to zero.
Please help!
Ok, will do. Thank you!
You'd want to review the scatter file or load regions, and how the startup.s is initializing the C runtime environment and statics, this is typically done by __main prior to calling your main() function.
Make sure do you don't have any NOINIT sections.
View all questions in Keil forum