Open source programmer for ATMEL ARM series microcontrollers

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

Hi guys,

 

Actually first of pardon me for posting the Atmel ARM related query here in the ATMEL AVR forum site. Actually I am doing this as I was unable to find any answer to my question after going through and through many webpages across various sites and all my homework ended up in vain.

 

So finally I decided to ask you people for some support as you people might have delved yourself into the 32-bit fascinating ARM world too, apart from the 8-bit AVR world.

 

Actually for past few months I was searching for some open source programmer or debugger for programming the ATMEL ARM cortex series microcontrollers as the tools offered by ATMEL as all of you know are not quite but too costly and can't be afforded by any hobbyist like me.

 

So I want to know from you people that have you encountered the same problem in your life sometime than what solutions you found, please do share your views , ideas and work regarding this post as this would be helpful for the other hobbyists looking for the same query here and there or somewhere else not known to me.

 

 

Thanks and Regards

 

Piyush Pandey.

Last Edited: Sat. Jun 20, 2015 - 01:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's open ocd
http://openocd.org/doc/html/Debug-Adapter-Hardware.html
And do a google for wiggler
It's a simple jtag interface using the printerport of your pc.

Personally, i'd just buy an xplained board ( i have already) or there's plenty of other make boards with debuggers for under $20 usd.

Last Edited: Sat. Jun 20, 2015 - 12:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

as the tools offered by ATMEL as all of you know are not quite but too costly and can't be afforded by any hobbyist like me.

What about the Atmel ICE Basic?

 

http://www.digikey.com/product-d...

 

$53.00

 

Jim

 

I will move this to the debuggers forum

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

You can always roll your own. CMSIS DAP is open source and made by ARM. You need to get any micro with USB interface (or any other interface, really), compile CMSIS DAP for that micro and use any CMSIS DAP compatible programmer.

 

Here is open source one made by me https://github.com/ataradov/edbg

 

But all of this makes any sense if your time is completely worthless. Otherwise official tools are quite cheap, actually.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

Or get ATATMEL-ICE-PCBA, which is even cheaper, but beware, those 0.05" cables are expensive as hell for no real reason.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

Last Edited: Sat. Jun 20, 2015 - 06:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

piyushpandey wrote:
... some open source programmer ... for programming the ATMEL ARM cortex series microcontrollers ...
Arduino is using BOSSA for programming SAM3X8E (Arduino Due) and SAMD21G18 (Arduino Zero).

BOSSA

http://www.shumatech.com/web/products/bossa

BOSSA is a flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers.

The motivation behind BOSSA is to create a simple, easy-to-use, open source utility to replace Atmel's SAM-BA software. 

Arduino

Arduino Due

http://www.arduino.cc/en/Main/ArduinoBoardDue

...

Unlike other Arduino boards which use avrdude for uploading, the Due relies on bossac.

...

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

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

Hi kartman 

 

Its nice to see you.

 

I know about the OpenOCD but can they debug the code in any of the Atmel ARM cortex based microcontrollers with the wiggler attached to them. I mean cortex M0,cortex M3 and cortex M4.

 

 

Regards.

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

gchapman wrote:

 

Arduino is using BOSSA for programming SAM3X8E (Arduino Due) and SAMD21G18 (Arduino Zero).

 

 

BOSSA is a flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers.

 

 

 

I think BOSSA is software which runs at the PC but it needs some hardware to interact with the ATMEL ARM controllers ..... so what is that hardware piece and also It's just a flash loader .......... as far I know about it and not a debugger. than how can we use it for debugging purpose.

 

 

Regards

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

alexru wrote:

You can always roll your own. CMSIS DAP is open source and made by ARM. You need to get any micro with USB interface (or any other interface, really), compile CMSIS DAP for that micro and use any CMSIS DAP compatible programmer.

 

Here is open source one made by me https://github.com/ataradov/edbg

 

But all of this makes any sense if your time is completely worthless. Otherwise official tools are quite cheap, actually.

 

 

