Program ATtiny817 via UPDI without Atmel Studio?

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

I'd like to have a minimal setup (batch file, atprogram.exe, etc.) that will allow programming an ATtiny817 with Atmel-ICE over UPDI without needing Atmel Studio to be installed.  Right now, I'm using the "Production ELF file" facility within AS to program my boards:

 

 

Anyone know how to accomplish this or knows where I can find the information I need?

Thanks

Letting the smoke out since 1978

 

 

 

 

Last Edited: Wed. Mar 27, 2019 - 01:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The program is in your installation called atprogram.exe (it's what that GUI above feeds into anyway).

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

Yes, I've found atprogram.exe in my AS installation but its help output when run naked on the command line is quite daunting!  Any idea on how to capture what AS is feeding to it in my situation above?  AS doesn't seem to have much in the way of console output for this operation.

Letting the smoke out since 1978

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
atprogram --tool <tool> --interface <interface> --device <device> program -f <path to elf>

... should at least get you going... 

 

ut its help output when run naked on the command line is quite daunting!

It's a cli, so it can do a lot of things :) 

 

Any idea on how to capture what AS is feeding to it in my situation above?

Technically, it doesn't. There's a common component called 'atbackend' that both Atmel Studio and atprogram talks to to do any program/debug operation.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

atprogram.exe help program

 

this will give you some hints...

 

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

Thanks all, for the hints.  The command line help built into atprogram.exe is pretty good so through that I learned how to replicate the VS functionality I cited above with:

atprogram -t atmelice -i updi -d attiny817 program -c -fl -fs --verify -f myApp.elf

Next, I copied atprogram.exe and myApp.elf to a USB stick so that I could take it to another computer without AS installed to test.  Here is the result of the test on the other computer:

E:\>atprogram -t atmelice -i updi -d attiny817 program -c -fl -fs --verify -f myApp.elf
[ERROR] Could not find atbackend.exe

I added atbackend.exe to my USB stick and tried again:

E:\>atprogram -t atmelice -i updi -d attiny817 program -c -fl -fs --verify -f myApp.elf
[ERROR] An unexpected error occurred when executing.
Traceback (most recent call last):
  File "atmel\atprogram.py", line 48, in run
  File "atmel\avr\cli\commandline.py", line 54, in execute_commands
  File "atmel\avr\cli\commandexecutor.py", line 52, in execute_commands
  File "atmel\avr\cli\resourcemanager.py", line 44, in prepare_resources
  File "atmel\avr\cli\resourcemanager.py", line 51, in _prepare_resource
  File "atmel\avr\cli\resourcecontainers.py", line 54, in allocate
  File "atmel\avr\cli\backend.py", line 134, in start
  File "subprocess.py", line 710, in __init__
  File "subprocess.py", line 958, in _execute_child
WindowsError: [Error 193] %1 is not a valid Win32 application

Obviously atprogram.exe not a completely stand alone program.

Is it even possible to do what I'm attempting?

 

Thanks

Letting the smoke out since 1978

 

 

 

 

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

No, it is not standalone at all...
.
Tried to Google? I know we have a knowledge base article somewhere on microchip.com

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

blush  I feel pretty silly now.  The knowledge base article is the first hit in google.  Thanks!

Letting the smoke out since 1978