Using the SAM-ICE without Atmel Studio?

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all

 

I am working on a project in which I need to program an ATSAM4E16C, including setting the GPNVM Bits. The project is part of a test equipment that must program the ATSAM of the customers product when it has been manufactured on the production line. I am planning to use the SAM-ICE JTAG debugger/programmer. Its small physical size makes it an easy fit inside the fixture. However, I do not want to have to install Atmel Studio on the customers PC's, so I was wondering if it is possible to use the programmer standalone. i.e. controlling it directly from my PC application without Atmel Studio. 

 

I know of the atprogram tool in Atmel Studio, but it does not support multiple instances (i.e. programming 2 or more boards simultaneously), and it still requires Atmel Studio to be installed.

 

It looks like the JLinkArm.dll is the interface between the programmer and Atmel Studio, and I was wondering if the interface to this DLL is known? If so, I can probably access it directly from my own PC application. Actually, according to the users manual for the SAM-ICE Amel should have its own dedicated DLL for this:

 

     SAM-ICE ARM Flash DLL:   An enhanced version of the JLinkARM.DLL, which contains additional API functions for Flash programming. 

 

However, I can not find it on the Atmel/Microchip webpage, or discussed in this otherwise very nice forum. Does it even exist?

 

I hope someone can help with information on any of the two DLL's. Also, suggestions to other ways of programming an ATSAM are very welcome.

 

Br

Morten 

 

Last Edited: Wed. May 2, 2018 - 02:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might want to look at Atmel’s SAM-BA software. It can be scripted using tcl.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm, looks interesting! However, it seems to depend on a monitor running on the target? If so, it is a no-go unfortunately. The firmware is developed by our customer and changing it for this is not an option. But thanks for the suggestion.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Read a bit more! What is confusing is that there is two SAM-BA -one for the higher end cpus that run Linux and the other for the single chip micros. It may download some code, but this runs in ram, so it won’t alter your flash image. I’ve used it to program SAM7 devices on a production tester.

Last Edited: Tue. May 1, 2018 - 11:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Though the following is not for the ATSAM4E16C, it does show scripting for SAM V71 via USB or likely via a SAM-ICE :

https://github.com/atmelcorp/sam-ba/tree/master/examples/samv71/internalflash

There may be a bootloader in SAM4E ROM so don't have to go via USB yet still able to have SAM-BA on a PC or Mac.

 

Well, not for SAM4E :

https://github.com/atmelcorp/sam-ba/tree/master/src/plugins/device

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. May 1, 2018 - 11:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Superfar wrote:
It looks like the JLinkArm.dll is the interface between the programmer and Atmel Studio, and I was wondering if the interface to this DLL is known?
Would JLink.exe go through that DLL?

SAM-ICE

SAM-ICE Related Software

Overview

http://www.microchip.com/webdoc/GUID-B2CE0E6C-70BF-42CF-B0CF-6705800FC877/index.html?GUID-82B7DA4D-C306-4147-8276-4B695203292F

Superfar wrote:
Also, suggestions to other ways of programming an ATSAM are very welcome.
Was thinking OpenOCD (a GDB server) but it has SAM4E16E :

https://sourceforge.net/p/openocd/code/ci/master/tree/src/flash/nor/at91sam4.c

http://openocd.org/

 

SAM-ICE is an arm GDB server so might be able to program via arm-gdb.

https://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=AT91SAM-ICE

http://distribute.atmel.no/tools/opensource/Atmel-ARM-GNU-Toolchain/6.3.1/SOURCES.README

http://www.microchip.com/avr-support/avr-and-arm-toolchains-(c-compilers)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, will have to study the details then. But it looks promising - if you have been able to use it for production testing so should I...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The scripting does not look too difficult - at least after a quick look. Also, my friend Google tells me that SAM-BA is able to set the GPNVM bits, so this route is definitely one I will have to investigate. Thanks for info...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
 

Would JLink.exe go through that DLL?

 

Yes, it definitely would. Actually, just found out that JLink.exe is able to do what I need. I would rather not use it, because accessing a console application from my test program is problematic. 

 

 

Sorry, that link seems to be dead.

 

 

gchapman wrote:

Was thinking OpenOCD (a GDB server) but it has SAM4E16E :

https://sourceforge.net/p/openocd/code/ci/master/tree/src/flash/nor/at91sam4.c

http://openocd.org/

This looks extensive, with a rather steep learning curve. Doable, but not my first option (my project is, as always, hard pressed on time)

 

 

SAM-ICE is an arm GDB server so might be able to program via arm-gdb.

https://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=AT91SAM-ICE

http://distribute.atmel.no/tools/opensource/Atmel-ARM-GNU-Toolchain/6.3.1/SOURCES.README

http://www.microchip.com/avr-support/avr-and-arm-toolchains-(c-compilers)

Not sure I get this one. The links points to sites about building the GNU compilers?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just wanted to let you know what I ended up doing. It turned out that Elprotronic does support the SAM4E16E (not sure how I missed that when I checked it first time). I have used these programmers before, and they have a proper API and no license requirements once you have bought the device. So that is definitely the way to go for me. But I learned about a some new alternatives here, so thanks for the info all of you....

 

Br

Morten

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microchip wrote:

AN2466

Title: Using Atmel-ICE for AVR® Programming In Mass Production

Name: AN2466

Date: 12/20/2017

Description:

The application note introduces Atmel-ICE setup, driver installation, user guide of the Atmel Studio command line utility (atprogram.exe), and provide a PC programming tool project written in C#. The Visual C# example project can be downloaded along with this application note and run with the ATmega328PB Xplained Mini kit.

 

Keywords: DS00002466, Microchip, Atmel, AVR, ARM, production, programming

 

http://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en599598

 

Despite saying just "AVR" in the title, the list of applicable chips includes SAM ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We have been using the ATMEL-ICE during development. It is a nice and cheap programmer, but we cannot use it for our production tester:

 

1) it does not support multiple instances and our tester runs two boards at a time

2) it  relies on Atmel Studio which we cannot install on PC's at the production facility

3) it is way to slow: 7.5 MHz JTAG clk compared to the 12 MHz of the SAM-ICE. This results in a 5 second increase in takt time!

 

 

Thanks for the info though....

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

Despite saying just "AVR" in the title, the list of applicable chips includes SAM ...

I have been checking out this c# tutorial for the past few weeks and I want to know if there is any other coding language that I should be learning to start using atmel.

I am trying to diversify my knowledge of coding by seeing what all programming languages I can learn.

Please help me out here.

If there were no humor, life would be tragic

Last Edited: Thu. Jun 7, 2018 - 01:26 PM