Hello, I have been reading about the functioning of the assembler/linker and something is unclear to me - I don't understand the use of the .data section.
Assuming you're running a program without an OS, the program is saved to internal flash and run from there - there is nothing to pre-load values into SRAM. So what function does the .data section serve? Where/how is it used? Does the assembler write a separate initialization routine?
I understand its point if you have a separate OS or loader which loads the program into memory and populates SRAM but if your program is stand alone, how does it work?
Thank you.