Using pyOCD with Seeed Arch Max - Seeed-Studio/Arch_Max GitHub Wiki
pyOCD provides a gdb server which we can use to debug Arch Max.
Requirements
- download gcc arm embedded toolchain and make, add them to PATH
- install python, pip and the latest pyocd
How to
-
export your program of gcc arm embedded toolchain from mbed online compiler
-
generate elf file with debug information
make DEBUG=1
-
drag-n-drop bin file into Arch Max
-
setup a gdb server using pyocd. use stm32f103rc as the target for stm32f407 is not added to pyocd yet
pyocd -t stm32f103rc
-
use arm-none-eabi-gdb to connect the gdb server
arm-none-eabi-gdb example.elf -ex 'target remote localhost:3333'
-
some commands used in gdb console:
monitor reset
- reset and halt the target
b main.cpp: 8
- set a breakpoint at line 8 of main.cpp
b main()
- set a breakpoint at main() function
`c' - continue run
's' - step