Code Monkey home page Code Monkey logo

c51's Introduction

C51

目录

为什么选择SDCC而不是Keil

下载与配置

关于本项目说明

贡献指南

SDCC和Keil语法差异

其他资料

为什么选择SDCC而不是Keil

Keil缺点:

  1. 功能较弱,只适合个人和小团队开发,不适合中型、大型开发
  2. 是收费软件,需要付费,大多数人用 Keil C 都是盗版
  3. Keil内部中文注释是乱码,配套编辑器缩进不方便
  4. Keil支持较为局限

SDCC缺点:

  1. SDCC不配套的调试器,不能够调试硬件

下载与配置

  1. 编辑器我们推荐使用VSCode,并针对VSCode配置了一套设置文件
  2. 下载VSCode
  3. 然后根据计算机版本完成VSCode的安装
  4. 下载SDCC
  5. 同样根据自己的系统安装对应版本的SDCC,例如我安装的是SDCCWin64的V3.8
  6. 安装好SDCC需要配置Path系统变量

关于本项目说明

  1. VSCode的语法错误提示已经被屏蔽,需要的自行删除.vscode的setting(如果删除语法错误屏蔽,正确的书写方法会报一些错误)
  2. 代码文件默认放在usr文件夹中,临时文件放在tmp文件夹中
  3. 目前的Makefile仅支持C51单文件编译
  4. Publish的批处理文件是用来一键删除所有的临时文件和生成过的hex文件,如果想要删除tmp文件夹下的临时文件和生成过的hex文件,可以运行publish.bat
  5. 使用时,打开VSCode,点击File-Open Folder,然后选择本repo的文件夹,如果你按照默认目录安装sdcc,你打开一个usr文件夹下的C文件,然后点击Terminal-RunBuildTask,即可成功编译并生成可烧录的hex文件。

贡献指南

  • Pull Request前,请将你的编译生成和临时文件全部删除

SDCC和Keil语法差异

#include<8052.h>//#include<reg52.h>
#define pin P0_0//sbit pin=P0^0;
//declare nvic function before use 在使用中断函数之前要声明

其他资料

c51's People

Contributors

haozewu avatar ouzhouxiao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.