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.

HI, Vig. what would u like to convey by the word FLASH in above figure.
ReplyDeleteHi,
ReplyDeleteSince i am writing about C for microcontroller programming, flash refer's to flash in that microcontroller.
Eg: LPC2148 has 512 kB of flash