一. 可視化的代碼跟蹤調試
- 安裝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
- 完整電路原理圖