STM8S 低密度存储器分配
1.STM8S内部存储分布
下图是STM8S内存分布图,标注的地方为Flash区域
2 实际的HEX分析
各区的大小及分配,可以参看项目生成的.lkf 文件,其中, +seg<section><options>的定义见文件”CXSTM8_UserGuide.pdf” 的第267页.整个HEX文件的分配都在seg 指令下进行分配.
另外,在生成的MAP文件中,可以详细看出各部分的起始地址和长度大小,举例如下(注释自己加的):
--------
Segments
--------
start 00008080 end 0000829c length 540 segment .const //const(或字符常量)常量的分布
start 000082bd end 00009f89 length 7372 segment .text // code 代码的分布
start 00004000 end 00004000 length 0 segment .eeprom //eeprom的分布
start 00000000 end 00000019 length 25 segment .bsct, initialized//已初始化的@tiny变量
start 000082a4 end 000082bd length 25 segment .bsct, from //
start 00000019 end 0000008c length 115 segment .ubsct //未初始化的@tiny变量
start 0000008c end 0000008c length 0 segment .bit //位变量
start 0000008c end 0000008c length 0 segment .share //
start 00000100 end 00000100 length 0 segment .data //
start 00000100 end 00000100 length 0 segment .bss //
start 00000000 end 00000b15 length 2837 segment .info. //
start 00008000 end 00008080 length 128 segment .const //
start 0000829c end 000082a4 length 8 segment .init //
希望对你有用!
请先 后发表评论~