This project includes code from stm32f429, and MPU6050 licensed under GPL v3.0:
- Core/Inc/fonts.h: from here
- Core/Src/fonts.c: from here
- Core/Inc/ssd1306.h: from here
- Core/Src/ssd1306.c: from here
- Core/Inc/mpu6050.h: from here.
- Core/Src/mpu6050.c: from here.
-
This repository uses STM32 VS Code Extension, please ensure the following items are installed:
-
Ensure STM32 VS Code Extension is installed.
-
Once the extension is installed, in the extensions tab, select STM32 VS Code Extension -> Manage (gear icon) -> Settings, insert the path for STM32CubeMX executable and STM32CubeCLT folder.
-
Launch the STM32CubeMX,open the .ioc file and select generate code.
-
Go the .vscode/launch.json, insert the following configuration for OpenOCD debug:
{ "name": "Debug (OpenOCD)", //no opencod for py32 "cwd": "${workspaceRoot}", "executable": "${workspaceFolder}/build/Debug/100_integrated_system_prototype.elf", "armToolchainPath": "${config:STM32VSCodeExtension.cubeCLT.path}/GNU-tools-for-STM32/bin", "toolchainPrefix": "arm-none-eabi", "gdbPath": "gdb-multiarch", "request": "launch", "type": "cortex-debug", "servertype": "openocd", "interface": "swd", "preLaunchTask": "${defaultBuildTask}", "device": "STM32F103C8Tx", // "runToEntryPoint": "main", "svdFile": "${config:STM32VSCodeExtension.cubeCLT.path}/STMicroelectronics_CMSIS_SVD/STM32F103.svd", "configFiles": [ "interface/stlink.cfg", "target/stm32f1x.cfg" ], "preLaunchCommands": [ "monitor halt", "monitor sleep 200" ], "postLaunchCommands": [ "monitor halt", "monitor sleep 200" ] }
- Once the code is ready, right click CmakeLists.txt and select Configure All Projects.
- Right click CmakeLists.txt again, and select Build All Projects.
- To flash to the STM32 blue pill, opens up the command pallate using ctrl + shift + p, select
Tasks: Run Task
->CubeProg: Flash project (SWD)
. - To start debug mode, Run and Debug (ctrl + shift + D ), select
Debug (OpenOCD)
and start debugging (F5). - Alternatively, you can add
"Build + Flash"
in the OpenOCD"preLaunchTask":
, or executeTasks: Run Task
->Build + Flash
using command pallate.