Data segment in C is broadly classified in 4 sections: ".txt" , ".rodata" , ".bss" , ".data"
.rodata:The
.data:The compiler places initialized and uninitialized global variables in the .rodata
is also used for storing string constants and read only data's..data
section..bss: A separate section called
.bss
is used for uninitialized variables or temporary variable in stack.txt: Opcode i.e executable code is stored in this section.
Note:Flash content cannot be modified, it can only be erased and re-written hence code and constants are stored in flash while variables are stored in RAM.
0 comments:
Post a Comment