Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有程序并将其编译为 Hex 文件,该文件可在此处获得。我将此十六进制文件烧录到 ATMega 卡 163 中,它运行正常。现在我想知道文件的代码大小。
运行size main.hex给出:
size main.hex
text: 0 data: 7072 bss:0 dec:7072 hex: 1ba0 filename: main.hex
为什么文本大小和 bss 为 0?数据大小的含义是什么?
我认为文本应该是可执行代码。数据是进入 RAM 的初始化内容和bss非初始化 RAM 内容(可以为 0)。不知道为什么所有代码都用于数据,但我想这是生成文件或构建脚本的问题。