standalone portable SWD programmer for Atmel ARM chips

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

Hi,

I have designed several devices in recent years based on SAMD21,E53,E70.

Some customers need firmware update and the devices do not have bootloader.

Providing ATMEL-ICE to everybody would be too expensive and explanation of reprogramming too complex.

So I need an easy & cheap portable programmer that would have hexfiles stored in some SPI-Flash or SD card and would do all programming automatically,

on single button hit.

Does there exist any such device ?

 

Or even better - is there available source code that makes programming via SWD ?

I mean bare metal code for some microcontroller, without PC/Linux/USB stuff, just routines needed for the programming.

Something that could be easily ported to SAMD21 or SAMD51.

If I understand, it probably must work with CMSIS-DAP interface.

 

 

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

Hi ezharkov, thanks for the links.

I find this project very usefull, for study, everything needed is contained.

But it still needs a lot of work on merging the console app side & D11 micro firmware and removing all USB stuff..

 

Wish I had detailed documentation for Flash erase/write/read operations via  CMSIS-DAP for Atmel, does is exist ?

I can imagine following such a documentation and writing my own code could be faster that understanding somebody else's code.

I made a programmer for PIC18s in past and Microchip's docu for programming was easy to follow.

 

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

Have a look at the openocd code - I think it supports quite a few Atmel SAM devices. CMSIS-DAP itself is standardised but each chip has it's own memory layout/flash programming methods.

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

Yeah, this would be an interesting project/product. Although, from experience, the rabbit hole runs much deeper than it would appear at first glance.

 

Steve

 

Maverick Embedded Technologies Ltd. Home of wAVR and Maven.

wAVR: WiFi AVR ISP/PDI/uPDI Programmer.

Maven: WiFi ARM Cortex-M Debugger/Programmer

https://www.maverick-embedded.co...

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

"Wish I had detailed documentation for Flash erase/write/read operations via  CMSIS-DAP for Atmel, does is exist ?" - In one place? Probably not. In a sense these are two completely different things and I'm not sure why someone would try document them in one place. CMSIS-DAP is a generic ARM interface that allows you to read/write registers in a microcontroller. It knows nothing about the actual Atmel registers for erasing/writing/reading flash. As for the Atmel registers, well, they are documented in the Atmel datasheets (and in generic Cortex user guides).

"I can imagine following such a documentation and writing my own code could be faster that understanding somebody else's code" - I thought so too. But eventually found out that in this case it was more productive to understand somebody else's code. I also looked at the openocd code, but found ataradov's code easier to understand (perhaps because it's just Atmel and therefore a much simpler project).

 

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

Wish I had detailed documentation for Flash erase/write/read operations via  CMSIS-DAP for Atmel, does is exist ?

I think *Most* "flash operations" on ARM (via CMSIS-DAP) are done by:

  1. Write a small bit of run-from-ram code, to RAM, that will interact with whatever flash controller is present in the chip and is capable of writing a chunk of stuff from a RAM buffer to the flash.  This code of course is quite chip-specific.
  2. Write a bunch of the data to be programmed to a RAM buffer.
  3. Execute the code you uploaded in (1)
  4. if not done, go to (2)