mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Updating hardware debugging development docs.
This commit is contained in:
parent
85b78ec2c0
commit
fe913480ab
8 changed files with 77 additions and 52 deletions
|
@ -1,62 +1,14 @@
|
||||||
# Hardware
|
# Hardware Debugging In Eclipse
|
||||||
|
|
||||||
Various debugging hardware solutions exist, the Segger J-Link clones are cheap and are known to work on Windows with both the Naze and Olimexino platforms.
|
Build a binary with debugging information using command line or via Eclipse make target.
|
||||||
|
|
||||||
USB-MiniJTAG J-Link JTAG/SWD Debugger/Emulator
|
Example Eclipse make target
|
||||||
|
|
||||||
http://www.hotmcu.com/usbminijtag-jlink-jtagswd-debuggeremula%E2%80%8Btor-p-29.html?cPath=3_25&zenid=fdefvpnod186umrhsek225dc10
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
ARM-JTAG-20-10 adapter
|
|
||||||
|
|
||||||
https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/
|
|
||||||
http://uk.farnell.com/jsp/search/productdetail.jsp?sku=2144328
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The Segger J-Link server can be obtained from here
|
|
||||||
|
|
||||||
http://www.segger.com/jlink-software.html
|
|
||||||
|
|
||||||
# Build with DEBUG=GDB
|
|
||||||
|
|
||||||
## Naze target (default)
|
|
||||||
|
|
||||||
### via Command line
|
|
||||||
|
|
||||||
```
|
|
||||||
make clean TARGET=NAZE
|
|
||||||
make TARGET=NAZE DEBUG=GDB
|
|
||||||
```
|
|
||||||
|
|
||||||
### via Eclipse make target
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
### via configuration
|
|
||||||
use this method if you want to build automatically when launching the debug configuration
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Olimexino target
|
|
||||||
|
|
||||||
### via command line
|
|
||||||
```
|
|
||||||
make clean TARGET=OLIMEXINO
|
|
||||||
make TARGET=OLIMEXINO DEBUG=GDB
|
|
||||||
```
|
|
||||||
|
|
||||||
### via Eclipse make target
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
# GDB and OpenOCD
|
# GDB and OpenOCD
|
||||||
|
|
||||||
start openocd:
|
start openocd
|
||||||
|
|
||||||
openocd -f /usr/share/openocd/scripts/board/stm32vldiscovery.cfg
|
|
||||||
|
|
||||||
Create a new debug configuration in eclipse :
|
Create a new debug configuration in eclipse :
|
||||||

|

|
||||||
|
|
|
@ -10,6 +10,52 @@ http://visualgdb.com/tutorials/arm/st-link/
|
||||||
This video is also helpful in understanding the proces:
|
This video is also helpful in understanding the proces:
|
||||||
https://www.youtube.com/watch?v=kjvqySyNw20
|
https://www.youtube.com/watch?v=kjvqySyNw20
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
Various debugging hardware solutions exist, the Segger J-Link clones are cheap and are known to work on Windows with both the Naze and Olimexino platforms.
|
||||||
|
|
||||||
|
### J-Link devices
|
||||||
|
|
||||||
|
Segger make excellent debuggers and debug software.
|
||||||
|
|
||||||
|
The Segger J-Link GDB server can be obtained from here.
|
||||||
|
|
||||||
|
http://www.segger.com/jlink-software.html
|
||||||
|
|
||||||
|
#### Segger J-Link EDU EDU version, for hobbyists and educational use.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
https://www.segger.com/j-link-edu.html
|
||||||
|
|
||||||
|
#### USB-MiniJTAG J-Link JTAG/SWD Debugger/Emulator
|
||||||
|
|
||||||
|
http://www.hotmcu.com/usbminijtag-jlink-jtagswd-debuggeremula%E2%80%8Btor-p-29.html?cPath=3_25&zenid=fdefvpnod186umrhsek225dc10
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### ARM-JTAG-20-10 adapter
|
||||||
|
|
||||||
|
https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/
|
||||||
|
http://uk.farnell.com/jsp/search/productdetail.jsp?sku=2144328
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
#### CJMCU-STM32 Singlechip Development Board Jlink Downloader Jlink ARM Programmer
|
||||||
|
|
||||||
|
http://www.goodluckbuy.com/cjmcu-stm32-singlechip-development-board-jlink-downloader-jlink-arm-programmer.html
|
||||||
|
|
||||||
|
|
||||||
|
### STLink V2 devices
|
||||||
|
|
||||||
|
STLink V2 devices can be used too, via OpenOCD.
|
||||||
|
|
||||||
|
#### CEPark STLink V2
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
http://www.goodluckbuy.com/cepark-stlink-st-link-v2-emulator-programmer-stm8-stm32-downloader.html
|
||||||
|
|
||||||
## Compilation options
|
## Compilation options
|
||||||
|
|
||||||
use `DEBUG=GDB` make argument.
|
use `DEBUG=GDB` make argument.
|
||||||
|
@ -27,3 +73,30 @@ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/
|
||||||
|
|
||||||
brew install openocd
|
brew install openocd
|
||||||
|
|
||||||
|
### GDB debug server
|
||||||
|
|
||||||
|
#### J-Link
|
||||||
|
|
||||||
|
##### Windows
|
||||||
|
|
||||||
|
Run the Launch the J-Link GDB Server program and configure using UI.
|
||||||
|
|
||||||
|
#### OpenOCD
|
||||||
|
|
||||||
|
##### Windows
|
||||||
|
|
||||||
|
STM32F103 targets
|
||||||
|
|
||||||
|
"C:\Program Files (x86)\UTILS\openocd-0.8.0\bin-x64\openocd-x64-0.8.0.exe" -f interface/stlink-v2.cfg -f target/stm32f1x_stlink.cfg
|
||||||
|
|
||||||
|
STM32F30x targets
|
||||||
|
|
||||||
|
"C:\Program Files (x86)\UTILS\openocd-0.8.0\bin-x64\openocd-x64-0.8.0.exe" -f scripts\board\stm32f3discovery.cfg
|
||||||
|
|
||||||
|
##### OSX/Linux
|
||||||
|
|
||||||
|
STM32F30x targets
|
||||||
|
|
||||||
|
openocd -f /usr/share/openocd/scripts/board/stm32vldiscovery.cfg
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
docs/development/assets/hardware/THAOYU-USB-MiniJTAG.jpg
Normal file
BIN
docs/development/assets/hardware/THAOYU-USB-MiniJTAG.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
BIN
docs/development/assets/hardware/cepark-stlink-v2-front.jpg
Normal file
BIN
docs/development/assets/hardware/cepark-stlink-v2-front.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
docs/development/assets/hardware/cjmcu-jlink-back.jpg
Normal file
BIN
docs/development/assets/hardware/cjmcu-jlink-back.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
BIN
docs/development/assets/hardware/cjmcu-jlink-front.jpg
Normal file
BIN
docs/development/assets/hardware/cjmcu-jlink-front.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
docs/development/assets/hardware/j-link-edu.jpg
Normal file
BIN
docs/development/assets/hardware/j-link-edu.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Loading…
Add table
Add a link
Reference in a new issue