Projects > flightController

Flight Controller

Using Telemetry Module

Go to flight telemetry git

Program / Debug Flight Controller

pcb full pcb stlink pins

Debug using ST-LINK

st-link pins

Connexion :

STLINK PCB
MCU VDD 3.3v
SWDIO DIO
SWCLK CLK
MCU_RST RST
GND GND

Debug using Raspberry-pi

raspberry pi pins

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

Usefull Softwares

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

Raspberry Shield Setup

Update yout raspberry :

$ sudo apt update
$ sudo apt upgrade

Install nessesary components

$ sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev

Install openOCD from git

$ git clone http://openocd.zylin.com/openocd
$ cd openocd
$ ./bootstrap
$ ./configure --enable-sysfsgpio --enable-bcm2835gpio
$ make
$ sudo make install

Configure openOCD

$ 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

Todos

License

MIT