2.1 Atprogram Application Usage

For atprogram application usage, refer to the following description:

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

Options:

  • -t --tool <arg>: Tool name: Atmel-ICE, AVR Dragon, AVR ISP mkII, AVR ONE, JTAG ICE3, JTAG ICE mkII, QT600, STK500, STK600, SAM-ICE, EDBG, MEDBG, Power Debugger, Mega DFU or FLIP.
  • -s --serialnumber <arg>: The programmer/debugger serial number. Must be specified when more than one debugger is connected.
  • -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.
  • -l --logfile <arg>: Log file for atpbackend output.
  • -f --force: Force command even if the 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 10 MHz.
  • -mb --max-baudrate <arg>: The maximum baud rate for communication on aWire (bps).
  • -xr --external reset: Apply external reset when starting a session.
  • -tv --target-voltage <arg>: Set the STK600, STK500, or Power debugger 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.
  • -? --help: Display help information.
  • -V --version: Display version information.

Commands:

  • calibrate: Performs the oscillator calibration procedure.
  • chiperase: Full erase of chip.
  • dwdisable: Disable DebugWIRE interface.
  • erase: Erase the specified memory.
  • help: Display help for a specific command.
  • info: Display information about a device.
  • program: Program device with data from <file>.
  • read: Read the contents of the memory on the device.
  • reset: Reset all domains and jump to the reset vector.
  • secure: Set the security bit on UC3 and ARM devices.
  • selftest: Performs the self-test procedure on Atmel-ICE.
  • verify: Verify content of memory based on a file.
  • write: Write to the memory with values entered on the command line.

Arguments or more command specific help:

  • Use atprogram help <command> to get more command usage information.

Example:

  • atprogram -t atmelice -i ISP -d ATmega328PB program -f file.elf

    Program file.elf image to ATmega328PB flash with Atmel-ICE tool, ISP interface.

  • atprogram -t atmelice -i ISP -d ATmega328PB chiperase

    Full erase ATmega328PB chip with Atmel-ICE tool, ISP interface.