Is memory in microcontroller organized as Segmented or Flat Model?
I would say it is organized as Flat Model. However, next thing confuse me. Linker creates segmentation parts inside memory (.bss, .text, .data) and reference variables inside this parts using offset address, which is similar to segmented model.
If a build chain builds a target consisting of segments of code (.text), read-only data, initialized data (.data) and uninitialized data (.bss) it is a piece of cake to merge them to a flat memory model. On the other hand, it is impossible to split up such conglomerate. As the parts of a build chain usually targeting multiple platforms, they try to keep the segmented architecture as long as possible in the building process.
Microprocessors in computers running on OS’s which employ sophisticated memory management.
In contrast, micro-controllers having a lot of peripheral capabilities and don’t need fences between processes.
Additionally, it depends on your micro-controller whether it follows the Harvard or vonNeumann architecture. With the vonNeumann architecture you have finally one, flat, single memory address space.