一. 可视化的代码跟踪调试
- 安装C++的插件
- vscode打开源码文件了并调试
- 点击最左边第四个好像虫子的图标
- 选择刚刚装好的c++插件
- 修改后的lanch.json
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/${fileBasenameNoExtension}.out", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true, "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }
- 修改后的task.json文件
{ "version": "2.0.0", "tasks": [ { "label": "build", "type": "shell", "command": "g++", "args": [ "-g", "${file}", "-std=c++11", "-o", "${fileBasenameNoExtension}.out" ] } ] }
参考网址:html
https://www.cnblogs.com/lwp-king666/p/10513382.htmlc++
https://blog.csdn.net/q932104843/article/details/51924900shell
https://www.cnblogs.com/maxiaowei0216/p/12616087.htmljson
2、Proteus仿真运行stm32程序
参考文章
https://blog.csdn.net/weixin_46136508/article/details/105846011utm_medium=distribute.pc_relevant.none-task-blog-
ide
- 建立新工程
- 系列选择Cortex-M3,Controller选择STM32F103R6
- 建立完成后如图
- 添加LED-YELLOW
- 添加电阻
- 设置电阻阻值为50
- 连线以下图
- keil5中生成hex文件
- 双击stm32f103r6芯片,而后进入Program File 选择刚才生成的hex文件,并配置Crystal Frequency改为8M
- 结果如图
3、使用Altium Designer软件绘制一个stm32最小系统的电路原理图、PCB图
参考学习网站学习
- 新建工程
- 添加新的…
- 根据原件图,修改数据
- 修更名称
- 根据原件图加入引脚
- 新建…工程
- 选择器件,拖入元件
- 新建空白元件
- 修更名称
- 画图以下
- 填充并修改成Top Overlay
- 放置焊盘
- 添加新的…
- 放置线
- 生成库文件
-
完善元件
网站 -
放置元件ui
- 完整电路原理图