DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Kubernetes CSI Drivers
  • Kubernetes CNI Drivers
  • Optimizing Docker Container Logging: Strategies for Scalability and Performance
  • How to Know an Autonomous Driver Is Safe and Reliable?

Trending

  • Zone-Free Angular: Unlocking High-Performance Change Detection With Signals and Modern Reactivity
  • Detecting Bugs and Vulnerabilities in Java With SonarQube
  • Build Self-Managing Data Pipelines With an LLM Agent
  • From Data Movement to Local Intelligence: The Shift from Centralized to Federated AI

Using SEGGER J-Link With QSPI FLASH on NXP i.MX Boards

Learn more about using SEGGER J-Link in this tutorial.

By 
Erich Styger user avatar
Erich Styger
·
Oct. 31, 19 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
12.2K Views

Join the DZone community and get the full member experience.

Join For Free

Segger J-Link

Learn more about using SEGGER J-Link in this tutorial.

In previous posts, "Debug and Execute Code from FLASH on the Seeed Arch Mix NXP i.MX RT1052 Board," I used the NXP LPC-Link2 to debug the Seeed Arch Mix board with the NXP i.MX RT1052, because the SEGGER J-Link does not work out-of-the-box with the i.MX RT using QSPI Flash.

This article shows how the J-Link connection can be changed from HyperFlash to work with QSPI Flash.

J-Link EDU Mini with Seeed i.MX RT1052

J-Link EDU Mini with Seeed i.MX RT1052

Depending on what external FLASH memory is used (SPI Flash, HyperFlash, etc.), the debug connection needs to be made aware so that it can use the correct driver to access and program the memory. The NXP LPC-Link2 debug connection has a flexible way to load the needed flash driver using a setting the Eclipse (MCUXpresso) IDE project properties:

Flash Driver Setting

Flash Driver Setting

That way, the debugger connection can load the appropriate flash driver. That above flash drive is specific for the LPC-Link2 debug connection.

For the SEGGER J-Link, one would expect that the needed driver could be specified on the command line starting the debug connection, as it is, for example, for the core/device under debug. But instead, the external flash driver setting is configured in a global JLinkDevices.xml file.

By default, (probably because the first NXP boards for i.MX RT1052 were using HyperFlash), the default is using that FLASH technology. To change, it, locate the JLinkDevices.xml file. On Windows, this should be in:

C:\Program Files (x86)\SEGGER\JLink


JLinkDevices.xml

JLinkDevices.xml

Open the file with a text editor to edit it (you might need administrative rights).

Note: This file is *global* and changing it will not allow you to connect to a board with HyperFlash and vice versa. If having different boards with different FLASH memory on it means always changing that XML file. Best if using a batch file to switch between different FLASH variants.

Search in the JLinkDevices.xml the device used. In my case, it is the MCIMXRT1052, which is shown in the J-Link connection console:

Target Device used by J-Link

Target Device used by J-Link

Search for that device in the XML file:

Loader to program the flash

Loader to program the flash

The loader identifies the driver to program the flash, plus the memory range. The J-Link FLASH drivers are inside the 'Devices' folder of the J-Link installation folder:

Segger J-Link Flash Drivers for i.MX RT105x

Segger J-Link Flash Drivers for i.MX RT105x

In my case, I change it to use the QSPI Flash instead:

Setting to use QSPI Flash

Setting to use QSPI Flash

With this, I can download and debug the i.MX RT1052 Seeed board with QSPI Flash in Eclipse.

Debugging i.MRT with QSPI FLASH

Debugging i.MRT with QSPI FLASH

Summary

To switch to a different (non-default) FLASH with the SEGGER J-Link, I must manually edit and change the JLinkDevices.xml file inside the JLink installation folder. That works fine, but do not forget to switch back if using a different board with a different FLASH memory device on it. And do not forget to make the change again after installing a new J-Link version.

Happy Flashing!

Driver (software) Flash memory

Published at DZone with permission of Erich Styger. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Kubernetes CSI Drivers
  • Kubernetes CNI Drivers
  • Optimizing Docker Container Logging: Strategies for Scalability and Performance
  • How to Know an Autonomous Driver Is Safe and Reliable?

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook