mirror of https://github.com/ArduPilot/ardupilot
Tools: added files useful for hardware debugging
This commit is contained in:
parent
6b0456e3ac
commit
e393828702
|
@ -0,0 +1,2 @@
|
||||||
|
SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb"
|
||||||
|
SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg"
|
|
@ -0,0 +1,3 @@
|
||||||
|
This directory contains files that are useful for setting up to debug
|
||||||
|
ArduPilot using either a black magic probe or a stlink-v2 with openocd
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# copy the file to .gdbinit in your Firmware tree, and adjust the path
|
||||||
|
# below to match your system
|
||||||
|
|
||||||
|
# using ttyBmpGdb is appropriate if you have setup udev to
|
||||||
|
# automatically create a link when a black magic probe is
|
||||||
|
# inserted. See 99-blackmagic.rules in this directory
|
||||||
|
target extended /dev/ttyBmpGdb
|
||||||
|
monitor swdp_scan
|
||||||
|
attach 1
|
||||||
|
|
||||||
|
#monitor vector_catch disable hard
|
||||||
|
set mem inaccessible-by-default off
|
||||||
|
set print pretty
|
||||||
|
|
||||||
|
b AP_HAL::panic
|
||||||
|
b HardFault_Handler
|
||||||
|
b chSysHalt
|
||||||
|
set confirm off
|
|
@ -0,0 +1,12 @@
|
||||||
|
# copy this file to .gdbinit in your Firmware tree
|
||||||
|
|
||||||
|
# this sets up gdb to use openocd. You must start openocd first
|
||||||
|
target extended-remote :3333
|
||||||
|
|
||||||
|
set mem inaccessible-by-default off
|
||||||
|
set print pretty
|
||||||
|
|
||||||
|
b AP_HAL::panic
|
||||||
|
b HardFault_Handler
|
||||||
|
b chSysHalt
|
||||||
|
set confirm off
|
|
@ -0,0 +1,8 @@
|
||||||
|
# sample openocd config file for use with ArduPilot
|
||||||
|
# ChibiOS boards
|
||||||
|
source [find interface/stlink.cfg]
|
||||||
|
# replace the stm32f4x with the right value for
|
||||||
|
# your microcontroller
|
||||||
|
source [find target/stm32f4x.cfg]
|
||||||
|
init
|
||||||
|
$_TARGETNAME configure -rtos ChibiOS
|
Loading…
Reference in New Issue