program-m16c¶
CLI reference¶
glasgow run program-m16c¶
Read and write Renesas M16C series microcomputer integrated Flash memory via asynchronous serial interface (“Mode 2” in Renesas terminology).
If provided, this applet will drive the reset and bootloader mode pins. However, it will not drive the bootloader serial interface mode pin, which must be strapped externally to select Mode 2. Consult the datasheet for details.
usage: glasgow run program-m16c [-h] [-V SPEC] [--rx PIN] [--tx PIN]
[--reset PIN] [--cnvss PIN] [-b RATE]
[-k HEX-ID]
OPERATION ...
- -h, --help¶
show this help message and exit
- -V <spec>, --voltage <spec>¶
configure I/O port voltage to SPEC (e.g.: ‘3.3’, ‘A=5.0,B=3.3’, ‘A=SA’)
- --rx <pin>¶
bind the applet I/O line ‘rx’ to PIN (default: ‘A0’, required)
- --tx <pin>¶
bind the applet I/O line ‘tx’ to PIN (default: ‘A1’, required)
- --reset <pin>¶
bind the applet I/O line ‘reset’ to PIN (default: ‘A2’, optional)
- --cnvss <pin>¶
bind the applet I/O line ‘cnvss’ to PIN (optional)
- -b {9600,19200,38400,57600,115200}, --baud {9600,19200,38400,57600,115200}¶
set baud rate to RATE bits per second (default: 9600)
- -k <hex-id>, --key <hex-id>¶
unlock bootloader with key(s) HEX-ID (default: 00000000000000, FFFFFFFFFFFFFF)
glasgow run program-m16c erase¶
usage: glasgow run program-m16c erase [-h]
- -h, --help¶
show this help message and exit
glasgow run program-m16c erase-block¶
usage: glasgow run program-m16c erase-block [-h] ADDRESS
- address¶
erase block at address ADDRESS, which must be page-aligned
- -h, --help¶
show this help message and exit
glasgow run program-m16c program¶
usage: glasgow run program-m16c program [-h] ADDRESS FILENAME
- address¶
program memory from address ADDRESS, which must be page-aligned
- filename¶
program memory contents from binary file FILENAME, which must be a multiple of page size long
- -h, --help¶
show this help message and exit
glasgow run program-m16c read¶
usage: glasgow run program-m16c read [-h] ADDRESS LENGTH FILENAME
- address¶
read memory from address ADDRESS, which must be page-aligned
- length¶
read LENGTH bytes from memory, which must be a multiple of page size
- filename¶
read memory contents to binary file FILENAME
- -h, --help¶
show this help message and exit
API reference¶
- exception glasgow.applet.program.m16c.M16CBootloaderError¶
- class glasgow.applet.program.m16c.ProgramM16CInterface(logger: Logger, assembly: AbstractAssembly, *, rx: GlasgowPin, tx: GlasgowPin, reset: GlasgowPin | None = None, cnvss: GlasgowPin | None = None, timeout: float = 1.0)¶
- async reset_application()¶
Reset the target into the application.
- async reset_bootloader()¶
Reset the target into the ROM bootloader.
- async sync_bootloader()¶
Reset the target into the ROM bootloader and synchronize with it at 9600 baud.