-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
West runner jlink add optional loader details to address the CLI requirements of JLink v7.70d and later #50393
West runner jlink add optional loader details to address the CLI requirements of JLink v7.70d and later #50393
Conversation
@@ -7,5 +7,9 @@ | |||
board_runner_args(pyocd "--target=mimxrt1050_hyperflash") | |||
board_runner_args(jlink "--device=MCIMXRT1052") | |||
|
|||
if(${CONFIG_BOARD_MIMXRT1050_EVK_QSPI}) | |||
board_runner_args(jlink "--loader=BankAddr=0x60000000&Loader=QSPI") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use ${FLASH_BASE_ADDRESS} instead of the constant address here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be an offset to take into account as well. I have ideas to make this submission generic. However, this implementation addresses the bug. I am working on an improvement that can be thoroughly looked at after the release deadline.
How does this sound?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmahadevan108 asked that I share these test results, testing this PR on all the NXP i.MX RT boards supported in Zephyr.
This PR was prompted by Segger making a change, and we want to ensure this is backwards compatible. So I tested with both JLink versions 7.80a after Segger’s change, and 7.70c before the change. Everything looks good to me.
With the latest v7.80a, the following boards flash and work great for me:
mimxrt1050_evk
mimxrt1050_evk_qspi
mimxrt1060_evk
Note that I also built apps using board mimxrt1060_evk_hyperflash, and flashed to the mimxrt1050_evkb board using the same hyperflash memory. The flash was programmed and verified successfully, but the Zephyr apps didn’t boot. But this is good enough for me for this, because it does program correctly, so the booting may be related to using the wrong board. But I do not have a mimxrt1060_evk modified for HyperFlash.
I also reverted JLink to v7.70c and tested with these default boards:
mimxrt1050_evk
mimxrt1060_evk
I also tested all these boards work with JLink 7.80a without needing any changes to Zephyr tree:
mimxrt595_evk_cm33
mimxrt685_evk_cm33
mimxrt1010_evk
mimxrt1015_evk
mimxrt1020_evk
mimxrt1024_evk
mimxrt1064_evk
mimxrt1160_evk_cm4
mimxrt1160_evk_cm7
mimxrt1170_evk_cm4
mimxrt1170_evk_cm7
So this PR looks great to me. Thank you, Yves!
Can you drop the merge commit? We don't use those. |
With revision 7.70d, Segger changed the command line interface of the jlink client, requiring some flash specific information, such as the base address and the type of memory, e.g. QSPI. This commit adds an optional argument to the West jlink runner, '--loader' which passes the information to the jlink client. This change is backward compatible with versions of jlink older than v7.70d which introduces the CLI change. Fixes: #50327 Signed-off-by: Yves Vandervennet <[email protected]>
This commit updates the board cmake files for the following NXP boards: - mimxrt1060_evk and mimxrt1060_evkb - mimxrt1050_evk_qspi The change adds the loader information for these boards Signed-off-by: Yves Vandervennet <[email protected]>
a870e2e
For some boards, the jlink '-device' switch requires more information to flash a binary, e.g. the type of device (qspi, etc), the base address, etc. For example, the change is needed for NXP's boards mimxrt1060_evk(b)* and mimxrt1050_evk_qspi.
The approach taken is to add an optional argument the the jlink runner, i.e. '--loader' to specify the required information.
The code is backward compatible with versions of jlink older than v7.70d.
This PR:
For more details from Segger on the new flashloader parameters, see
https://wiki.segger.com/J-Link_Multiple_Flashloader#Command_line_parameter
https://wiki.segger.com/i.MXRT1060#Available_flash_loaders
fixes #50327