Error (Failed to Execute MI Command) for bare-metal program

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

Error (Failed to Execute MI Command) for bare-metal program

2,442 Views
tmorrison
Contributor III

Before I start - Yes, I have googled and read many posts about this issue, but I did 

not find an article that answers posed kin this post

-----------------

Hi,

 

I have professional version of CodeWarrior (Development Studio for QorIQ) connect to a

Custom LS1043A-RGW via a CodeWarrior Tap (brand new). I have the Software Switches

set to boot from SD Card (and I have an SD Card that apparently has proper RCW settings

written (I will be asking a question about this later))

 

I am using default <xxxx>\ARMV8\gdb\bin\aarch64-fsl-gdb.exe for debug and

have successfully debugged some programs (see below), but while try to run a

simple DDR-based bare-metal application and I get:

 

   Error in final launch sequence
   Failed to execute MI command:
   load C:\\Users\\xxxxx\\eclipse-workspace\\b4\\Debug\\b4.elf

   Error message from debugger back end:
   Load failed
   Load failed

 

Here are the steps to re-create. 

  • Run QCVS DDR and I have a set of optimized settings for DDR - cool too!
  • I have run a program out of OCRAM and have DDR initialized using the

       QCVS DDR source output

    • target init script (ddrCtrl_1.py)
    • simple program (running out of OCRAM) that calls the init DDR routine inside of InitDdrRegisters_1.c
  • I have run extensive DDR Tests and the DDR is running correctly
  • I created a simple DDR Bare-metal Hello world (from CodeWarrior Stationary Projects) - kusing
  • I tried using both the "Connect (Reset /init DDR)" option to connect to the board - success (DDR is working)
  • I tried the "Diagnose Connection" option - it completes successfully
  • With the same Custom Target Connection, I try to debug the DDR Bare-metal application, and I get the above error.

 

-----

 

Attached is the diagnostic info (including a picture of this posting along with the Error in Codewarrior screen)

0 Kudos
5 Replies

2,282 Views
Pavel
NXP Employee
NXP Employee

Since your DDR initialization settings were tested using OCRAM project, CodeWarrior should correctly load code to DDR on your board.

 

Do you change DDR initialization settings in the .tcc on your DDR initialization settings?

Is there problem for code loading using this .tcc file on your board?

Have a great day,
Pavel Chubakov

0 Kudos

2,282 Views
tmorrison
Contributor III

I have added the Target TCC file/script that has the same Init_DDRC() method as one that correctly initializes DDR but program runs out of OCRAM. 

0 Kudos

2,282 Views
tmorrison
Contributor III

Pavel - do you have any suggestions?

0 Kudos

2,282 Views
Pavel
NXP Employee
NXP Employee

CodeWarrior uses .TCC file for board configuring before code loading.

See the Chapter 5 in the ARMv8_Targeting_Manual.pdf file. This file is available using the following path:

C:\Freescale\CW4NET_v2019.01\CW_ARMv8\ARMv8\Help\PDF

 

The init_DDRC() should be added to active .tcc file.

Have a great day,
Pavel Chubakov

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,282 Views
tmorrison
Contributor III

I have an Init_DDRC() method in the Target Initialization File/Script (same one that I run when I test DDR from OCRAM successfully. 

0 Kudos