SAM-BA® ISP - Monitor Commands

Introduction

The SAM-BA® Monitor program, controlled by the SAM-BA Host application program, performs basic internal memory read, write, and execute commands. It is embedded in theROM Boot Code of the target device (Microchip Technology ARM®-based MPU or MCU). The SAM-BA Monitor communicates with the SAM-BA Host over a serial communications link.

TheSAM-BA Host to Monitor serial communications link is a dedicated serial port separate from theTarget Console serial communications.

Executing Monitor Commands

SAM-BA Monitor commands can be executed from the SAM-BA Host using the-m, --monitor option.

DO NOT use the Monitor (-m, --monitor) option on the same command line with the Applet (-a, --applet) or Execute (-e, --execute) options. However, many-m, --monitor options can be passed on the same command line.

Monitor (-m, --monitor) commands depend on the selected Port (-p, --port) option. Thesam-ba -p <port> -m help command will display all supported monitor commands for a given<port> connection:

$sam-ba -p serial -m help

* read8 - read a byteSyntax:    read8:<addr>Example:    read8:0x200000  read a byte at address 0x200000* read16 - read a half-word (16-bit)Syntax:    read16:<addr>Example:    read16:0x200000  read a half-word at address 0x200000* read32 - read a word (32-bit)Syntax:    read32:<addr>Example:    read32:0x200000  read a word at address 0x200000* read - read data into a fileSyntax:    read:<filename>:<addr>:<length>Example:    read:test.bin:0x200000:512  read 512 bytes from address 0x200000 into file test.bin* write8 - write a byteSyntax:    write8:<addr>:<value>Example:    write8:0x200000:0x12  write byte 0x12 at address 0x200000* write16 - write a half-word (16-bit)Syntax:    write16:<addr>:<value>Example:    write16:0x200000:0x1234  write half-word 0x1234 at address 0x200000* write32 - write a word (32-bit)Syntax:    write32:<addr>:<value>Example:    write32:0x200000:0x12345678  write word 0x12345678 at address 0x200000* write - write data from a fileSyntax:    write:<filename>:<addr>Example:    write:test.bin:0x200000  write data from file test.bin to address 0x200000* execute - execute codeSyntax:    execute:<addr>Example:    execute:0x200000  execute code at 0x200000