its nice for providing the link to the work of yours , but alexru can we use CMSIS DAP with the IAR Embedded workbench or only with the Keil ARM IDE. I am just asking this before doing any search homework on it :), so pardon me for that actually I am asking directly because I think you might have tried both IDE and know the answer.

 

 

Also can I debug and not only program any of the ATMEL cortex based microcontroller with it whether it is ARM cortex M0,cortex M3 or coretx M4.

 

 

Regards

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

Kartman wrote:

 

Personally, i'd just buy an xplained board ( i have already) or there's plenty of other make boards with debuggers for under $20 usd.

 

which xplained board you are talking about there are various versions out there. Please specify the exact number of your xplained board which you use for debugging purpose.

 

One more thing is that can you program and debug any of the ATMEL cortex series microcontroller whether it is cortex M0 , cortex M3 or cortex M4 or cortex M0+ with the xplained board that you have or there is some restriction on it.

 

Regards

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

piyushpandey wrote:
can we use CMSIS DAP with the IAR Embedded workbench
CMSIS DAP is an open standard. IAR supports it out of the box, just select it in the project settings.

 

piyushpandey wrote:
Also can I debug and not only program any of the ATMEL cortex based microcontroller with it whether it is ARM cortex M0,cortex M3 or coretx M4.
Yes, you can, but now with my tool.

 

OpenOCD, for example, will create a link to GDB, and then you can use either GDB itself (command line tool) or a number of available GUI tools.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

But you should really do your homework. Right now your questions are all over the place and don't make sense a lot of time.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

alexru wrote:

But you should really do your homework. Right now your questions are all over the place and don't make sense a lot of time.

 

yes you are right alexru, so pardon me for that , actually I asked that all in excitement , hope you would understand :)

 

 

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

alexru wrote:

 

Yes, you can, but now with my tool.

 

 

alexru I didn't get the meaning of this sentence and if you have any blog or write up on your debugging tool would you please share it with me and also any hardware resource.

 

 

 

Regards

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

There is no write up. It is not for debugging, just for programming. And it is extremely easy to use. But why not  start with Atmel Studio? The thread has started with open source, and right now we are on the question of whether IAR and Keil support CMSIS-DAP. So what is the goal here?

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

alexru wrote:

But why not  start with Atmel Studio? The thread has started with open source, and right now we are on the question of whether IAR and Keil support CMSIS-DAP. So what is the goal here?

 

 

No the header of the post is open source programmer or debugger for programming the ATMEL ARM microcontrollers. its not open source IDE so I want to make all people to benefit from it whether they use ATMEL studio or WINARM or IAR or Keil or some other IDE. The post is independent of the fact whatever IDE you choose to use and the programmer or debugger should be I think capable of negotiating with all sort of the IDEs and indeed it will if it is based on standard protocols.....right :)  

 

 

Happy Posting.

 

 

:)

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

piyushpandey wrote:
I think BOSSA is software which runs at the PC ...
Windows, Mac OS X, or Linux.

piyushpandey wrote:
so what is that hardware piece

Arduino

Uploading Code to the Due

http://www.arduino.cc/en/Guide/ArduinoDue#toc13

...

Connect your board to the computer by attaching the USB cable to the Due's Programming port ...

piyushpandey wrote:
... and also It's just a flash loader
Via the Atmel SAM-BA protocol; SAM contains SAM-BA bootloader and the PC contains the BOSSA loader.

Edit : corrected from USB DFU.

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

Last Edited: Mon. Jun 22, 2015 - 06:23 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

And CMSIS-DAP is the protocol here. But there are not too many open-source tools that are not a pain in the rear to set up. Especially for debugging.

 

All other closed IDEs will support CMSIS-DAP. Each Xplained Pro board has one soldered on the board. SAM D20 Xplained has a connector for external target, so it can also act as a programmer for other devices.

 

But I suggest to start with closed tools and see how they work first to get the feel for the state of the field.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

gchapman wrote:

 

Via the USB DFU protocol; SAM contains a DFU bootloader and the PC contains the BOSSA loader.

 

 

Do all SAM controllers from ATMEL have the USB DFU pre-installed in them.

 

