STM32嵌入式應用系統設計
- 一. 可視化的代碼跟蹤除錯
- 二、Proteus仿真運行stm32程式
- 三、使用Altium Designer軟體繪制一個stm32最小系統的電路原理圖、PCB圖
一. 可視化的代碼跟蹤除錯
- 安裝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"
]
}
]
}


參考網址:
https://www.cnblogs.com/lwp-king666/p/10513382.html
https://blog.csdn.net/q932104843/article/details/51924900
https://www.cnblogs.com/maxiaowei0216/p/12616087.html
二、Proteus仿真運行stm32程式
參考文章
https://blog.csdn.net/weixin_46136508/article/details/105846011utm_medium=distribute.pc_relevant.none-task-blog-
- 創建新工程



- 系列選擇Cortex-M3,Controller選擇STM32F103R6

- 創建完成后如圖

- 添加LED-YELLOW

- 添加電阻

- 設定電阻阻值為50

- 連線如下圖

- keil5中生成hex檔案

- 雙擊stm32f103r6芯片,然后進入Program File 選擇剛才生成的hex檔案,并配置Crystal Frequency改成8M

- 結果如圖

三、使用Altium Designer軟體繪制一個stm32最小系統的電路原理圖、PCB圖
參考學習網站
- 新建工程

- 添加新的…


- 根據原件圖,修改資料









- 修改名稱

- 根據原件圖加入引腳



- 新建…工程

- 選擇器件,拖入元件


- 新建空白元件

- 修改名稱

- 畫圖如下

- 填充并修改為Top Overlay

- 放置焊盤

- 添加新的…

- 放置線

- 生成庫檔案

-
完善元件

-
放置元件

- 完整電路原理圖

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/209701.html
標籤:java
