The elcap device subcommands provide functionality for interacting with physical devices in a variety of ways. This ranges from discovering what devices can be seen by your computer to locking down the flash on an MCU so it cannot be read out. Each of these commands have command line –options for executing the commands. These options are situationally required so they are not all needed for every command use case. This document will go over when each of the options for each command is required and how to use them. This information can also be gotten from running elcap with the --help option.
Shows all connected programmers/devices over USB and IP.
Read device information including the EUI64 (Extended Unique Identifier) from the connected device.
| --option | description | default |
|---|---|---|
| --usb | USB serial number of the JLink device | None |
| --ip | IP address of the JLink device | None |
| --alias | Alias for the JLink device | None |
| --target | Chip target - 'T32CM11C' or 'T32CZ20B' | None or chip from project directory |
| --interface | Programming interface | SWD |
| --speed | Programming speed | 4000 |
| --help | Print help for this sub-command | None |
NOTE: The --usb, --ip, and --alias options are mutually exclusive - only use one at a time to identify the device.
Erase internal flash on a device. By default, this preserves the token space and only erases the application flash. Use the --all option to erase the entire flash including tokens.
| --option | description | default |
|---|---|---|
| --usb | USB serial number of the JLink device | None |
| --ip | IP address of the JLink device | None |
| --alias | Alias for the JLink device | None |
| --target | Chip target - 'T32CM11C' or 'T32CZ20B' | None or chip from project directory |
| --interface | Programming interface | SWD |
| --speed | Programming speed | 4000 |
| --all | Erase entire flash (application and token space) | False |
| --help | Print help for this sub-command | None |
NOTE: The --usb, --ip, and --alias options are mutually exclusive - only use one at a time to identify the device.
If no device identifier is provided, elcap will prompt you to select from available devices.
Using USB serial number:
Using IP address:
Using alias:
Erase a specified address range of flash memory. This allows for granular control over which sectors of flash are erased without affecting the entire chip.
| argument | description | required |
|---|---|---|
| start_addr | Flash start address | Yes |
| stop_addr | Flash stop address | Yes |
| --option | description | default |
|---|---|---|
| --usb | USB serial number of the JLink device | None |
| --ip | IP address of the JLink device | None |
| --alias | Alias for the JLink device | None |
| --target | Chip target - 'T32CM11C' or 'T32CZ20B' | None or chip from project directory |
| --interface | Programming interface | SWD |
| --speed | Programming speed | 4000 |
| --help | Print help for this sub-command | None |
NOTE: The --usb, --ip, and --alias options are mutually exclusive - only use one at a time to identify the device.
If no device identifier is provided, elcap will prompt you to select from available devices.
Using USB serial number:
Using IP address:
Using alias:
Enable flash readout protection on the target MCU to prevent unauthorized access to firmware. Device lock exists to protect the MCU's flash from being read out. Different chips have different requirements to enable this feature which means not all command line --options are required for every chip.
| --option | description | default |
|---|---|---|
| --usb | USB serial number of the JLink device | None |
| --ip | IP address of the JLink device | None |
| --alias | Alias for the JLink device | None |
| --target | Chip target - 'T32CM11C' or 'T32CZ20B' | None or chip from project directory |
| --interface | Programming interface | SWD |
| --speed | Programming speed | 4000 |
| --port | Serial port (e.g., /dev/ttyUSB0, COM3) | None |
| --confirm | Auto-confirm device lock without interactive prompt | False |
| --help | Print help for this sub-command | None |
NOTE: The --usb, --ip, and --alias options are mutually exclusive - only use one at a time to identify the device.
WARNING: It is not possible to unlock this chip! Proceed with caution...
The T32CM11C uses permanent flash readout protection. Once locked, the device cannot be unlocked using elcap commands. See SDK Documentation for unlock options.
Auto-confirm without interactive prompt:
Lock specific device:
Coming soon...
Device unlock is intended to disable the flash readout protection that is enabled using the elcap device lock command. Again, different chips have different interfaces so not all --options are required for all chips.
Unlocking is not supported for this chip. See SDK Documentation for unlock options.
Coming soon...
Connect to a device via serial terminal for logging and CLI access. This command opens an interactive serial terminal session for communicating with the device's UART interface. Press Ctrl+C to exit the terminal.
| --option | description | default |
|---|---|---|
| --port, -p | Serial port (e.g., /dev/ttyUSB0, COM3) | None |
| --baudrate, -b | Baud rate (common values: 115200, 230400) | 115200 |
| --databits, -d | Data bits (5, 6, 7, 8) | 8 |
| --stopbits, -s | Stop bits (1, 1.5, 2) | 1 |
| --parity | Parity (none, odd, even, mark, space) | none |
| --flow, -f | Flow control (none, xonxoff, rtscts) | none |
| --help | Print help for this sub-command | None |
Auto-select port (prompts if multiple ports available):
Specify port:
Custom baud rate:
Full configuration:
Using short option names:
NOTE: If no port is specified, elcap will list available serial ports and prompt you to select one. If only one port is available, it will be selected automatically.
Assign or update a device alias/nickname. The alias is stored directly on the J-Link device so it will persist across different computers. This allows you to refer to devices by friendly names instead of serial numbers or IP addresses.
| --option | description | default |
|---|---|---|
| --usb | USB serial number of the JLink device | None |
| --ip | IP address of the JLink device | None |
| --alias | Existing alias to select the device | None |
| --name, -n | New alias to assign to the device | None |
| --unset | Remove alias/nickname from device (cannot be used with –name) | False |
| --help | Print help for this sub-command | None |
NOTE: The --usb, --ip, and --alias options are mutually exclusive - only use one at a time to identify the device. The --name and --unset options are also mutually exclusive.
Auto-select device and prompt for alias:
Rename specific device by USB serial:
Rename specific device by IP:
Rename using existing alias:
Using short option:
Remove alias from specific device:
NOTE: Aliases must not exceed 31 characters. If no device identifier is provided, elcap will prompt you to select from available devices.