Difference between revisions of "J-Link Multiple Flashloader"
(→Selecting a specific flashloader) |
m |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | J-Link features support for multiple |
+ | J-Link features support for multiple flashloaders per flashbank. In addition to the devices already supported, the user can add support for a different flashloader if required. |
__TOC__ |
__TOC__ |
||
== Use case == |
== Use case == |
||
− | Having multiple |
+ | Having multiple flashloaders for the same device can be useful, e.g. if an 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 == |
== Selecting a specific flashloader == |
||
− | There are |
+ | There are several ways in which the user may select one of the available flashloaders. |
− | {{Note | By default the first flashloader on the list of available loaders is selected.}} |
+ | {{Note | By default, the first flashloader on the list of available loaders is selected.}} |
=== Command line parameter === |
=== Command line parameter === |
||
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. |
||
Line 47: | Line 47: | ||
# Restart the debug session |
# Restart the debug session |
||
<br> |
<br> |
||
+ | === J-Flash === |
||
+ | In J-Flash, there are two ways to select the flashloader: |
||
+ | [[File: JFlash_select_flashloader.png | thumb | none | Example for R7FA4M2AD]] |
||
+ | *When creating a new project for a device with a multiple-loader flashbank, the loader can be selected from the drop-down menu. |
||
+ | *With an existing project, the loader can be selected under '''Options -> Project settings ... -> Flash -> Loader''' |
||
+ | <br> |
||
+ | |||
+ | === Embedded Studio === |
||
+ | The SEGGER [[Embedded Studio]] IDE of course also supports this feature. You can use any of the methods above. One additional way is to set the loader via the Embedded Studio GUI in project options. |
||
+ | |||
+ | ==== How to ==== |
||
+ | # Open the project settings of your Embedded Studio project |
||
+ | # Go to: Debug > J-Link > Additional J-Link Options |
||
+ | # Enter the exec command DEVICE_SelectLoader as explained [[J-Link_Command_Strings#DEVICE_SelectLoader|here]] |
||
+ | # Press OK twice in both project option windows to confirm the newly set option |
||
− | == Specifying multiple |
+ | == Specifying multiple loaders 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 [[Open_Flashloader#JLinkDevices.xml_Tags_and_Attributes | JLinkDevices]] section of the Open Flashloader article. |
+ | 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 [[Open_Flashloader#JLinkDevices.xml_Tags_and_Attributes | JLinkDevices]] section of the Open Flashloader article. |
Latest revision as of 17:45, 31 January 2024
J-Link features support for multiple flashloaders per flashbank. In addition to the devices already supported, the user can add support for a different flashloader if required.
Contents
Use case
Having multiple flashloaders for the same device can be useful, e.g. if an 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 several 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
J-Flash
In J-Flash, there are two ways to select the flashloader:
- When creating a new project for a device with a multiple-loader flashbank, the loader can be selected from the drop-down menu.
- With an existing project, the loader can be selected under Options -> Project settings ... -> Flash -> Loader
Embedded Studio
The SEGGER Embedded Studio IDE of course also supports this feature. You can use any of the methods above. One additional way is to set the loader via the Embedded Studio GUI in project options.
How to
- Open the project settings of your Embedded Studio project
- Go to: Debug > J-Link > Additional J-Link Options
- Enter the exec command DEVICE_SelectLoader as explained here
- Press OK twice in both project option windows to confirm the newly set option
Specifying multiple loaders 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.