Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.
/ VSCode-C51 Public archive

💡 VSCode C51工程模板,用VSCode写51单片机代码

License

Notifications You must be signed in to change notification settings

FeliksLv01/VSCode-C51

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VSCode-C51

VSCode Keil C51工程模板 VSCode-C51

视频教程

VSCode插件

感谢MoonAndHaze使用本模版开发了一个VSCode插件,很大程度上降低了本模版的使用难度。 插件项目地址

版本更新

  • 已修复文件路径带空格报错问题
  • 已修复路径参数带有引号的bug

文件夹说明

  • src\ 存放代码文件
  • build\ 编译过程生成的文件
  • environment\ 51启动文件和LIB静态连编文件

修改说明

1、修改c_cpp_properties.json

  "includePath": [
  "${workspaceFolder}/**",
  "‪D:/Program Files/Keil5/C51/INC/**",
],

将includePath中的Keil的路径修改为你自己的

2、修改tasks.json

  "args": [
    "${workspaceFolder}",
    "${workspaceFolder}\\src",
    "${workspaceFolder}\\environment",
    "main"
],

主要修改第四个参数"main",这个相当于Keil中的工程名

3、修改compile.bat

@echo off
set KEIL_BIN_FOLDER=D:\Program Files\Keil5\C51\BIN

将KEIL_BIN_FOLDER修改为你的C51\BIN的地址

注意事项

所有的代码文件必须放到src根目录下面, 编译时,点击终端-运行生成任务

About

💡 VSCode C51工程模板,用VSCode写51单片机代码

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published