Linux sdcc/sdas8051 编译 8051 汇编生成 intel hex 与 bin

安装

安装 sdcc 即可

编译

  • 编译 8051 汇编生成链接库 rel 等文件 # sdas8051 -ols demo.asm
  • 通过连接库文件生成 ihx 文件 # sdcc demo.rel
  • 通过 ihx 文件生成 hex 文件 # packihx demo.ihx > demo.hex
  • 或者 ihx 直接生成 binary 文件 # sdobjcopy -I ihex -O binary demo.ihx demo.bin
原文地址:https://www.cnblogs.com/seliote/p/14020951.html