linux开发51教程,Linux下使用SDCC开发MCS 51单片机

If you are trying to build your own microcontroller system, then SDCC is suitable for you. You can adopt SDCC with no cost (license under GPL) and it supports under both Windows and Linux platform. SDCC able to compile C code for difference microcontroller, such as MCS-51, Z80, Motorola 68HC08 based MCUs and even Microchip’s MCU PIC and PIC18. You can get more information for SDCC from here . To install SDCC you can:

sudo apt-get install sdcc

or compile it from the source . The step to install SDCC from sources is showing here . So when you want to compile your C code, just enter:

sdcc filename.c

If you need to specified the cpu architecture, uses ‘-m’:

sdcc -mpic16 filename.c

The command line above will be used to compile code for PIC16. Here is the list of architectures that supported with ‘-m’ :

pic

pic16

mcs51

z80

ds390

ds400

avr

gbz80

By default SDCC will create Intel Hex files, if you need other format just specified with ‘–out-fmt-xxx’:

sdcc -mpic16 --out-fmt-xxx filename.c

where ‘xxx’ can be replace with the format list as below:

ihx - Intel hex file format (by default)

s19 - Motorola s19 format

elf  - Linux ELF format

Related Posts

No related posts0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值