Go to flight telemetry git


Connexion :
| STLINK | PCB |
|---|---|
| MCU VDD | 3.3v |
| SWDIO | DIO |
| SWCLK | CLK |
| MCU_RST | RST |
| GND | GND |

Connexion :
| Raspberry pi pin id | Raspberry pi pin name | PCB |
|---|---|---|
| 17 | 3.3v | 3.3v |
| 18 | GPIO24 | DIO |
| 22 | GPIO25 | CLK |
| 16 | GPIO23 | RST |
| 20 | Ground | GND |
UART4/5 console Connexion :
| Raspberry pi pin id | Raspberry pi pin name | PCB |
|---|---|---|
| 10 | GPIO15 | TX |
| 8 | GPIO14 | RX |
| 6 | Ground | GND |
| Name | link |
|---|---|
| Atollic | https://atollic.com/ |
| Eclipse | https://www.eclipse.org/ |
| STM Studio | https://www.st.com/en/development-tools/stm-studio-stm32.html |
| ST-Link Utility | https://www.st.com/en/development-tools/stsw-link004.html |
$ sudo apt update
$ sudo apt upgrade
$ sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev
$ git clone http://openocd.zylin.com/openocd
$ cd openocd
$ ./bootstrap
$ ./configure --enable-sysfsgpio --enable-bcm2835gpio
$ make
$ sudo make install
$ cd flight-controller-workspace
$ nano openocd.cfg
Then write this :
bindto 0.0.0.0
source [find interface/raspberrypi-native.cfg]
transport select swd
set WORKAREASIZE 0x2000
source [find target/stm32f4x.cfg]
reset_config srst_only srst_nogate
adapter_nsrst_delay 100
adapter_nsrst_assert_width 100
bcm2835gpio_swd_nums 25 24
bcm2835gpio_trst_num 7
bcm2835gpio_srst_num 23
init
targets
Start openOCD
$ sudo openocd &
Go to section Debug using Raspberry-pi
MIT