Can I Opend Device Programming without open Atmel Studio ?

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

Can I Opend Device Programming without open Atmel Studio ?

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

You can use AVRDUDE to program most AVR MCUs without Atmel Studio, if that is what you mean. No debug, but you can program.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

You can also use atprogram.exe from the command line.

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

Not Work.

 

'C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe' -t avrispmk2 -cl 500khz -d ATmega328P program 1.elf

'C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe' -t avrispmk2 -cl 500khz -d ATmega328P program -t 1.elf

'C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe' -t avrispmk2 -cl 500khz -d ATmega328P program -t D:\1.elf

'C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe' -t avrispmk2 -cl 500khz -d ATmega328P program -t 'D:\1.elf'

 

The file, directory, or volume name syntax is incorrect.

 

 

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

geva wrote:
The file, directory, or volume name syntax is incorrect.

Is that a message from Windows, or from  atprogram.exe ?

 

Are you sure the single 'quotes' are correct? Shouldn't they be double "quotes" ... ?

 

EDIT

 

like this:

 

Last Edited: Fri. Sep 29, 2017 - 08:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, work.

 

But.

 

1) If I double click on the batch, he tells me.

Interrupted by user.
End the batch process (S / N) ?

 

I have to do, right button on the batch and choose run.

 

2) If i made two line for program and verify, the delay send my circuit in crisis. Using Atmel's studio does not happen.

 

:LOOP
cls

"C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe" -t avrispmk2 -i isp -cl 500khz -d ATmega328P program -f "D:\Documents\Project\Reti e WiFi\48V mimosa\fw5cell\BatteryPoEaf.elf"
"C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe" -t avrispmk2 -i isp -cl 500khz -d ATmega328P verify -f "D:\Documents\Project\Reti e WiFi\48V mimosa\fw5cell\BatteryPoEaf.elf"

pause
goto LOOP

 

Can i make verify on the same command ?

 

3) It program me bit and fuse

 

4) How can I do for, make verify only if programming is ok?

it program ok then verify

 

Last Edited: Fri. Sep 29, 2017 - 08:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

geva wrote:
 If I double click on the batch

What "batch" ?

 

 

If you just run it without options, it gives you help:

 

C:\Users\awn>"C:\Program Files (x86)\Atmel\Studio\7.0\7.0\atbackend\atprogram"
[ERROR] No command specified.
Atmel Studio Command Line Interface
Copyright (C) 2015 Atmel Corporation.

Usage: atprogram [options] <command> [arguments] [<command> [arguments] ...]

Options:
  -t  --tool <arg>           Tool name: avrdragon, avrispmk2, avrone, jtagice3,
                             jtagicemkii, qt600, stk500, stk600, samice, edbg,
                             medbg, atmelice, powerdebugger, megadfu or flip.
  -s  --serialnumber <arg>   The programmer/debugger serialnumber. Must be
                             specified when more than one debugger is
                             connected.
  -c  --comport <arg>        The com port to use for the programmer/debugger.
                             e.g. -c COM1 or -c 1
  -i  --interface <arg>      Physical interface: aWire, debugWIRE, HVPP, HVSP,
                             ISP, JTAG, PDI, UPDI, TPI or SWD.
  -d  --device <arg>         Device name. E.g. atxmega128a1 or at32uc3a0256.
  -v  --verbose              Verbose output (debug).
  -h  --host <arg>           Target host which runs the backend process.
  -p  --port <arg>           Specify which port to use for the backend process.
                             Ignored if the host option is not given.
  -l  --logfile <arg>        Log file for atpbackend output.
  -f  --force                Force command even if firmware is not up to date.
  -cl --clock <arg>          The frequency to use for communication with a
                             device (hz, khz, mhz, default hz). E.g. -cl 10mhz
  -mb --max-baudrate <arg>   The maximum baud rate for communication on awire
                             (bps).
  -xr --externalreset        Apply external reset when starting a session.
  -dc --daisychain <args,..> Set up a JTAG daisychain. Arguments are <devices-
                             before devices-after instr-before instr-after>.
  -dca --daisychain_auto <arg>
                             Set up a JTAG daisychain. Arguments are <selected-
                             deviceindex> for automatically selecting device in
                             jtag chain - Auto selection is supported only for
                             SAM devices.
  -sa --snippet_addr <arg>   Address where flash programming ram snippet should
                             be loaded.
  -nr --no_ram               Do not use ram snippet to program flash.
  -tv --target-voltage <arg> Set the STK600, STK500 or Powerdebugger target
                             voltage (float value).
  -a0 --aref0 <arg>          Set the STK600 Aref0 or STK500 aref generator
                             voltage (float value).
  -a1 --aref1 <arg>          Set the STK600 Aref1 generator voltage (float
                             value).
  -cg --clock-generator <arg> Set the STK600 or STK500 clock generator frequency
                             (hz, khz, mhz, default hz).
      --timeout <arg>        Set the timeout value in seconds for commands. The
                             default is 180 seconds. Set to 0 for no timeout.
  -q  --quiet                Do not display activity indicator.
  -?  --help                 Display help information.
  -V  --version              Display version information.
  -cf --configfile <arg>     Set the configuration setting file name with path.
  -ua --12v-updi-activation  Use the 12V activation sequence for UPDI.
                             Disconnect any peripheral on the UPDI line which
                             are not 12V tolerant.

