JTAG Debugging

Post here to get support
Post Reply
phiamo
Member
Posts: 31
Joined: Wed May 08, 2013 11:44 am

JTAG Debugging

Post by phiamo »

hi folks,
i just got my BusmasterV4 and a 10-pin to 20-pin JTAG Adapter from watterott. Now i soldered the headers and connected the busblaster to my usb port.
But even with the battery connected i do not get openocd nor eclipse to work with it.

make openocd says:
bitcraze@bitcraze-vm:~/projects/crazyflie-firmware$ make openocd
openocd -d0 -f interface/busblaster.cfg -f target/stm32f1x.cfg -c init -c targets
Open On-Chip Debugger 0.6.1 (2012-12-06-17:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 0
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32f1x.cpu cortex_m3 little stm32f1x.cpu unknown
Polling target failed, GDB will be halted. Polling again in 700ms
Polling target failed, GDB will be halted. Polling again in 1500ms
Polling target failed, GDB will be halted. Polling again in 3100ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Error: Target not examined yet
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms


eclipse running the debug configuration crazyflie gdb says:
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
Remote connection closed
Remote connection closed

Does anyone have an idea? i am not expeienced with debugging over jtag at all :(
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: JTAG Debugging

Post by tobias »

It looks like it is not able to communicate with the Crazyflie at all. First question, is pin 1 connected to pin 1 on the Crazyflie.
phiamo
Member
Posts: 31
Joined: Wed May 08, 2013 11:44 am

Re: JTAG Debugging

Post by phiamo »

Since i see all LEDs on the cf going on if i connect busblaster via usb, and no battery connected, and even motors starting up if batteries are connected, i assume all solderpoints are corretly.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: JTAG Debugging

Post by tobias »

Can you send a picture? Also try this command directly in the promt in the crazyflie-firmware root directory:

Code: Select all

openocd -d0 -f interface/busblaster.cfg -f scripts/stm32f1x-rtos.cfg -c init -c targets -c "reset halt"
phiamo
Member
Posts: 31
Joined: Wed May 08, 2013 11:44 am

Re: JTAG Debugging

Post by phiamo »

Yehaw thanks, needed to turn around the mini jtag connector cable on both ends .. now it works :/ no idea ;-)

anyways howto go on, i need to build and flash the firmware i assume?
but can this be done inside eclipse ide completely or is it done automagically?
phiamo
Member
Posts: 31
Joined: Wed May 08, 2013 11:44 am

Re: JTAG Debugging

Post by phiamo »

Ok got so far:
using shift F9 inside eclipse:
=> build debug
shift f9
=> build flash

then running crazyflie-gdb debug

opening a console and starting
make openocd

now i am in ;-)

but there must be a more common way...
howto get access to the wiki, i think a jtag howto would be useful to others too!
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: JTAG Debugging

Post by marcus »

Drop me a PM with the username that you would like for the wiki and I will set you up with an account.

Are you using version 0.3 of the VM? Instead of writing the steps here I've started a page on jtag debugging on the wiki. Have a look at the instructions and give me some feedback.
Post Reply