SAM programming software for Linux

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

I might have a case of bad Google-fu this morning..

 

What are the Linux software alternatives for programming SAM memories?

 

My first target is a SAM D20 so no USB on chip, Thus, I'm primarily looking for a non-bootloader solution.

 

The D20 is on a Xplained Pro board. Also have one Atmel-ICE and one Atmel SAM-ICE.

 

[EDITs: Clarifications and available hardware]

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Sat. Nov 11, 2017 - 06:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Google-fu seems to get a bit better as the day progresses. (-:

 

This is somewhat embarrassing for me.. : https://github.com/ataradov/edbg

 

EDIT: ...and OpenOCD can apparently be used (only fount hints to this so far, so need to dig further).

 

EDIT: According to Atmels and Microchips webs the Atmel SAM-ICE does not support M0's (support listed is "SAMA5, SAM3, SAM4, SAM7 and SAM9 ARM"), so it'll be the Atmel-ICE.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Sat. Nov 11, 2017 - 09:40 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Might also be worth looking at CMSIS-DAP ...

 

See: https://www.avrfreaks.net/comment...

and Morten's reply: https://www.avrfreaks.net/comment...

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

Mmmmm... The abbreviation I know roams out there in the ARM wilderness, that I have a slight fear of, and that I've tried to avoid up til now.

 

Well, seems the time is due to muster some courage, a sharpened pencil and a stack of paper, a new LibreOffice document, Then go out onto the vast Web, track the beast down and take it on.

 

Thanks, awneil.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

I use a Jlink edu which both 'JLinkExe -device AT91SAMD11D14A -if swd' and OpenOCD work.

 

To write I use QtCreator with JLinkGDBServer.

 

 

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

Speaking of Segger (the makers of J-Link), they have an update to the EDBG to make it work like a J-Link:

 

https://www.segger.com/products/debug-probes/j-link/models/other-j-links/j-link-edbg/

 

 

(the also have similar things for some other manufacturers' proprietary debug probes)

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...
Last Edited: Tue. Nov 14, 2017 - 03:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bookmarked! Thanks, Andy!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Let's see if I can get this right; it took me a while to figure this out...

 

SWD and JTAG are hardware interfaces between a debugger/programmer "box" (loosely speaking) and an ARM chip.   They provide a standard method for the debugger to talk to various registers inside the ARM CORE.

 

CMSIS-DAP describes a standardized higher-level interface between a USB Host (like your PC) and an ARM SWD/JTAG Debugger.  Theoretically, debugging SW on your PC can support CMSIS-DAP and be able to talk to ANY ARM chip (given an appropriate "box" that also supports CMSIS-DAP.  Apparently it is flexible enough to support encapsulation of non-ARM stuff as well.   It's probably not the fastest way for a debugger to communicate with a PC, but it's standard!

 

AS7, OpenOCD, and etc are PC software packages that can talk to humans and filesystems and such on the PC side, and debuggers running CMSIS-DAP on the other side. (possibly other comm protocols as well.)

 

All nice and layered.

But an important thing to understand is that Flash memory is NOT part of the ARM core, and neither SWD/JTAG nor CMSIS-DAP really understand anything about how to load stuff into flash to program your chip.  That's because the flash is controlled by vendor-proprietary "stuff" (on SAMD20, it'd be the NVMCTRL "peripheral.")  Probably, this means that the PC debugger (OpenOCD, for example) has to have intimate knowledge of each chip that you might want to program, so that it can manipulate the NVMCTRL registers as if they were memory, eventually causing the right things to happen (SWD/JTAG does give you the ability to read and write memory locations in the address space.)  I'm sort-of partial to the idea that you'd load a small boot program into RAM and then let it execute to do the actual flash programming, but I'm not quite sure that that works via the chain we're talking about.)

(It's vaguely similar to the ultra-simple AVR programmers that work by sending individual SPI 4-byte commands over the comm link.)