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

  1. download gcc arm embedded toolchain and make, add them to PATH
  2. install python, pip and the latest pyocd

How to

  1. export your program of gcc arm embedded toolchain from mbed online compiler

  2. generate elf file with debug information

    make DEBUG=1

  3. drag-n-drop bin file into Arch Max

  4. setup a gdb server using pyocd. use stm32f103rc as the target for stm32f407 is not added to pyocd yet

    pyocd -t stm32f103rc

  5. use arm-none-eabi-gdb to connect the gdb server

    arm-none-eabi-gdb example.elf -ex 'target remote localhost:3333'

  6. 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