Show Posts
Pages: [1]
1  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: March 06, 2013, 05:21:19 pm
Thanks again for all your help. Exactly right! I updated as suggested: #define SAM3XA_SERIES (SAM3X4 || SAM3X8 || SAM3A4 || SAM3A8)
The example builds, executes and is debuggable via SAM-ICE. I will now undertake some more testing.

BTW, I did try the Atmel Studio 6.1 beta (build 2440). I set up for ATSAM3X8E. I found that there appeared to be a problem when setting up the toolchain in Project Properties. Just by selecting the toolchain configuration to be "All Configurations" an application error was displayed: "Error occurred computing the All Configuration settings".  I tried uninstalling, re-downloading and re-installing but the problem persisted. So, it seemed to be unusable. I wonder if anybody else has come across this? I then installed the earlier version: 6.0.1996 - Service Pack 2 that I am currently using.

Pete
2  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: March 05, 2013, 12:47:25 pm
Neil, very many thanks for the time and effort to prepare and post this. Much appreciated.  
BTW I'm supporting a number of Arduino development projects being undertaken my electronics students and attempting to get better debug facilities by utilising the SAM-ICE, but keeping the Arduino framework.

I built your project((in Version: 6.0.1996 - Service Pack 2) and got errors in adc.h (Part of the output is shown) - see below.
I can understand that some conditionally included definitions are not actually being included. Does the project build for you? Is there some definition that is missing? Have you had similar issues? I see that you have injected an error into this file previously to test a conditionally compiled macro definition...
clip from adc.c:
#if SAM3S_SERIES || SAM4S_SERIES || SAM3XA_SERIES
//error njh;
...

      In file included from ../arduino/hardware/arduino/sam/system/libsam/chip.h:44:0,
                       from ../arduino/hardware/arduino/sam/cores/arduino/Arduino.h:34,
                       from ../arduino/hardware/arduino/sam/cores/arduino/cortex_handlers.c:19:
C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h(170,48): 'enum adc_resolution_t' declared inside parameter list [enabled by default]
C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h(170,48): its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Error   8   use of enum 'adc_channel_num_t' without previous declaration   C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h   173   48   sam3xApp01
Error   9   use of enum 'adc_channel_num_t' without previous declaration   C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h   174   49   sam3xApp01
Error   10   use of enum 'adc_channel_num_t' without previous declaration   C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h   177   62   sam3xApp01
Error   11   use of enum 'adc_channel_num_t' without previous declaration   C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h   178   61   sam3xApp01
Error   7   use of enum 'adc_resolution_t' without previous declaration   C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h   170   48   sam3xApp01
3  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: February 28, 2013, 02:42:18 am
Many thanks for your reply Neil. I will keep looking for obvious things that are wrong with my setup but any help is appreciated.
4  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: February 27, 2013, 07:23:38 pm
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
Pages: [1]