Commands:
   calibrate  Performs the oscillator calibration procedure.
   chiperase  Full erase of chip.
   dwdisable  Disable debugWIRE interface.
   erase      Erase the specified memory.
   exitcodes  Display possible exit codes for atprogram.
   help       Displays help for a specific command.
   info       Display information about a device.
   interactive Run in interactive mode.
   list       Detect and print information about connected Atmel Tools.
   migration  Display help for migration from old command line utilities.
   panel      Pops-up Tool's settings Dialog.
   parameters Sets given parameters on the given tool without doing anything else.
   powercalibration Performs the calibration procedure for the Powerdebugger.
   program    Program device with data from <file>.
   read       Read the contents of the memory on the device.
   reboot     Reboots the given tool.
   reset      Reset all domains and jump to the reset vector.
   secure     Set the security bit on UC3 and ARM devices.
   selftest   Performs the selftest procedure on Atmel-ICE.
   verify     Verify content of memory based on a file.
   version    Display the version.
   write      Write to the memory with values entered on the command line.

Arguments:
  Use atprogram help <command> to get available attributes.

Example:
  atprogram -t jtagice3 -i jtag -d at32uc3b0512 program -f e:\file.elf
  atprogram -t avrone -i pdi -d atxmega128a1 chiperase

For command specific help, use atprogram help <command>

C:\Users\awn>

 

Last Edited: Fri. Sep 29, 2017 - 08:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is program.bat

 

:LOOP
cls

"C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe" -t avrispmk2 -i isp -cl 500khz -d ATmega328P program -f "D:\Documents\Project\Reti e WiFi\48V mimosa\fw5cell\BatteryPoEaf.elf"
"C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe" -t avrispmk2 -i isp -cl 500khz -d ATmega328P verify -f "D:\Documents\Project\Reti e WiFi\48V mimosa\fw5cell\BatteryPoEaf.elf"

pause
goto LOOP

 

I did not find the solution by reading the help.

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

geva wrote:
I did not find the solution 

It's not clear what the problem is!

 

Why on earth would you put this in a loop??

 

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

To program many boards.

 

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

Firmware check OK
Programming completed successfully.
Firmware check OK
[ERROR] Verification at address 0x00 failed. Expected: 0x0C. Actual: 0xFF.

Press a key to continue. . .

 

Verify not work because the fuses have been programmed.

Last Edited: Fri. Sep 29, 2017 - 09:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

geva wrote:
Verify not work because the fuses have been programmed.

So don't do that, then!

 

 

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

This work.

 

:LOOP
echo off
cls

"C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atprogram.exe" --tool avrispmk2 --interface isp --clock 500khz --device ATmega328P program --chiperase --verify -f "D:\Documents\Project\Reti e WiFi\48V mimosa\fw5cell\BatteryPoEaf.elf"

pause
goto LOOP

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

Excellent. 

 

So mark the thread as solved: http://www.avrfreaks.net/comment...

 

(though I still don't see why you'd want it in a loop??)

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

awneil wrote:
(though I still don't see why you'd want it in a loop??)
It saves one mouse click each time ;-)

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

geva wrote:
-cl 500khz

 

Isn't that too fast for a 1MHz system clock  (isp speed must be below 1/4 cpu clock rate)?

 

 

Jim