Difference between revisions of "J-Link Multiple Flashloader"
(→How to) |
(→Selecting a specific flashloader) |
||
Line 10: | Line 10: | ||
The device name of the used device can be extended with the flashbank address and the loader name. |
The device name of the used device can be extended with the flashbank address and the loader name. |
||
==== Syntax ==== |
==== Syntax ==== |
||
− | <tt>-device <DeviceName>?BankAddr=<FlashBankBase>&Loader=<LoaderName></tt> |
+ | <tt>-device "<DeviceName>?BankAddr=<FlashBankBase>&Loader=<LoaderName>"</tt> |
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|- |
||
Line 22: | Line 22: | ||
|} |
|} |
||
==== Example ==== |
==== Example ==== |
||
− | <tt>-device STM32H743ZI?BankAddr=0x90000000&Loader=CLK@PF10_nCS@PB6_D0@PF8_D1@PF9_D2@PF7_D3@PF6</tt> |
+ | <tt>-device "STM32H743ZI?BankAddr=0x90000000&Loader=CLK@PF10_nCS@PB6_D0@PF8_D1@PF9_D2@PF7_D3@PF6"</tt> |
=== J-Link Script File === |
=== J-Link Script File === |
||
With the J-Link Script File function JLINK_ExecCommand() a different loader can be selected. |
With the J-Link Script File function JLINK_ExecCommand() a different loader can be selected. |
Revision as of 08:49, 29 July 2022
J-Link features support for multiple flashloader per flashbank. Additionally to the devices where J-Link already has built-in support for multiple loader, the user may choose to add support for a different flashloader.
Contents
Use case
Having multiple flashloader for the same device can be useful e.g. if a SPI flashbank shall be programmed, but the default flashloader uses a different pin configuration compared to the hardware. In this case selecting a different flashloader with a compatible pin configuration can be the solution.
Selecting a specific flashloader
There are three ways in which the user may select one of the available flashloaders.
By default the first flashloader on the list of available loaders is selected.
Command line parameter
The device name of the used device can be extended with the flashbank address and the loader name.
Syntax
-device "<DeviceName>?BankAddr=<FlashBankBase>&Loader=<LoaderName>"
Parameter | Meaning |
---|---|
DeviceName | The device name. |
FlashBankBase | The base address of the flashbank for which a different loader should be used. |
LoaderName | The name of the loader which should be used. |
Example
-device "STM32H743ZI?BankAddr=0x90000000&Loader=CLK@PF10_nCS@PB6_D0@PF8_D1@PF9_D2@PF7_D3@PF6"
J-Link Script File
With the J-Link Script File function JLINK_ExecCommand() a different loader can be selected.
Syntax
JLINK_ExecCommand("DEVICE_SelectLoader BankAddr=<FlashBankBase> Loader=<LoaderName>");
Parameter | Meaning |
---|---|
FlashBankBase | The base address of the flashbank for which a different loader should be used. |
LoaderName | The name of the loader which should be used. |
Example
JLINK_ExecCommand("DEVICE_SelectLoader BankAddr=0x90000000 Loader=CLK@PF10_nCS@PB6_D0@PF8_D1@PF9_D2@PF7_D3@PF6");
J-Link web control panel
The J-Link web control panel features a GUI access to easily select a different flashloader. This method requires that a settings file has been specified for J-Link.
How to
- Start the debug session with a settings file specified
- Open J-Link web control panel
- Navigate to the "Flash" tab
- Select a different loader for the desired flashbank from the drop-down menu
- Restart the debug session
Specifying multiple loader via XML
With attributes in JLinkDevices.xml files it is possible for the user to add their own flashloader to the list of selectable loaders. For more information, please see the JLinkDevices section of the Open Flashloader article.