We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have made a code where all the gloabl/static variables are declared like given an example below.
uint8_t x; uint8_t y;
void main() { x = 0; y = 0; }
None of global/static variables is defines as: uint8_t x = 5;
Abovee is just example, I have many variables are defined. All are assigned values on entering into main, none before that.
So all variables should go to bss section. But code build shows R/W section. It should be zero but it is not. Below is one example for same code:
1. Opt setting : No corss module, no microlib , level 0 code: 13774 RO data: 426 RW data: 68 ZI data: 19108
1. Opt setting : cross module, no microlib , level 3, optimize for time code: 7590 RO data: 426 RW data: 48 ZI data: 19104
In both setting there is R/W data even it should not be there. Why is that so
So did you then spend some quality time with the map file to figure out exactly what is stored in the R/W section?