Flashing and Debugging RT600 on linux using CLI

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

Flashing and Debugging RT600 on linux using CLI

1,907 Views
shri00
Contributor II

Hi,

I have been working on MIMXRT685-EVK board on a windows machine using IDEs like MCUXpresso and Xtensa xplorer. I'm trying to set it up on a linux machine without using any IDEs using CLI. I am a total stranger to Linux and have been learning how to do it efficiently. I am starting with some example project in the mcuxpresso sdk. I have installed the arm gnu toolchain and I can build the project using the build scripts in the sdk. 

I do not know how to proceed with flashing, running and debugging the program on the board. I am trying with openocd and gdb but I can't get the configuration file for the required target and I do not have the expertise to write it on my own yet. 

So, I am looking for any resource that can help me with this, whether the help with right config file for openocd or some totally different way to help me set up my board. 

 

Thanks,

Shri

 

Labels (1)
Tags (3)
0 Kudos
Reply
6 Replies

1,718 Views
stefanct
Contributor IV
There is a patch for openocd for the rt1021 iirc but as of now I am using NXP's redlink as gdbserver in pipe mode, i.e., via something like this gdb parameter:

-ex "target extended-remote | \
/usr/local/LinkServer/binaries/crt_emu_cm_redlink \
-x <search dir>... \
-p MIMXRT1021 \
--rtos on \
-g \
--no-packed \
--connectscript RT1020_connect.scp"

redlink needs an xml file describing the overall memory map and the connect script - thus the search dirs that usually would point to the generated memory map (mcuxpresso creates them) and to /usr/local/LinkServer/binaries/Scripts for the latter. The third alternative (and the only one somewhat "supported" by nxp is to use LinkServer directly as gdbserver. However, that has to be launched as a separate process which complicates launching and cleaning up gdb sessions (although I still could not make it completely reliable with redlink either). If I'd have to start over I would definitely try to use openocd!

For the SDK I'd recommend against using the SDK builder and using the github repo instead: https://github.com/nxp-mcuxpresso/mcux-sdk/
It uses zephyr's west tool instead of ordinary submodules which is quite annoying. Also, the documentation in html-form is only available via sdk builder. However, I don't think there is anything in addition to the doxygen that are visible in the SDK's sources anyway.

HTH as starting point. the journey was quite winding and full of pain... be aware, there be dragons too.
0 Kudos
Reply

1,586 Views
Sam_Gao
NXP Employee
NXP Employee

Hi @stefanct 

I am sorry for the terrible experiecne for you, would you please help clairfy more about your sharing?

Thank you for your suggestions or complaints. I want to improve our product for easy using.

B.R,

Sam

0 Kudos
Reply

1,857 Views
Sam_Gao
NXP Employee
NXP Employee

Hi,

"I'm trying to set it up on a linux machine without using any IDEs using CLI. "

Sam: Please using MCUXpresso SDK builder to build SDK for RT685 EVK: https://mcuxpresso.nxp.com/en/builder?hw=EVK-MIMXRT685

Enviroment Settings as below, Host OS: Linux, Toolchain: ARMCC.

 

Sam_Gao_0-1723625479741.png

B.R, Sam

 

0 Kudos
Reply

1,846 Views
shri00
Contributor II
Hi Sam,

Thanks for replying! I've already built the sdk as per my required OS and toolchain. I can build the projects inside also using the build scripts already given. I am looking into ways I can download the program onto my board. I'm trying to use a remote linux machine over ssh but I'm not able to flash the board.

Thanks,
Shri
0 Kudos
Reply

1,829 Views
Sam_Gao
NXP Employee
NXP Employee

Hi @shri00 

Great to hear that you have compiled the project. It seems not easy to download/debug via remote SSH becasue RT1170 is one kind of MCUs and totally different with Linux/SoC/MPU. Please see the below list to find more.

  1. Programming and Provisioning
  2. Debug Tools

B.R,Sam

0 Kudos
Reply

1,770 Views
shri00
Contributor II

Hi Sam,

Thanks for writing back. I assume your answer is for RT600. And thanks for suggesting the different tools, I'll check them out. 

 

Best,

Shri

0 Kudos
Reply