Also if accidently the DFU gets erased or corrupted than what.

 

 

as far as my experience with the DFU is that they can only burn the flash i.e. program the controller and can't be used as the debugger.

 

 

regards

 

 

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

alexru wrote:

But I suggest to start with closed tools and see how they work first to get the feel for the state of the field.

 

yes you are right alexru but the problem is as I mentioned in the beginning that only atmel debugging products are very costly compare to their couterparts like ST,TI and freescale and NXP and I think they should think in this direction to pace their controllers sale in the market.

 

 

regards

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

piyushpandey wrote:
Do all SAM controllers from ATMEL have the USB DFU pre-installed in them.
None of them do. It is an Arduino thing.

 

piyushpandey wrote:
Also if accidently the DFU gets erased or corrupted than what.
Use a real tool to re-program it.

 

piyushpandey wrote:
as far as my experience with the DFU is that they can only burn the flash i.e. program the controller and can't be used as the debugger.
Yes, DFU is only for programming. But Arduino has no debug anyway.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

piyushpandey wrote:
yes you are right alexru but the problem is as I mentioned in the beginning that only atmel debugging products are very costly compare to their couterparts like ST,TI and freescale and NXP and I think they should think in this direction to pace their controllers sale in the market
$20 for a board with an MCU and debugger on it it too costly? Or $40 for a debugger that can program any MCU?

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

i apologize for the mis-edit; Atmel SAM-BA instead of USB DFU.

SAM-BA has been in Atmel ARM since SAM7 (ARM7 or pre-Cortex) for as long as I can remember.

Atmel Corporation

Home > Products > Microcontrollers > SMART ARM-based MCUs > SAM D MCUs

Atmel SAM-BA In-system Programmer

http://www.atmel.com/tools/ATMELSAM-BAIN-SYSTEMPROGRAMMER.aspx

Edit : added SAM-BA URL.

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

Last Edited: Mon. Jun 22, 2015 - 06:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

There is no SAM-BA in Cortex-M0+ devices, since they have no ROM at all.

 

But given how cheap the tools are now days, I don't really see a problem here. It is impossible to get a decent multimeter for $40, and you get a full-featured debugger.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

Last Edited: Mon. Jun 22, 2015 - 06:30 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:

$20 for a board with an MCU and debugger on it it too costly? Or $40 for a debugger that can program any MCU?

 

 

 

which board from ATMEL is coning of the $20 with debugger and MCU on it brother , i searched a lot and not found a single one that's why I think the hobbyists stick to either ST-Discovery boards or TI launchpad boards 

for lots of their projects and the internet is flooded with projects circling around these two series in which the discovery is ahead of everybody.

 

Anyway which of the ATMEL debugger costs just $40 ???????????.

 

 

 

regards

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

gchapman wrote:

i apologize for the mis-edit; Atmel SAM-BA instead of USB DFU.

SAM-BA has been in Atmel ARM since SAM7 (ARM7 or pre-Cortex) for as long as I can remember.

 

 

please make it clear do the current state is that ATMEL support SAM-BA or USB DFU for programming their controllers, or SAM-BA has become obsolete in the ATMEL ARM controllers, please clarify it.

 

 

regards

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

piyushpandey wrote:
which board from ATMEL is coning of the $20 with debugger and MCU on it brother
Most of the SAM Dx Xplained Pro kits were around $20, but now they are close to $40 for some reason. I think it is a mistake, since prices are pulled in real time from distributors. I'll ask about that tomorrow.

 

piyushpandey wrote:
Anyway which of the ATMEL debugger costs just $40 ???????????.
ATATMEL-ICE-PCBA is available right now at $35.

     

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

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

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

alexru wrote:
Most of the SAM Dx Xplained Pro kits were around $20, but now they are close to $40 for some reason. I think it is a mistake, since prices are pulled in real time from distributors. I'll ask about that tomorrow.
Maybe so as not to compete with an Atmel Third Party.

Arduino Store USA

Arduino ZERO

http://store-usa.arduino.cc/products/abx00003

