Pages: [1]   Go Down
Author Topic: SAM 3X8 + AVR_Studio + Hello World  (Read 1722 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm tinkering with Atmegas for some years now. Got myself a DUE to sneak in the SAM91 stuff but it seems its heck a lot magnitudes more complicated then I expected. Even a simple blink.c with AVR-Studio6 (I'm not in the Arduino IDE vy much since its lack of capabilities) at the moment is tricky. Does someone have a good source project where to start?


Joachim, Germany
« Last Edit: February 23, 2013, 10:47:56 am by Transistorfips » Logged

US
Offline Offline
Full Member
***
Karma: 4
Posts: 182
Electronics are the new Legos
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try the Arduino IDE to start out then you can move to the big stuff.
Logged

Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found a solution how to handle these stuff.

Atmel faciliates the usage of preprogrammed so-called modules, components, drivers and services which are part of the Atmel Software Framework. There are more then 10 examples for the Arduino Due available. I opted for the getting-started example and it worked fine.

The next step is to put the code in the controller...

Here is a link how to use the ASF:
Logged

Belgium
Offline Offline
Full Member
***
Karma: 5
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,  I've also been tinkering with the Due and AtmelStudio, i tried to keep a bit of a log what I did.
https://sites.google.com/site/arduinodueatmelstudio/home

You can upload your compiled code using bossac (the bootloader).
I'm now a owner of a jtag programmer/debugger so I'm not using bossac anymore.

Main reason for using AtmelStudio is the ability to Debug using 'real' breakpoints.

keep us informed on what you learn using the Due in Atmel Studio.
Logged

Gear: Arduino- Uno,Due,Ethernet,  OLS, Buspirate, J-Link, TDS1002, Rigol DG1022

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

could you post a link to the JTag programmer you are using?
Logged

Belgium
Offline Offline
Full Member
***
Karma: 5
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Jtag-interface is from http://www.segger.com/index.html

The Model I bought is the Jtag-EDU  for educational purpose:  http://www.segger.com/j-link-edu.html
The price should be arround 50Euro.
Quote
The offer includes free use of Unlimited Flash Breakpoints. The only limitation is that it may not be used to develop a product.
 The J-Link EDU is natively supported by IAR EWARM, KEIL µVision, Rowley Crossworks, and CodeSourcery G++.  Via GDB-Server, the supported tool-chains also include Atollic TrueStudio, Yagarto, and other GDB based or compatible development environments.
J-Link EDU is sold to private persons, colleges, schools, universities and NPOs (Non Profit Organizations) for educational purposes only. It is not sold to companies.

I bought it from Farnell, but Digikey, mouser also have them.
Logged

Gear: Arduino- Uno,Due,Ethernet,  OLS, Buspirate, J-Link, TDS1002, Rigol DG1022

Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello frosty,

I'm playing with the command-line parameter now for a while. Testing them in the dosbox won't work. It seems params like $(ItemDir), $(ItemFileName) or $(ItemExt) aren't visible "outside" of Atmel Studio. I taylored a small batchjob to run this weired 1200baud chip-erase thing which could be started by a click of a funky little button in the tool bar but the nonrecognizalicious command line crap thwarted my idea. Bummer.

Any idea?
« Last Edit: February 26, 2013, 07:58:26 am by Transistorfips » Logged

Belgium
Offline Offline
Full Member
***
Karma: 5
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


On the commandline the following should work,
>            bossac.exe --port=COM12 -U false -e -w -v -b foobar.bin -R
one thing to note is that your Due needs to be waiting with its bootloader, and it will only do that when the memory is empty (push erase button on Due) and after that do a reset(not sure if needed).
Just try to connect using      >bossac.exe --port=COM12 -U false -i


About the param's  $(ItemDir), $(ItemFileName) or $(ItemExt)   they are not visible outside AtmelStudio,  those are used in the external tool menu of AtmelStudio. And they are very hard to understand , I have been fiddling with them for a while, ....
I just kinda just uploaded using a cmd-box using bossac on the commandprompt .

I have not bossac'd anymore since I have the Jtag now.
Logged

Gear: Arduino- Uno,Due,Ethernet,  OLS, Buspirate, J-Link, TDS1002, Rigol DG1022

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've think I've discovered the issue/potential issue with BOSSAC and Atmel Studio. After trying to get BOSSAC intigrated I continued to receive "File not found". I played with the path variable with no success.

To test I eventually when to the command line, and got the same errors and was all WTF? I knew the file file was there and and could even tab-complete the path. so this error was bogus!?!? UNTIL I used the complete path ie: "C:\Users\me\Docuements\Atmel Studio\etc.."
did BOSSAC finally decide to work properly, and after adding the full path to my project directory then using the placement params from Atmel Studio it started working.

Logged

Pages: [1]   Go Up
Jump to: