Device Provisioner: Difference between revisions
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 188: | Line 188: | ||
| [[TI_CC2745| CC2745]] || [[TI_CC2745_HSM_Programming | CC2745 HSM Programming]] || Programming a HSM firmware to the HSM section | | [[TI_CC2745| CC2745]] || [[TI_CC2745_HSM_Programming | CC2745 HSM Programming]] || Programming a HSM firmware to the HSM section | ||
|- | |- | ||
| [[TI_CC2340| CC2340]] || [[ | | [[TI_CC2340| CC2340]] || [[TI_CC2340_Password_Authentication | CC2340 Password Authentication]] || Password based authentication | ||
|- | |- | ||
! colspan="3" | Toshiba | ! colspan="3" | Toshiba |
Latest revision as of 10:35, 4 September 2025
The Device Provisioner (DevPro) is a command line utility that supports provisioning of target devices (debug authentication, lifecycle management, ...).
Availability
DevPro is part of the J-Link software package and Flasher software package since V7.96.
It can be used with J-Link, J-Trace and Flasher probes/programmers.
Usage
DevPro [options] script-file
Option | Default | Description |
---|---|---|
-USB <Serial number>/<Nickname> | Not set | Select USB as host interface. |
-IP <Hostname>/<Serial number>/<Nickname> | Not set | Select TCP/IP as host interface. |
-if <SWD>/<JTAG> | Not set | Select SWD or JTAG as target interface. |
-speed <n> | Not set | Set interface speed to n kHz. |
-operation <Operation name> | Not set | Perform an operation from a script file. |
-SetConfigVal <"Name=Value"> | Not set | Set a parameter for an operation. |
-ScriptFile <Filename.pex> | Not set | Set a script file to be executed. |
-Module <ModuleIndex> | Not set | Selects the module to communicate with (Supported for Flasher Hub models only). Supported since V8.12e |
Usage of the particular operations are described in the corresponding knowledge base page (listed in the section Supported Devices and Features) for that Device/Feature.
Demo
The following examples are simple demonstrations of custom script function declaration and passing of parameters to those functions.
HelloWorld()
Outputs "Hello World!" to the command line. It can be executed using the following command line parameters:
DevPro.exe -if swd -speed 1000 -operation HelloWorld -ScriptFile <PATH_TO_SCRIPT>\DeviceProvisioner_Demo_HelloWorld.JLinkScript
int HelloWorld(void) {
JLINK_SYS_Report("Hello World!");
return 0;
}
Add()
Takes two parameters, adds them together and outputs the result. It can be executed using the following command line parameters:
DevPro.exe -if swd -speed 1000 -operation Add -SetConfigVal a=5 -SetConfigVal b=3 -ScriptFile <PATH_TO_SCRIPT>\DeviceProvisioner_Demo_Add.JLinkScript
int Add(void) {
U32 a;
U32 b;
U32 c;
int r;
//
// Get input parameters
//
r = JLINK_GetConfigValue("a", &a);
if (r < 0) {
JLINK_SYS_Report("Error! Parameter a not specified");
return -1;
}
r = JLINK_GetConfigValue("b", &b);
if (r < 0) {
JLINK_SYS_Report("Error! Parameter b not specified");
return -1;
}
//
// Output input parameters
//
JLINK_SYS_Report1("Input parameter a=", a);
JLINK_SYS_Report1("Input parameter b=", b);
//
// Add parameters
//
c = a + b;
//
// Output result
//
JLINK_SYS_Report1("a+b = ", c);
return 0;
}
Echo()
Takes one input string and outputs it. It can be executed using the following command line parameters:
DevPro.exe -if swd -speed 1000 -operation Echo -SetConfigVal "Input=This is an input string" -ScriptFile <PATH_TO_SCRIPT>\DeviceProvisioner_Demo_Echo.JLinkScript
int Echo(void) {
U8 Input[256];
int r;
//
// Get input string
//
r = JLINK_GetConfigData("Input", &Input[0], 256);
if (r < 0) {
JLINK_SYS_Report("Error! DataFile not specified");
return -1;
}
//
// Output string
//
JLINK_SYS_Report(&Input[0]);
return 0;
}
Additional features
V7.96a
Script file search sequence
If a script file is not specified with a absolute path, that file will be searched in the following order:
1) In the current working directory
2) In the "Script" folder relative to Device Provisioner executable path (Default script files)
Example Output
C:\> DevPro -operation DbgAuthDiscover -if SWD -speed 4000 -ScriptFile PCode_DevPro_ST_STM32H5.pex SEGGER Device Provisioner V7.96 Compiled Mar 7 2024 16:48:58 'q' to quit '?' for help Command line: -operation DbgAuthDiscover -if SWD -speed 4000 -ScriptFile PCode_DevPro_ST_STM32H5.pex J-Link log: Found device with ID: 0x00000474 J-Link log: Product state: J-Link log: OPEN
Supported Devices and Features
The following table lists supported devices and features.
Supported Devices | Supported features | Description |
---|---|---|
ST Microelectronics | ||
STM32F0 | STM32F0 Option Bytes Unlock | STM32F0 Option Bytes Unlock / Reset to default values. |
STM32F1 | STM32F1 Option Bytes Unlock | STM32F1 Option Bytes Unlock / Reset to default values. |
STM32F2 | STM32F2 Option Bytes Unlock | STM32F2 Option Bytes Unlock / Reset to default values. |
STM32F3 | STM32F3 Option Bytes Unlock | STM32F3 Option Bytes Unlock / Reset to default values. |
STM32F4 | STM32F4 Option Bytes Unlock | STM32F4 Option Bytes Unlock / Reset to default values. |
STM32H5 | STM32H5 Security Product Lifecycle | STM32H5 Security Product Lifecycle management: debug authentication, data provisioning, device regression, product state transitions. |
STM32U0 | STM32U0 Option Bytes Programming | STM32U0 Option Bytes Programming and RDP protection management: setting passwords RDP1 and RDP2 protection, device unlocking, flash write protection, hide protection area configuration. |
STM32U3 | STM32U3 Option Bytes Programming | STM32U3 Option Bytes Programming and RDP protection management: setting passwords RDP1 and RDP2 protection, device unlocking, flash write protection. |
STM32U5 | STM32U5 Option Bytes Programming | STM32U5 Option Bytes Programming and RDP protection management: setting passwords RDP1 and RDP2 protection, device unlocking, flash write protection. |
STM32WB0 | STM32WB0 Security Product Lifecycle | STM32WB0 Security Product Lifecycle management: readout protection, SWD debug disable. |
STM32WBA | STM32WBA Option Bytes Programming | STM32WBA Option Bytes Programming and RDP protection management: setting passwords RDP1 and RDP2 protection, device unlocking, flash write protection. |
GigaDevice | ||
GD32F4 GD32A4 |
GD32F4 and GD32A4 Option Bytes Programming | GD32F4(except GD32F403) and GD32A4 Option Bytes Programming. |
GD32F5 | GD32F5 Option Bytes Programming | GD32F5 Option Bytes Programming. |
GD32H7 | GD32H7 Option Bytes Programming | GD32H7 Option Bytes Programming. |
GD32W515 | GD32W5 Option Bytes Programming | GD32W5 Option Bytes Programming. |
GD32VW5 | GD32VW5 Option Bytes Programming | GD32VW5 Option Bytes Programming. |
Texas Instruments | ||
CC2745 | CC2745 HSM Programming | Programming a HSM firmware to the HSM section |
CC2340 | CC2340 Password Authentication | Password based authentication |
Toshiba | ||
SmartMCD | SmartMCD Password Protection | Password Protection of the device |
Nations | ||
N32H76x N32H78x |
N32H7x Option Bytes Programming | N32H7x Option Bytes Programming |