Run Zephyr on RT685 EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Run Zephyr on RT685 EVK

1,542 Views
ekim
Contributor I

Hi,

I'm following the Zephyr (v3.6.0) getting started guide and able to build sample app codes using west build and program Zephyr elf image into RT685 using west flash with LinkServer and see logs from J16 UART console. However, I did have some question,

 

1. Does the west flash command just be able to program the Zephyr elf image into internal SRAM? If not, how to flash the image into MX25UM51345GXDI00 QSPI flash? Should using west command with JLink? The purpose is I wonder to test to program mcuboot and bootable image into QSPI flash.

2. Does the Zephyr running on RT685 EVK support external shell prompt such as busybox, toybox? If yes, how can I do? The purpose is easier to do some tests and have friendly operation interaction. I did try to build samples/subsys/shell/fs/ and run it on RT685 EVK, but just see the prefix of UART prompt "uart:~$" and can not input any words.

Thank you.

Labels (1)
Tags (1)
0 Kudos
Reply
9 Replies

1,534 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @ekim ,

  Thanks for your interest in the NXP MIMXRT product, I would like to provide service for you.

Answer your 2 questions:

1. Does the west flash command just be able to program the Zephyr elf image into internal SRAM? If not, how to flash the image into MX25UM51345GXDI00 QSPI flash? Should using west command with JLink? The purpose is I wonder to test to program mcuboot and bootable image into QSPI flash.

=>Answer: In fact, to the app which is the RAM demo, and want to download to the flash, you can use the serial download mode, and the MCUbootutility or the Secure provisional tool to download it, as that will help you to generate the correct FCB, IVT.

If app is the RAM app, I don't recommend you use the JLINK to write to the flash, as JLINK normally detect the address, and download to the target, you need to add the FCB and IVT in your app, which is for QSPI flash.

 

2. Does the Zephyr running on RT685 EVK support external shell prompt such as busybox, toybox? If yes, how can I do? The purpose is easier to do some tests and have friendly operation interaction. I did try to build samples/subsys/shell/fs/ and run it on RT685 EVK, but just see the prefix of UART prompt "uart:~$" and can not input any words.

=>Answer: Seems the Zephyr don't support the shell. you may check with Zephyr side, as I didn't find it.

Normally, you need to design the app code which support the shell, then use the uart connect to the shell, that is the app function, not the zephyr function.

 

Wish it helps you!

Best Regards,

Kerry

 

0 Kudos
Reply

1,531 Views
ekim
Contributor I

Hi @kerryzhou 

Thanks for the quick reply.

Here is my comments,

1. Do you have suggestions which documents shall I check? I did check i.MX RT685 Evaluation Board User Manual, Rev. 2, 06/2021 but not see MCUbootutility. Also, how did enable the serial download mode on RT685 EVK? I just know to short JP1 to force DFU boot mode to program Zephyr elf image into LPC4322 internal flash by using west command with LinkServer. May I know what's the meanings about RAM app you mentioned? Do you mean all sample codes in Zephyr project?

The original idea is, I did program mcuboot into RT685 EVK by using west command with LinkServer, as you said, it just program into internal flash rather than QSPI flash, so, I will see below logs from UART console and wonder to have a try the mcuboot can find and jump to bootable image.

*** Booting Zephyr OS build v3.6.0-2518-g2fc42054a57c ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
W: Failed reading image headers; Image=0
E: Image in the primary slot is not valid!
E: Unable to find bootable image

 

2. I thought the shell prompt is default supporting on Zephyr because the samples/subsys/shell/fs was existed. Thanks for your explanation. 

 

Thanks.

0 Kudos
Reply

1,500 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @ekim ,

  You are always welcome!

  1. About the MCUBootutlity to download the code to the RT685 in serail download mode, it is very easy, you can refer to:

https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v6.1.0
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

 

2. You also can use the SPT tool, that is similar to the MCUBootutility

https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools...

 

3. Some application note to you:

https://www.nxp.com/docs/en/application-note/AN12773.pdf

https://www.nxp.com/webapp/Download?colCode=AN13929&location=null

 

 

Wish it helps you!

If you still have question about it, please kindly let me know.

Best Regards,

kerry

 

0 Kudos
Reply

1,497 Views
ekim
Contributor I

Hi @kerryzhou 

Thanks to provide these information and I think I need to take time to learn and survey them how to enable the serial download mode on RT685EVK and program Zephyr images from that port. I will let you know if any questions. Thanks again.

Have one more question, I did found below command for RT595EVK and see mimxrt595_evk/board.cmake in Zephyr project. Does that mean it supports to program image into QSPI flash or specific address on RT595EVK by using west flash command with linkserver?

west flash --runner=linkserver --override /device/memory/5/flash-driver=MIMXRT500_SFDP_MXIC_OSPI_S.cfx
 
mimxrt595_evk/board.cmake
board_runner_args(linkserver "--override=/device/memory/5/flash-driver=MIMXRT500_SFDP_MXIC_OSPI_S.cfx")
board_runner_args(linkserver "--override=/device/memory/5/location=0x18000000")
 
Thanks.
0 Kudos
Reply

1,451 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @ekim ,

  Thanks for your updated information.

  Yes, you mentioned method is using the linkserver to download the app, I mean the debug interface.

 The following is the flashloader, which help you to program the app to the target flash:

flash-driver=MIMXRT500_SFDP_MXIC_OSPI_S.cfx

 Yes, your understanding is correct, debug interface also can help you to download code.

You also can use your command and try to download it.

If you still have question about it, just kindly let me know.

Best Regards,

Kerry

0 Kudos
Reply

1,436 Views
ekim
Contributor I

Hi @kerryzhou 

Thanks for your reply and confirmation and sorry for the late response.

But, that cfx file looks like to be used on RT595EVK not RT685EVK I used. So, is it possible would you provide new cfx file for RT685EVK to me? Or, shall I get it from which website or github?

I post partial codes as below that is got from mimxrt595_evk/board.cmake and it seems need to assign memory address as well. May I know what's the memory address shall be assigned if I would like to use on RT685EVK?

Thank you.

 

board_runner_args(linkserver "--device=MIMXRT595S:EVK-MIMXRT595")
board_runner_args(linkserver "--override=/device/memory/5/flash-driver=MIMXRT500_SFDP_MXIC_OSPI_S.cfx")
board_runner_args(linkserver "--override=/device/memory/5/location=0x18000000")
0 Kudos
Reply

1,308 Views
ekim
Contributor I

HI @kerryzhou 

Does the cfx file be public? If so, would you share SFDP_MXIC_OSPI_S.cfx for RT685EVK to me or tell me where I can get?

Also, what's address should be set in location? If my understanding is correct, does it mean a physical address in flash to store image? Is still 0x18000000? Or should check dts/dtsi file to know which is actual address for RT685EVK?

 

Thank you.

0 Kudos
Reply

1,305 Views
ekim
Contributor I

HI @kerryzhou 

I have a new update about that, I installed MCUX IDE and found the cfx file for RT685EVK now. If anything I missed, please correct me. Also, I'll update to you later when I use this file to program image into flash.

0 Kudos
Reply

1,291 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @ekim ,

 So sorry for my later reply.

  You are so smart, yes, you find the correct area, the MCUXpresso IDE install path contains it:

C:\nxp\MCUXpressoIDE_11.9.0_2144\ide\LinkServer\binaries\Flash

kerryzhou_0-1714117545603.png

 

You can use it.

If you still have question about it, please kindly let me know.

Best Regards,

Kerry

 

0 Kudos
Reply