Hi
I'm trying to boot from the SD card on the board RT1050
According to the Application Note AN12107 tutorial, use the IAR toolchain to generate the flash file. Then using MFG tool to program an image to SD Card and Boot from the SD Card.
But I'm not using IAR right now,
so, how can i program an image to SD Card without using IAR. Example by MCUXpresso
Best Regards,
Haryanl
Solved! Go to Solution.
Hi @haryanl ,
Thanks a lot for your patient. Already finished the testing on my side.
Good news to you, I totally make it works on my side.
I attach my project, the generated .s file, maybe your generated code has issues.
Please follow me to test it again:
1. Download the MCUBootUtility tool, this tool is more good to use, i use this download the code to the SD card.
https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v3.3.1
2. Use my attached evkbimxrt1050_ew_gui_graphics_accelerator.s19 file, I generated the code which is located in the SDRAM. Find it in the attached file:
evkbimxrt1050_ew_gui_graphics_accelerator\Debug
3. Use the MCUbootutility tool to download the code
SW7:1-ON 2-OFF 3-OFF 4-ON. usb cable connect to J28 and J9.
dcd.bin path is:
NXP-MCUBootUtility-3.3.1\src\targets\MIMXRT1052\evkbmimxrt1050_xip_boot_header_dcd.bin
Then connect to ROM,
APP file just select my attached .s19 file, click step 3 all-in-one-Action button download the code and wait the download finished.
Then exit the MCUbootutility tool: reset device.
Now, SW7:1-ON 2-OFF 3-ON 4-OFF. press reset button on the board or repower on the board, you will find your LCD is working.
My video is in the attached 1.zip, this is the picture:
Wish it helps you!
Best Regards,
Kerry
Hi @haryanl
Seems the evkbimxrt1050_ew_gui_bezier_clock project is not the SDK project, do you create it by yourself?
I checked the SDK2.10.0, no this project.
So, I run your code directly, debug it at first, just run it on my MIMXRT1050-EVKB board, when I run it, it can go to the main, but, when do full run, it enter the hardfault:
So, seems your original project has issues if download to the SDRAM directly.
That's why you copy it from SDCard to the SDRAM and run it, it has issues.
You also can debug it at first.
Best Regards,
kerry
Hi Kerry
sorry for my late reply
I used SDK_2.9.1_EVKB-IMXRT1050, so there's a project "ew_gui_bezier_clock" in it
I just downloaded SDK_2.10.0, and tried with project "ew_gui_graphics_accelerator", With QSPI boot, works fine.
But when I tried to try to boot from SD, got the same error.
Here are the steps I did:
6.3. Write Image
But the app does not seem to run, the screen does not respond, when viewing the log, it is stuck at "Initialize Graphics Engine"
please correct my mistake
Can you check from the beginning, my goal is to know how to boot from SD card
Thanks & Best Regards,
Haryanl
Hi @haryanl ,
Thanks a lot for your patient. Already finished the testing on my side.
Good news to you, I totally make it works on my side.
I attach my project, the generated .s file, maybe your generated code has issues.
Please follow me to test it again:
1. Download the MCUBootUtility tool, this tool is more good to use, i use this download the code to the SD card.
https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v3.3.1
2. Use my attached evkbimxrt1050_ew_gui_graphics_accelerator.s19 file, I generated the code which is located in the SDRAM. Find it in the attached file:
evkbimxrt1050_ew_gui_graphics_accelerator\Debug
3. Use the MCUbootutility tool to download the code
SW7:1-ON 2-OFF 3-OFF 4-ON. usb cable connect to J28 and J9.
dcd.bin path is:
NXP-MCUBootUtility-3.3.1\src\targets\MIMXRT1052\evkbmimxrt1050_xip_boot_header_dcd.bin
Then connect to ROM,
APP file just select my attached .s19 file, click step 3 all-in-one-Action button download the code and wait the download finished.
Then exit the MCUbootutility tool: reset device.
Now, SW7:1-ON 2-OFF 3-ON 4-OFF. press reset button on the board or repower on the board, you will find your LCD is working.
My video is in the attached 1.zip, this is the picture:
Wish it helps you!
Best Regards,
Kerry
Hi Kerry
Thank you very much for your support
I used your project and tested OK.
I tried editing from the original project in the SDK, but it doesn't work like your project
Refer to your project, I modified from the original project as follows:
1. Link application to RAM
2. in MCU setting
move SDRAM to 2nd position, edit location 0x80000000 to 0x80002000,
and Size from 0x1e00000 to 0x1dfe000
-> Can you explain to me why change to 0x1dfe000?
3. in C/C++ Build/Setting/ MCU C Compiler/Preprocessor
change XIP_EXTERNAL_FLASH=1 ->0
XIP_BOOT_HEADER_ENABLE=1->0
XIP_BOOT_HEADER_DCD_ENABLE=1->0
4. Build project, create .S19 file
5. Use MCUbootutility tool to download the code according to your instructions.
reset board. But It's not work
Did I miss something?, please help me
My project is in the attached
Best Regards,
Haryanl
Hi @haryanl ,
In fact, my project also share with you, you can check that project, I also modify the stack start address, just in the link to RAM page.
You can compare your modification with my project.
Best Regards,
KERRY
Hi Kerry
sorry for my trouble
I have compared 2 projects very carefully, I have set project properties as your project. Looks like you didn't modify the source code either.
But my project is still not running.
I really don't know what else to do.
please can you check the missing in my project?
Best regards,
Haryanl
Hi @haryanl
Which IDE version you are using?
Do you try to close the project, delete the whole workspace, and create a new one, then import your own project, whether that works OK or not?
BTW, you need to drag the newest SDK to your IDE.
Best Regards,
kerry
Hi @kerryzhou
Do you try to close the project, delete the whole workspace, and create a new one, then import your own project, whether that works OK or not?
BTW, you need to drag the newest SDK to your IDE
-> I just tried it, but the result is still the same
I am using IDE version 11.3.1, But I think, it's not related to IDE, because when I build your project, it runs normally.
With the project that I have set, can you run it?
sorry for the trouble
Best Regardss,
Haryanl
Hi @haryanl
You didn't modify the stack start location, which I have told you in the previous reply with description:
After this modification, your project also works on my side.
Please check it again on your side.
Best Regards,
Kerry
Hi @kerryzhou
I fixed it and my project is running
I was thinking to fix the memory stack
Finally, I really appreciate your enthusiasm
Allow me to close this topic
Thank & Best Regards,
Haryanl
You are welcome!
Any new questions in the future, welcome to create a new case.
Best Regards,
Kerry
Hi @haryanl
I will test your mentioned ew_gui_graphics_accelerator project, do you want to use the LCD and ew gui when you boot from SD card? Do you try the simple project, eg, helloworld, or led_blinky project whether that works OK or not?
After my testing, I will let you know about ew_gui_graphics_accelerator testing result.
Best Regads,
Kerry
Hi @haryanl
As the IDE need to have the program files, and now, we just have the external flash method, as you know, the SDcard code can't support debug directly. so normally, we will generate the app, then use these tools to download the code to the external sdcard: MCUBootUtility, MFGtool, MCUXpresso Secure Provisional tool(SPT).
You can refer to my post:
So, IDE generate the app file, then use the above 3 method to downoad code to the sdcard.
Wish it helps you!
Best Regards,
Kerry
Hi kerry
Thank for your reply
Let me try it
I'm wondering if it will work with applications with size >10MB or not!
For example "Crank_storyboard_coffeeapp" Demo app
Is there a limit on the size of the app?
Best Regards,
Haryanl
Hi @haryanl
I think it is OK, you can try it.
Just make sure, the used internal memory FlexRAM(ITCM, DTCM, OCRAM) is not exceed the max size.
Wish it helps you!
Best Regards,
Kerry
Hi Kerry
Following your instructions, I burned the code to the external SD card with MCUXPresso Secure Provisioning.
For iled_blinky app, I tried it successfully.
but when I try with "evkbimxrt1050_ew_gui_bezier_clock" app(app size 3.5MB), the clock doesn't run, Touch doesn't work either.
Is it lack of memory, I don't understand it well. Is there any way to fix this?
Best Regards,
Huy
Hi @haryanl
Do you use the SDRAM in the evkbimxrt1050_ew_gui_bezier_clock project? If yes, in the SPT tool, you also need to add the SDRAM DCD.bin file, otherwise it will has issues.
You can give me your SPT tool add app screenshot, I need to check it at first.
Best Regards,
Kerry
Hi Kerry
Yes, I'm using SDRAM.
According to the SPT User Guide"MCUXSPTUG", I have set up the SDRAM as below
When burning to SD card with SPT, I use the default DCD stored in the path:
C:\nxp\MCUX_Provi_v3\bin\data\targets\MIMXRT1050\evkbmimxrt1050_SDRAM_dcd.bin
Everything I do is like Iled_blinky project
Do I need to edit somewhere else?
I attached my project
Best Regards,
Haryanl
Hi @haryanl
Do you want to copy your whole data to the external SDRAM and run it?
What's the RT1050 board you are using? MIMXRT1050-EVKB?
Your evkbimxrt1050_ew_gui_bezier_clock is your own project, not the SDK directly project?
Before you download to the SD card, whether it works on the external flash?
Best Regards,
Kerry