Author Topic: Getting started with SAM4S-EK2  (Read 5753 times)

0 Members and 1 Guest are viewing this topic.

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Getting started with SAM4S-EK2
« on: May 19, 2015, 07:16:12 pm »
I recently brought this:

http://uk.farnell.com/atmel/atsam4s-ek2/eval-sam4s8-sam4s16-cortex-m4/dp/2215340


I only just figured out I have no clue how to get started or programming it...


Do I need this JTAG programmer as well? I was thinking that it could be programmed through the USB plug however it seems to just act like a memory stick as of now.


Does anyone have any ideas on how I can get started and begin to make things?

Thanks!
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Getting started with SAM4S-EK2
« Reply #1 on: May 19, 2015, 07:29:56 pm »
Looking at the demo release notes it seems you can program it without external tools. The chip also has a ROM bootloader on the UART port (see section 6 of the kit's user guide). For debugging you'll still want a JTAG interface.

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: Getting started with SAM4S-EK2
« Reply #2 on: May 19, 2015, 07:46:56 pm »
Looking at the demo release notes it seems you can program it without external tools. The chip also has a ROM bootloader on the UART port (see section 6 of the kit's user guide). For debugging you'll still want a JTAG interface.

Thanks for that information.

What is the best JTAG connector / tool to get? and are they all the same? I mean, could I use the JTAG tool for FPGAs as well or is it locked to a specific product?
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Getting started with SAM4S-EK2
« Reply #3 on: May 19, 2015, 07:58:21 pm »
Tools usually only support a small number of interfaces, and there's manufacturer-specific pinouts etc. JLink is almost the industry-standard for ARM microcontroller development. If you're going to stick with Atmel, you might want to check out their Atmel-ICE which is pretty cheap.

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: Getting started with SAM4S-EK2
« Reply #4 on: May 19, 2015, 08:01:13 pm »
SAM-ICE will be the most supported and easiest to use. But virtually any Segger j-link product should work. Atmel-ICE may be a cheaper option, but you will have to make an adapter cable or use a squid cable, which is painful really.

You can program the board without the programmer using SAM-BA in the ROM, but there is no way to debug your program this way. I have a command line script that can be used for programming the chip https://github.com/ataradov/embedded/tree/master/sam-ba .
Alex
 

Offline Asmyldof

  • Regular Contributor
  • *
  • Posts: 148
  • Country: nl
  • Freelancer - Persnicketist - Do'er of stuff
    • Asmyldof's Home. It's old, not quite impressive, but it's there.
Re: Getting started with SAM4S-EK2
« Reply #5 on: May 20, 2015, 12:36:20 am »
Atmel's SAM-ICE will plug right into the JTAG header, no conversions needed at all. The J-Link universal JTAG will also work, but is much more expensive.

The SAM-ICE is in fact just a J-Link universal device, but locked to just linking and emulating Atmel chips, to allow a lower product price under contract. That's why they also say "J-Link" or "Powered by J-Link".

So whether you want the universal or the Atmel one is mainly down to: Will you possibly or probably also want to sample other brand ARMs in the near future?

On the other hand "If you want to debug, you want a JTAG" is simplified. You can also very comfortably use the Serial connector to pump out std-err, std-out, etc and read those with a terminal program, in effect letting you debug your code just like you'd debug test code on your computer. A very common and doable practise for many low-budget projects, with the added benefit that such constructs will allow you to keep the debugging option in anything you build upon it, wherever it is in the world without that location also needing any special hardware.
If you want to be able to dig into pin-states, add break-points, inspect registers and such without actually modifying your code, THEN you need a JTAG device.

The chip itself has a factory set bootloader section that allows connecting through the first serial hardware block (true for most, if not all larger SAMs) - usually UART0, or an internal USB to be used with a program called SAMBA, which can be downloaded for free from the Atmel website.
If it's a puzzle, I want to solve it.
If it's a problem, I need to solve it.
If it's an equation... mjeh, I've got Matlab
...
...
(not really though, Matlab annoys me).
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Getting started with SAM4S-EK2
« Reply #6 on: May 20, 2015, 04:30:00 am »
The SAM-ICE is in fact just a J-Link universal device, but locked to just linking and emulating Atmel chips, to allow a lower product price under contract. That's why they also say "J-Link" or "Powered by J-Link".
SAM-ICE is a different device from the Atmel-ICE.

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: Getting started with SAM4S-EK2
« Reply #7 on: May 21, 2015, 05:07:26 pm »
Thank you for all your feedback.

I am very much trying to get into the whole area, expanding beyond arduino and I am unsure as how to proceed. As I do not have much experience with micro controllers I need to get going in a fairly simple way (not over complicated) before I move onto attempting more complex things and more error prone methods.
 

Offline Asmyldof

  • Regular Contributor
  • *
  • Posts: 148
  • Country: nl
  • Freelancer - Persnicketist - Do'er of stuff
    • Asmyldof's Home. It's old, not quite impressive, but it's there.
Re: Getting started with SAM4S-EK2
« Reply #8 on: May 21, 2015, 06:54:48 pm »
The SAM-ICE is in fact just a J-Link universal device, but locked to just linking and emulating Atmel chips, to allow a lower product price under contract. That's why they also say "J-Link" or "Powered by J-Link".
SAM-ICE is a different device from the Atmel-ICE.
When did I speak about Atmel-ICE? I was talking about Atmel SAM-ICE, maybe your eyes accidentally skipped the SAM part?
The SAM-ICE is licensed to Atmel AFAIK, so I feel legitimised in writing Atmel SAM-ICE.
I'm just missing your point, but that might be entirely my problem? Maybe I should stop working and go eat, could help.
If it's a puzzle, I want to solve it.
If it's a problem, I need to solve it.
If it's an equation... mjeh, I've got Matlab
...
...
(not really though, Matlab annoys me).
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Getting started with SAM4S-EK2
« Reply #9 on: May 24, 2015, 09:35:19 pm »
When did I speak about Atmel-ICE?
You didn't. I somehow completely missed ataradov's post and thought you were commenting on mine. The names of all these interfaces are so similar that people sometimes get them mixed up.

IMO if you're going to spend the money on a J-Link, it's worth paying the extra for the full version and not be tied down to a single chip vendor or toolchain.

Offline Asmyldof

  • Regular Contributor
  • *
  • Posts: 148
  • Country: nl
  • Freelancer - Persnicketist - Do'er of stuff
    • Asmyldof's Home. It's old, not quite impressive, but it's there.
Re: Getting started with SAM4S-EK2
« Reply #10 on: May 24, 2015, 11:44:48 pm »
That depends on the work you are doing.

I have never tried a real J-Link with Atmel Studio, but I expect that should work.
As most of my contract work centers around either:
1- Chips & Tools supplied by the client
2- Atmels, because the thing needs to be done quickly and I stock a very great variety of them.
3- Non-Atmel, but running vendor supplied OS
I own an AVR-ICE, SAM-ICE and Dragon. The linux systems never really required a JTAG/ICE interface up to this point and, well, all those other tools aren't ever mine :-)
If it's a puzzle, I want to solve it.
If it's a problem, I need to solve it.
If it's an equation... mjeh, I've got Matlab
...
...
(not really though, Matlab annoys me).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf