More stuff and proper writeup coming soon.
Use ImageMagick's convert
tool:
convert rustacean-1bit.png -depth 1 rustacean.data
Together these files will add a debug target in VS Code which builds the crate, flashes it to the MCU, and resets into a debug breakpoint.
{
"version": "2.0.0",
"tasks": [
{
"label": "cargo build",
"type": "cargo",
"subcommand": "build",
"problemMatcher": [
"$rustc"
],
"group": "build"
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"type": "gdb",
"request": "launch",
"name": "Debug Microcontroller",
"preLaunchTask": "cargo build",
"target": "${workspaceFolder}\\target\\thumbv7em-none-eabi\\debug\\stm32f446-oled-test",
"cwd": "${workspaceRoot}",
"gdbpath": "path\\to\\arm-none-eabi-gdb.exe",
"autorun": [
"target remote :3333",
"monitor arm semihosting enable",
"load",
"step"
]
}
]
}
- Ferris the crab logo is from https://rustacean.net/.