SAM-BA® ISP - Applets

Introduction

SAM-BA® Applets are binary programs that are loaded and executed in the target device RAM by the SAM-BA Host program.

Applet programs are loaded and executed by the SAM-BA Host program by including the -a, --applet option on the command line:

$ sam-ba -p <port> -d <device> -a <applet>[:arg1>:<arg2>:<arg3>:…]
or
$ sam-ba -p <port> -b <board> -a <applet>[:arg1>:<arg2>:<arg3>:…]

DO NOT use the Monitor (-m, --monitor) or Scripting (-e, --execute) options on the same command line with the Applet (-a, --applet) option.

Applet programs support commands and arguments to customize their behavior. The command has the following structure:

$ sam-ba -p <port> -d <device> -a <applet> [-c <command1[:<arg1_1>:<arg1_2>:…]

More than one Applet command can be added to the command line:

$ sam-ba -p <port> -d <device> -a <applet> [-c <command1>[:<arg1_1>:<arg1_2>:…] -c <command2>[:<arg2_1>:<arg2_2>:…] -c <command3>[:<arg3_1>:<arg3_2>:…] …]

Applet Console

Applet programs provide tracing information to the Target Console (also referred to as the Applet Console). The Target Console is typically configured by the boot configuration in the target device. However, the Console can be explicitly configured by the console_instance and console_ioset arguments of the -d, --device option.

$ sam-ba -p <port> -d <device>:<console_instance>:<console_ioset>

$ sam-ba -p serial -d sama5d2:help

Syntax: sama5d2:[<instance>]:[<ioset>]
Parameters:
    instance   Serial console peripheral number
    ioset      Serial console I/O set
Examples:
    sama5d2       use default device/board settings
    sama5d2:1:2   use fully custom settings (peripheral number 1, I/O set 2)
    sama5d2::2    use default device/board settings but force use of I/O set 2
Note:
    Peripheral numbers and I/O sets are device specific. Please see device documentation in 'doc' directory.

Tracelevel Verbosity

The level of Applet Console verbosity can be controlled with the -t, --tracelevel option:

$ sam-ba -p <port> -d <device> -t n -a <applet> [-c <command1[:<arg1_1>:<arg1_2>:…]

where n specifies the level:

  • 0: no trace
  • 1: fatal error
  • 2: error
  • 3: warning
  • 4: info
  • 5: debug

Applets

A listing of supported Applets for a given target device can be found with the help argument:

$ sam-ba -p <port> -d <device> -a help

Applet programs can perform the following utility functions:

© 2020 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.