Hello NXP,
I was flash NXP evkmimxrt1010_flashloader sample code to RT1010 EVK ,
but the result was fail. following was my flash log. Could you give me any advice or help?
===================================================================
Executing flash operation 'Program' (Program file into flash: evkmimxrt1010_flashloader.axf) - Fri Aug 30 16:11:21 CST 2024
Checking MCU info...
Scanning for targets...
Executing flash action...
MCUXpresso IDE RedlinkMulti Driver v11.10 (Jul 2 2024 19:33:51 - crt_emu_cm_redlink.exe build 741)
( 0) Reading remote configuration
Wc(03). No cache support.
Found chip XML file in C:/Users/Documents/MCUXpressoIDE_11.10.0_3148/workspace/evkmimxrt1010_flashloader/Debug\MIMXRT1011xxxxx.xml
( 5) Remote configuration complete
Reconnected to existing LinkServer process.
============= SCRIPT: RT1010_connect.scp =============
RT1010 Connect Script
DpID = 0BD11477
APID = 0x04770041
Wirespeed = 10000000 Hz
Resetting and trapping
Back from reset
Disabling MPU
Configure FlexRAM for 64KB OC RAM, 32KB I-TCM, 32KB D-TCM
Finished
============= END SCRIPT =============================
Probe Firmware: CMSIS-DAP (ARM)
Serial Number: 0227000014dd1b3b00000000000000000000000097969905
VID:PID: 0D28:0204
USB Path: \\?\hid#vid_0d28&pid_0204&mi_03#7&1eb98487&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
( 30) Emulator Connected
warning - watchpoint hit but none found set
( 40) Debug Halt
( 50) CPU ID
debug interface type = CoreSight DP (DAP DP ID 0BD11477) over SWD TAP 0
processor type = Cortex-M7 (CPU ID 00000C27) on DAP AP 0
number of h/w breakpoints = 8
number of flash patches = 0
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 0BD11477. CpuID: 00000C27. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FD000: CID B105100D PID 000008E88C ROM (type 0x1)
ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM (type 0x1)
ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM (type 0x1)
ROM 3 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
ROM 3 E0001000: CID B105E00D PID 04000BB002 Gen DWT (type 0x0)
ROM 3 E0002000: CID B105E00D PID 04000BB00E Gen (type 0x0)
ROM 3 E0000000: CID B105E00D PID 04000BB001 Gen ITM (type 0x0)
ROM 2 E0041000: CID B105900D PID 04001BB975 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
ROM 2 E0042000: CID B105900D PID 04004BB906 CSt type 0x14 Debug Control - Trigger, e.g. ECT
ROM 1 E0040000: CID B105900D PID 04000BB9A9 CSt type 0x11 Trace Sink - TPIU
ROM 1 E0043000: CID B105F00D PID 04001BB101 Sys (type 0x0)
NXP: MIMXRT1011xxxxx
DAP stride is 1024 bytes (256 words)
( 65) Chip Setup Complete
Connected: was_reset=true. was_stopped=true
( 70) License Check Complete
File 'evkmimxrt1010_flashloader.axf' load failure: Ef(11). No flash configured at the specified address.
(100) Target Operation Failed
Unable to perform operation!
Command failed with exit code 1
Hi @Omar_hong
I have tried to replicate the issue with no luck. I used MCUXpresso IDE v11.10 and SDK 2.16, downloaded from the IDE, also called plug in SDK. In my case the flashlodaer can be loaded to RAM and debugged as expected.
Currently, I do not know why you received this error, but I want to troubleshoot this with you.
Could you try to import and debug the flashloader on an different workspace ?
Did you obtained the SDK from https://mcuxpresso.nxp.com/en or from the IDE? which specific SDK version are you using?
Here is mine
Anyway, the flashloader is meant to communicate over UART or USB with a HOST. This means that you may also want to load the flashloader using BLHOST and SDPHOST instead using MCUXpresso over SWD. The Secure Provisionining will load the flashloader for you whenever you want to build an application. Let me know if I can help you further on this matter.
I hope to help,
Diego
Hi @diego_charles ,
As a side note
Following is my building and flashing method .
Do you use the same method as me?
In addition, after you load the flashloader sample code to RT1010,
can you see the debug messge form RT1010?
==============================================
Build
==========================================
Flash
Hi @Omar_hong
I see where the problem lies now, I did not understand before what you where doing different to me. You need to use the blue bug button
With this, the flashloader will be loaded to internal SRAM by the MCUXpresso IDE. In the SDK allmost all of the examples come linked to flash memory, but with the flashloader, this is a special case, we deliver this demo linked to internal SRAM.
Also the flashloader, does not integrates any boot headers. When booting an flash image on the i.MX RT, the bootROM does need some boot headers : FCB ( flash configuration Block) and IVT ( image vector table). Those headers tell the ROM, on a high level description, how to initialize the flash and where is the start address of your application, tipically Reset ISR.
The flashloader it is not really a bootable image, as we deliver it on the SDK, so you wont be able to execute it as it is. When clicking the blue bug button, the IDE does some "magic", the IDE basically, makes the MCU to start executing from resetISR. This is useful for development but not for production of a final application. On a normal boot flow, without the IDE, the ROM bootloader, or any bootloader, will be on charge of doing this.
The GUI flash tool, that you where using it is limited to write in the flash memory, and the flashloader project comes linked to SRAM, so this will be an issue for you. For development and customization of the flashloader, it is okay to keep it linked to RAM. Consider that after a reset, the flashloader will be lost, as this memory is volatile.
The flashloader that we deliver, is designed to be temporally on SRAM, and aid to write images to non-volatile memories, like flash.
Do you really need to write the flashloader to flash? Cause there is a way we can try by converting it into a Flash allocated bootable image. Do not hesitate to let me know.
Diego
Thank you for your reply !
Yes, I want to flash this flashloader code to external memory (Just like other examples code in SDK), could you please provide the corresponding sample project on MCUxpresso ?
Also you talk about flashloader does not integrates any boot headers, but in flashloader examples project , I trace some code seem for jump to start address of ours application.
If flashloader doesn't include booting an flash image function ,could you please provide the corresponding sample project on MCUxpresso?(My target is execute the application by using the bootloader )
Hi @Omar_hong
Thank you for your reply as well.
We do not have a variant of the flashloader linked to work from external flash memory. This task goes beyond my support scope and available time, as this is a custom implementation, and more care should be taken care to make our flashloader execute from flash.
About the boot headers, I meant to the contents of the XIP folder that you can see on most of the SDK examples. The XIP folder files define structures that tell bootloader about the application's configuration to be executed from flash. Belo an example picture.
The RT1010 flashloader does not contain those boot structures. In other words, the flashloader project does not contain those structures to be booted by the ROM, as a normal XIP flash application. Current demo requires to be loaded in SRAM by the SDPHOST, or by the IDE as we tried already.
You can still try link the flashloader to flash, add XIP folder. The flashloader project does integrates a custom linked script, and you need to manually link some portions to SRAM and others to flash, but currently I do not have guidelines to do this.
If you are looking for a solution that writes and jumps to your application FW without code modifications. I would recommend taking a look at the our SBL.
The SBL does supports RT1010 and source code is available. The current downside is that it is not available for the MCUXpreso's compiling toolchain ( you will need to install ARM GCC toolchain). However, this should not be a limitation as the MCU-OTA SBL and SFW User Guide provides setup instructions.
The SBL will allow you to do most of the basic things that the flashloader does: receive an image and write the image into flash. The advantage is that the SBL is a flash resident bootloader, and will be stored and execute from flash.
I hope this could help.
Diego
Hi @diego_charles ,
Here is my IDE and SDK version, and I have try this on different workspace, but it still can't work.(I got this SDK from https://mcuxpresso.nxp.com/en/dashboard)
I've tried other sample project(Hello_world & iled_blinky) and they seem to work fine
The following is the configuration status of my EVK board
Hi @Omar_hong
Thank you for your reply and cooperation!
I see your configuration of the EVK as correct. I tested again with the same SDK you just get and I can load the flashloader using the IDE. It seems that we are missing a little detail to avoid this error, but I still do not know what it is.
Please find attached the demo that I build on my PC as well the .launch file generated. Import my project and give it a try.
Best regards,
Diego
Hi @diego_charles ,
Thank you for your reply !
it still fail by use your flashloader package.
In the process of build, it can't get the .axf file,I was modify the project name to fix this issue.
In addition, I was use Quick Fix to fix following issue.
Fix above issue, this packege still can't run on my workspace.
=========================================================
I was use .axf file in this package to create bin file, and use NXP-MCUBootUtility write to flash. It seem to write success(use "Range Read" to verify ) .
After reset device and read out the data , it was not written successfully
In this state, even if SW8 is set to 0010, the ev-board can be captured by MCUBootUtility.