Hi
We are leaving the area of menu programming, my knowledge is not that good here, but i do my best to answer this question.
a) .text: is said the Software Code without Variable (function, case, loop,setup, cicles etc etc) - Maximum
size - 32.000 byte
Flash-ROM is the code size including variables which have none-zero init values.
.text is the value for the the pure code
b) .data: is said the space for variable (SRAM) that the maximum size is ?
.data is the size of the variables which have none-zero default value such as "int x = 4;"
This value counts against flash-rom AND ram (SRAM) area size.
c) .bss: is said the space for variable (SRAM) that the maximum size is ?
This is the size of those variables, which have a zero default value, such as "int y = 0;"
The stack size is not listed here, because it grows during runtime.
Conclusion for overall memory consumption:
Flash-Rom = .text + .data
SRAM = .data + .bss + stack
SRAM for Atmega328 is 2000 bytes --> correct ?
Well yes, the datasheet will be a more reliable source, but if i remember correctly then it is 2048.
Flash-ROM(PROGMEM) size = text + bss = 27502 + 698 = 28.200 bytes must be < 2^15 = 28.200 < 32.000 --> it's ok
You took the right numbers, but your text is wrong: "size = text + data"
Required SRAM: (.data + .bss + stack) < 2048 = 698 + 1078 + 200 = 1976 < 2048 --> I'm at the limit of Ram used.
Yes, i think so too. Especially i do not know if stack needs 100, 200 or 300 bytes.
If you need a precise answer, you will need tools like this: StackAnalyzer: Stack Usage Analysis
You can also do a runtime analysis by your own. I found the following threads also:
This is a nice idea for fully automatic runtime calculation:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=52249
This also has several links and lot of information:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=78518
Have fun,
Oliver