Fails to flash new project to RT1166

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

Fails to flash new project to RT1166

607 Views
MaxS
Contributor I

I am using the MIMXRT1160 Evaluation Kit and am trying to run an initial project on the CM4 core.

Interestingly, flashing, debugging and running the provided example projects works just fine on both cores.
So it does not seem to be an hardware issue.
But when I create a new blank CM4 standalone project, write my code and try to flash it, the process fails with 

Failed to execute MI command:
-target-download
Error message from debugger back end:
Could not write register "pc"; remote failure reply 'E22'
Failed to execute MI command:
-target-download
Error message from debugger back end:
Could not write register "pc"; remote failure reply 'E22'
Could not write register "pc"; remote failure reply 'E22'

I was not able to find any relevant difference between the provided example projects and my new project, which I created from a blank C++ project.
I removed any relevant core, so the project in its current version only contains a PRINTF-statement in the main function in addition to the standard Init functions.

The image is also compiled without any errors.

0 Kudos
Reply
3 Replies

576 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @MaxS ,

Thanks for your interest in NXP MIMXRT series!

Did you have a test with hello_world_demo_cm4? Because there are sometimes configuration issues, we prefer that you start with this simple project and porting the code you need into this project to prevent any other unwanted issues.

And you can refer to AN13114 to learn the porting with IAR
https://www.nxp.com/docs/en/application-note/AN13114.pdf

Best regards,
Gavin

0 Kudos
Reply

565 Views
MaxS
Contributor I

Hi Gavin,

Thank you for your reply :).

Yes, the example projects, like "Hello World" are working just fine.
But, if I create a blank project and add the "Hello World" printf line, it fails with the error message I stated in my original post.

The example projects for the CM4 core seem to be all C-Projects, I, however, need a C++ project.

0 Kudos
Reply

519 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @MaxS ,

Sorry for the late reply.

Regarding this issue our internal team is still troubleshooting, but I found this resource that should help you, through which you can convert a C project into a C++ project.

https://mcuoneclipse.com/2020/07/11/from-c-to-c-converting-eclipse-c-projekts/

Wish you a nice day!

Best regards,
Gavin

0 Kudos
Reply