Home · |
Contains a description of a SAM-BA Applet and its runtime variables More...
Import Statement: | import SAMBA 3.2 |
commands : AppletCommand |
List of all supported commands for this applet
The supported memory erase sizes in pages This property contains a bitfield of the supported erase sizes. For example a memory with 512-bytes pages that supports 4KB (8 pages) and 32KB (64 pages) will report an erase support value of 72.
Header value that will be added before the program code. Required by ROM-code to boot from NAND memory.
The byte value that will be used to pad data when writing data that is not a round number of pages. Default is 0xff.
If true, empty pages at end of an erase block will not be written. This feature is used for NAND memories and will only work if only one erase block size is supported.
Returns the input mailbox for applet initialization
The default implementation just calls defaultInitArgs. It is intended to be overridden by Applet sub-classes/instances.
AppletCommand command(string name) |
Retrieve a command from the list of supported commands. If the command name is not found, returns undefined.
Returns the default input mailbox for applet initialization
The default mailbox contains the connection type followed by the trace level. This method is called by the default buildInitArgs implementation.
Erases a block of memory.
Erases size bytes at offset offset using the applet 'block erase' command.
Throws an Error if the applet has no block erase command or if an error occured during erasing
Load and initializes the applet.
Throws an Error if the applet could not be loaded or initialized.
Prepare a application file for use as a boot file
The default implementation enables on-the-fly patching of 6th vector. It is intended to be overridden by Applet sub-classes/instances.
Read data from the device into a file.
Reads size bytes at offset offset using the applet 'read' command and writes the data to a file named fileName.
Throws an Error if the applet has no read command or if an error occured during reading
Compares data between a file and the device memory.
Reads the contents of the file named fileName and compares it with memory at offset offset using the applet 'read' command.
If bootFile is true
, the file size will be written at offset 20 into the data before writing. This is required when the code is to be loaded by the ROM code.
Throws an Error if the applet has no read command, if an error occured during reading or if the verification failed.
Writes data from a file to the device.
Reads the contents of the file named fileName and writes it at offset offset using the applet 'write' command.
If bootFile is true
, file data will be modified to be suitable for booting, as required by the device ROM-code.
Throws an Error if the applet has no write command or if an error occured during writing or verifying.
Writes/Compares data from a file to the device memory.
Reads the contents of the file named fileName and writes it at offset offset using the applet 'write' command. The data is then read back using the applet 'read' command and compared it with the expected data.
If bootFile is true
, the file size will be written at offset 20 into the data before writing. This is required when the code is to be loaded by the ROM code.
Throws an Error if the applet has no read and write commands or if an error occured during reading, writing or verifying.
Copyright © 2018 Microchip Technology | SAM-BA Documentation |