Skip to content

STM32F103C8T6 project template for Visual Studio Code.

License

Notifications You must be signed in to change notification settings

katorlys/STM32F103C8T6-VSCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

STM32F103C8T6-VSCode

License Pull Requests Issues Lines

简介

可直接在 Visual Studio Code 中使用的 STM32F103C8T6 项目工程模板。

环境配置教程:https://blog.katorly.work/STM32-VSCode-with-Keil-Studio

库类型: STM32标准库
平台: Keil Studio
调试器: ST-Link

注: 启动文件存放在电脑的个人用户文件夹内,所有项目共用同一份启动文件。其由 CMSIS 的 Software Components 生成和管理,因此若要将项目迁移到 Keil MDK 5及以下的 IDE,需要添加 Keil MDK 5 及以下专用的启动文件,否则无法编译通过。

使用方法

  1. 复制Project文件夹 (路径不能有中文)
  2. 用 VSCode 打开
  3. 新建文件、修改文件名、删除文件时, 要在Project.cproject.yml里的project.groups.files处一个个地手动添加文件, 如下例子所示:
groups:
    - group: Source Files
      files:
        - file: ./main.c
        - file: ./System/Delay.c
        - file: ./System/Delay.h
  1. 在侧栏的CMSIS中点击BuildBuild (clean)Build即可在out/Project/STM32F103C8/文件夹中获取到编译后的文件 (目前仅支持.axf)
  2. 点击Run即可把编译后的文件通过ST-LINK下载到STM32中, 若此前未构建则需先点击Build, 先构建再下载
  3. 点击Debug即可开始调试, 与 Keil MDK 一样
  4. 发送项目文件给别人时, 可以把outtmp文件夹删除, 其它文件则不能删除