Go Down

Topic: Debugging Arduino Due using SAM-ICE JTAG (an approach) (Read 14 times) previous topic - next topic

Graynomad

Quote
You guys seem to have a good background in arm

The trouble is I'll bet almost nobody here actually programs the "ARM" as such, with the exception of the NVIC we deal with chip's peripherals which are different for every manufacturer. (OK don't ping me if you're an ARM assembly expert :))

FWIW I use the LPCXpresso and having a full debugger is fantastic, I know I've written a lot of code over the years without one but damned if I know how :)

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

neil12

#11
Jan 08, 2013, 02:09 am Last Edit: Jan 08, 2013, 02:12 am by neil12 Reason: 1
FYI I have symbolics working with Atmel Studio 6.0.1996  (released Nov 2012)
So the  toolchain is DUEX powered externally with 9volts,  DUE JTAG connector (10pin 0.05")  -- cable ARM-JTAG-10-10 --(20pin 0.1") Atmel SAM-ICE JTAG emulator to USB port with Atmel Studio 6.0.1966 running on Win XP latest.
The SAM3X has something like 5 hardware breakpoints on chip, and as from AS6.0 Build 1996 supports symbolic decoding,  watching internal variables.
I used it on the USB Host code, Uhi_cdc.c: so haven't tested it on any .cpp yet.
The SAM-ICE JTAG is happier connected directly to a USB port. When it goes through a hub it would periodically get upset.
Even connected directly to a hub sometimes the segger JLINK.exe has an exception.

peteb

#12
Feb 28, 2013, 01:23 am Last Edit: Feb 28, 2013, 01:31 am by peteb Reason: 1

FYI I have symbolics working with Atmel Studio 6.0.1996  (released Nov 2012)
So the  toolchain is DUEX powered externally with 9volts,  DUE JTAG connector (10pin 0.05")  -- cable ARM-JTAG-10-10 --(20pin 0.1") Atmel SAM-ICE JTAG emulator to USB port with Atmel Studio 6.0.1966 running on Win XP latest.
The SAM3X has something like 5 hardware breakpoints on chip, and as from AS6.0 Build 1996 supports symbolic decoding,  watching internal variables.
I used it on the USB Host code, Uhi_cdc.c: so haven't tested it on any .cpp yet.
The SAM-ICE JTAG is happier connected directly to a USB port. When it goes through a hub it would periodically get upset.
Even connected directly to a hub sometimes the segger JLINK.exe has an exception.



I have successfully configured the Arduino framework in Atmel Studio 6.0 and can execute programs on UNO and MEGA2560 using USB download.
BTW, I used the following tutorial:  http://www.engblaze.com/tutorial-using-atmel-studio-6-with-arduino-projects/ and sourced working avrdude configuration parameters from: http://www.jayconsystems.com/tutorial/atmerpt1/

I have a similar setup as described above for DUE (except I'm using VMWare Fusion: Win XP SP3,  Atmel Studio 6.0.1996, SAM-ICE, OLIMEX - ARM-JTAG-20-10).

I can use the Atmel Studio 6 predefined configuration for DUE and download/debug programs (not the Arduino framework) via the SAM-ICE. I used the program earlier in this thread for testing.

I then set up a standard GCC C++ Executable project for DUE using just the Arduino framework (using Arduino 1.5.2). Through trial and error I've managed to get the standard blink example to compile and link. However, on attempting to debug or download the programme via SAM-ICE, Atmel Studio launches a new tab that says "No Source Available" and does not execute the code. It does appear to be downloading.  The Programme Counter value is 0x46204E16. I've spent significant time modifying things and searching for solutions with no success.

Neil12 - Would it be possible to provide access to a working Atmel Studio project to allow me to progress this? - I've hit a wall with this one!

Pete

neil12

I'll see what I can do. I haven't done much with Atmel DUE port since the post, though I did merge in the 1.5.2 update and it broke some of the hooks. I'd be happy to try and get something going - though might be a few days.
I'm very focused on the USB Host and also low power implementation, so there changes to the Arduino Due approach to support that.
I've also got a rain gauge - tipping bucket that I'm interfacing to an extension board that goes on the DUE + Ehternet board. This is using the Arduino Due framework.

peteb

Many thanks for your reply Neil. I will keep looking for obvious things that are wrong with my setup but any help is appreciated.

Go Up