st-link v2 to program crazyflie

Firmware/software/electronics/mechanics
Post Reply
ravidborse
Beginner
Posts: 1
Joined: Fri Jul 04, 2014 5:26 am

st-link v2 to program crazyflie

Post by ravidborse »

Hi I am from India, Bus Blaster is not available here. So I bought ST-Link V2 (st link v2). Can it be used to flash/debug crazyflie? If yes, any reference how to do it?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: st-link v2 to program crazyflie

Post by arnaud »

Hi,

Yes sure ST-Link V2 works fine. You need to change OpenOCD config files in the Makefile: https://github.com/bitcraze/crazyflie-f ... kefile#L10

The easiest way to do that is to create a config.mk file and put this in it:

Code: Select all

OPENOCD_INTERFACE = interface/stlink-v2.cfg
OPENOCD_TARGET = target/stm32f1x_stlink.cfg
CLOAD=0
Note that to flash with JTAG you have to flash the firmware without bootloader support. When you are finished you can flash back the bootloader (the project is on GitHub) and build with CLOAD=1 to bootload your new firmware.
almaz_1c
Member
Posts: 43
Joined: Tue Dec 09, 2014 12:58 pm

Re: st-link v2 to program crazyflie

Post by almaz_1c »

Hello. Can someone explain me how to connect crazyflie to st-link? I use st-link from stm32 discovery board.
I powered my copter from li-ion battery:
3v3 ----- li-ion 3v3
GND ---- li-ion GND
On discovery board i have 4 pins that i need to connect to crazyflie:
---------------------------------------------------------------------|
discovery ------------- crazyflie expansion board
---------------------------------------------------------------------|
VDD_TARGET ------------ Pin 1 ( VCC )
SWCLK ---------------------- Pin 4 ( TCK )
GND --------------------------- Pin 9 ( DGND )
SWDIO ----------------------- Pin 2 ( TMS )
---------------------------------------------------------------------|
This is the proper connection? This connection will not destroy my copter?
almaz_1c
Member
Posts: 43
Joined: Tue Dec 09, 2014 12:58 pm

Re: st-link v2 to program crazyflie

Post by almaz_1c »

It work. Without connecting to Pin 1 (VCC).
Post Reply