...

$49.90

...

One of its most important feature is Atmel’s Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware, significantly increasing the ease-of-use for software debugging.

EDBG also supports a virtual COM port that can be used for device programming and traditional Arduino boot loader functionality.

...

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

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

alexru wrote:

 

ATATMEL-ICE-PCBA is available right now at $35.

 

 

 

But alex this debugger can't support all of the ATMEL ARM based micorcontrollers and microprocessors as you posted earlier.

 

 

Reagrds

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

Well, who cares. At this price point, I would recommend going to competitors as well.

 

As far as I understand Atmel non-competing consists of no putting an Arduino bootloader into the MCU. This kind of makes sense for ATmega devices, but for Arduino Zero, which has a debugger on board, installing a bootloader takes 10 seconds and requires no external hardware.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

Atmel-ICE supports:

  • Programming and on-chip debugging of all Atmel AVR 32-bit MCUs on both JTAG and aWire interfaces
  • Programming and on-chip debugging of all Atmel AVR XMEGA® family devices on both JTAG and PDI 2-wire interfaces
  • JTAG and SPI programming and debugging of all Atmel AVR 8-bit MCUs with OCD support on either JTAG or debugWIRE interfaces
  • Programming and debugging of all Atmel SAM ARM Cortex-M based MCUs on both SWD and JTAG interfaces
  • Programming of all Atmel tinyAVR® 8-bit MCUs with support for the TPI interface
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel

SAM-BA Release Notes 
---------------------
Release version: 2.15
Release date: 2015

http://www.atmel.com/Images/sam-ba_2.15_releasenote.txt

...

- SAMBA 2.15 supports the following AT91SAM based microcontrollers:

...

Known Issues
------------
    - Some boards cannot connect though USB CDC to a chip (with USB Full Speed) on AMD 
      based computers.
    - Some boards cannot work properly through USB/COM port connection without reseting 
      ( or, power off / power on) the board.
    - samd20/1_xplained_pro EDBG COM port is not stable

...

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

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

piyushpandey wrote:
But alex this debugger can't support all of the ATMEL ARM based micorcontrollers and microprocessors as you posted earlier
Where did I say this? This is exactly the same board as in the Atmel-ICE, which is the newest and most feature-complete programmer for Atmel parts ans it supports all of them.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

piyushpandey wrote:
Atmel-ICE supports:
Yes, and that's pretty much all that Atmel makes. What else do you need?

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

Is any of this effort really worth it? For less than $10 I can buy a board with an Atmel Cortex M0+ and a debugger on it:

 

http://www.atmel.com/tools/ATSAM...

 

The usual reason for "open source" designs is "the manufacturer charges an arm and a leg for their own offering and we want something people can build cheaper themselves". Clearly not the case here.

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

http://www.atmel.com/products/microcontrollers/arm/sam-d.aspx?tab=documents

Select "Application Notes" then search for "SAM-BA".

Could not locate SAM-BA bootloader for SAM C (5V Cortex-M0+).

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

Last Edited: Sun. Jul 5, 2015 - 04:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Debugging... I would think that Atmel ARM Cortex M0, M4 have SWD (serial wire debug) as do most all others. This uses three wires: data, clock and GND.

Others like ST have a $20 SWD to USB pod (ST-Link/V2). I use these and it's great. Certainly Atmel has comparable.

 

No need to spend days struggling with flaky open source debugging code and DIY interfaces.

 

Last Edited: Sun. Jul 5, 2015 - 05:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No need to spend days struggling with flaky open source debugging code and DIY interfaces.

That kind of depends on whether you are willing to pay Atmel any money or not - I take it that the purpose of his thread is to devise a "no cost" solution?

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

clawson wrote:
a "no cost" (sic) solution

Well, a "no money" solution;  clearly (as this thread demonstrated) there is a time cost - quite possibly, a significant time cost!

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: Mon. Jul 6, 2015 - 09:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Yup, the reason I put "no cost" in quotes in the first place was to highlight the irony ;-)

 

(no such thing as a free lunch in this life!)