SEGGER j-link

Post here to get support
Post Reply
mado92
Beginner
Posts: 3
Joined: Wed Jan 07, 2015 9:34 pm

SEGGER j-link

Post by mado92 »

Hey guys,

I am a student with just little Unix and programming experience.
I'm trying to flash the crazyflie (1.0) firmware with an Debugger from SEGGER, "j-link EDU".
I'm using the Bitcraze VM 0.6 an installed the J-Link Software for Linux 32bit. https://www.segger.com/jlink-software.html

After installation I tried to flash it in Eclipse ...
-> Make Target -> crazyflie-firmware -> Flash using debugger
... error!

Console:

Code: Select all

22:42:19 **** Build of configuration Build (GNU) for project crazyflie-firmware ****
make flash 
openocd -d2 -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c targets -c "reset halt" \
                 -c "flash write_image erase cflie.elf" -c "verify_image cflie.elf" -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Error: open failed
in procedure 'transport'
in procedure 'init'
Makefile:268: recipe for target 'flash' failed
make: *** [flash] Error 1

22:42:19 Build Finished (took 305ms)
I will hope you can help me flashing the firmware on the crazyflie!
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: SEGGER j-link

Post by marcus »

Hi,

When you click the Flash using debugger in Eclipse you will call the make for the project crazyflie-firmware with make flash. This will in turn execute openOCD for flashing the target. The issues here is that JLink is not supported from openOCD so you should download the JLink tools from the website and edit the Makefile to include a new target for flashing with JLink. Below is the code for flashing with openOCD, check the JLink doc for the flashing command. Then you just add a new target to the Makefile (copy paste the code below) and add it to Eclipse.

Code: Select all

flash:
	openocd -d0 -f $(OPENOCD_INTERFACE) -f $(OPENOCD_TARGET) -c init -c targets -c "reset halt" \
                 -c "flash write_image erase cflie.elf" -c "verify_image cflie.elf" -c "reset run" -c shutdown
Post Reply