Build, flash, and debug the STM32F407 firmware project in the current repository by using Keil MDK and ST-LINK_CLI with repository-relative paths. Use when Codex needs to compile `MDK-ARM\upboard.uvprojx`, inspect `MDK-ARM\upboard\upboard.build_log.htm`, program `MDK-ARM\upboard\upboard.hex`, or read target memory over SWD.
Run commands from the repository root and use the exact commands below unless the user explicitly overrides a path or target.
C:\Keil_v5\UV4\UV4.exeMDK-ARM\upboard.uvprojx@echo off
"C:\Keil_v5\UV4\UV4.exe" -j0 -b "MDK-ARM\upboard.uvprojx"
Run:
& "C:\Keil_v5\UV4\UV4.exe" -j0 -b "MDK-ARM\upboard.uvprojx"
Then inspect:
MDK-ARM\upboard\upboard.build_log.htmTreat the build as successful only if the log confirms 0 Error(s) or another explicit success summary.
ST-LINK_CLI.exe -c SWD -P "MDK-ARM\upboard\upboard.hex" -V after_programming -Rst
Do not report flash success unless ST-LINK_CLI.exe detects the probe and completes programming plus verification.
ST-LINK_CLI.exe -c SWD -r32 <address> <count>
Use this only when the user provides verification addresses or when a concrete debug check requires memory inspection.
Run build first, then flash:
& "C:\Keil_v5\UV4\UV4.exe" -j0 -b "MDK-ARM\upboard.uvprojx"
ST-LINK_CLI.exe -c SWD -P "MDK-ARM\upboard\upboard.hex" -V after_programming -Rst
Stop after the build step if the build log shows errors.
ST-LINK_CLI.exe reports No ST-LINK detected!, state that the board or probe is unavailable and stop before claiming any flash or memory-read result.