I'm following the guide to run Zephyr on MIMXRT1050 EVK at http://docs.zephyrproject.org/boards/arm/mimxrt1050_evk/doc/mimxrt1050_evk.html
I have seen a few questions related to what I'm trying to find answers to, however, I don't think the answers address the issues I'm trying to figure out.
I have installed OpenSDA 2.1 from Segger on the board in MSD mode, the device is discovered as Segger J-Link in device manager.
SW7 settings to boot from HyperFlash.
Board: MIMXRT1050-EVK, SCH-29538 REV A4, 700-29538 REV A
uC: MIMXRT1052 DVL6A 0N04V CTZA1738A
1. When I power the board, it loads the default application from the HyperFlash. When I program it using Segger j-link, I get my custom app output. After rebooting, the default application is loaded again. I take it this indicates that the application is run from RAM and not as XIP, i.e. hyper flash is not programmed, correct?
2. Is it possible to use on-board Open SDA J-link to program the HyperFlash?
3. I've installed MCUExpresso IDE with SDK for MIMXRT1050 support. Setup a new project for this board with a sample hello world xip code. It builds alright, finds the Segger J-Link probe, but I get the error in the image below. I understand that Freescale is part of NXP, MIMXRT1050 SDK is supported by MCUExpresso. How do I successfully establish a debug session using OpenSDA J-Link with this board?
1. Zephyr currently links and loads code into ITCM SRAM, which is defined in boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts. Zephyr doesn't support the HyperFlash yet, but we do plan to add it.
2. Segger released beta support for the HyperFlash, but as you noticed in (3), there is an issue when using it with OpenSDA firmware that we're working to resolve. Currently it only works with an external debug probe.
3. If you don't have an external J-Link debug probe, you can switch the OpenSDA firmware back to DAPLink to use with SDK examples in MCUXpresso IDE. Unfortunately this is a pain if you're switching back and forth between Zephyr and SDK examples, because we don't yet have a DAPLink-compatible GDB server for i.MXRT1050 in Zephyr. We're using pyOCD in Zephyr for other boards like FRDM-K64F, but pyOCD doesn't yet support Cortex-M7.
Thanks for a prompt response. You pretty much answered all my questions. I have two follow up questions:
1. Do you perhaps have a timeline when Zephyr will add support for HyperFlash?
2. Is it feasible to use Zephyr with i.MXRT1050:
1st stage: J-link for development/debug using SRAM
2nd stage: DAPLink on production to program the HyperFlash with zephyr.elf?
1. I'm not sure yet, but it should be before the next Zephyr release. It depends on how soon the Segger OpenSDA firmware gets fixed.
2. It's feasible if your application fits into SRAM, but note that before you switch to HyperFlash you'll need to modify the dts so your code gets linked into the FlexSPI address region rather than ITCM.