IAR+JLINK+JTAG for imxRT1052 debug

cancel
Showing results for 
Search instead for 
Did you mean: 

IAR+JLINK+JTAG for imxRT1052 debug

Jump to solution
354 Views
Contributor III

Hi,

I have an imxRT1052 JTAG debug issue, see the cases below:

1. RT1051 EVK board: secure JTAG verification are passed, but the demo app "hello world" couldn't be downloaded to sdram (TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFF0000000001) via IAR, see the secure JTAG verification log (secure-JTAG.txt) and IAR output of sdram debug output (cspycomm-evk.log).

2. custom board (debug in SDRAM):

1) IAR+JLink+SWD is working (cspycomm-swd.log).

2) After burning DAP_SJC_SWD_SEL=1, IAR+IJET+JTAG is working.

3) IAR+JLINK+JTAG doesn't work (cspycomm-jtag.log) under DAP_SJC_SWD_SEL=1, that's my question. The difference is showed the picture. In the all 3 cases of custom board, we are using the same sdram init script (sdram_init_script.mac). Any suggestions?

pastedImage_2.png

Labels (1)
0 Kudos
1 Solution
17 Views
NXP TechSupport
NXP TechSupport

Hi tom fang,

  So sorry for my later reply, really a little busy recently.

  That's really very good to hear you make it works on your side, good experience.

   About hte detal JLINK script use method difference, if you want to know the details, I suggest you to check it with IAR engineer in the IAR website, they are more familiar with the IAR configurations.

  About place it at 0x80000000, if you use the MCUBootutility, it must work, about the IAR, you can try it, if it can't works, you also can check it with IAR side.

 

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
7 Replies
17 Views
Contributor I

 I suggest you to check it with IAR engineer in the IAR website, they are more familiar with the IAR configurations. telldunkin

  About place it at 0x80000000, if you use the MCUBootutility, it must work, about the IAR, you can try it, if it can't works, you also can check it with IAR side. 

0 Kudos
17 Views
NXP TechSupport
NXP TechSupport

Hi tom fang.

1.  RT1051 EVK , what's the debugger you are using? On board debugger or external debugger?

   Just as my reply to your previous post:

  Secure JTAG mode 

   Do you modify this point:

DNP R323,R309,R152 to isolate JTAG multiplexed signals.

2.  custom board (debug in SDRAM):

1) IAR+JLink+SWD is working (cspycomm-swd.log).

 No secure mode, right?

2) After burning DAP_SJC_SWD_SEL=1, IAR+IJET+JTAG is working.

 Can you also provide this IJET secure JTAG debug log?

3) IAR+JLINK+JTAG doesn't work (cspycomm-jtag.log) under DAP_SJC_SWD_SEL=1, that's my question. The difference is showed the picture. In the all 3 cases of custom board, we are using the same sdram init script (sdram_init_script.mac). Any suggestions?

Just download the code to the external SDRAM, no other flash, is it right?

Could you tell me where you get this sdram_init_script.mac?

Waiting for your updated information.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
---------------------------------------------------------------------------

0 Kudos
17 Views
Contributor III

Hi Kerry,

Thank you for the quick response.

This ticket doesn't mater with secure JTAG, it's a normal JTAG mode.

Let's focus on the custom board and nonsecure JTAG, I was using debugger Jlink Plus from SEGGER via JTAG interface. Just now, we have got a little progress, the code is able to be downloaded to SDRAM without stack pointer inalignment error, but it always goes into hardfault. The code should be correct, because it runs OK under "Ijet+JTAG" and "JLINK+SWD". Sometimes, IAR can download and run the code without hardfault, but after breaking the code and pulling it to main() by clicking the "reset" button in IAR, it gets stuck in hardfault again.

Now, there isn't stack pointer inalignment error since we have done:

1. copy the system clock and SEMC initialization from sdram_init.mac file to sdram_init.jlinkscript (both and code link script were attached)

2. enable sdram_init.jlinkscript instead of sdram_init.mac in IAR (both contents are the same, why is the behavior different?)

Do you have any suggestions about this type of hardfault? It seems something about JTAG interrupt configuration in RT1052.

pastedImage_1.png

pastedImage_2.pngpastedImage_3.png

0 Kudos
17 Views
NXP TechSupport
NXP TechSupport

Hi tom fang,

  Do you use the JLINK JTAG mode, and try the IAR project on your side? Whether that works or not?

   Because I also want to know, whether it is related to the IDE, you can test the SDK IAR project, that project also contains the SDRAM project.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
---------------------------------------------------------------------------

0 Kudos
17 Views
Contributor III

Hi Kerry,

we fixed it, it seems we must call .jlinkscript file in IAR settings Options->Debugger->Extra Options->"--jlink_script_file=$PROJ_DIR$/sdram_init.jlinkscript" in normal JLINK JTAG mode. But actually, it does the same things as sdram_init.mac, up to now, I have no idea why it should be used. But really very appreciate for your so much help!

By the way, I found IAR development guide says interrupt vector table (section .intvec) must be placed at address 0x00000000, and all your EVK SDK source code set it at 0x00000000 as well (see link script file .icf), but if I don't want to use ITCM, but only SDRAM, can I place it at 0x80000000? See page 512 in the attached EWARM_DevelopmentGuide.ENU.pdf.

0 Kudos
18 Views
NXP TechSupport
NXP TechSupport

Hi tom fang,

  So sorry for my later reply, really a little busy recently.

  That's really very good to hear you make it works on your side, good experience.

   About hte detal JLINK script use method difference, if you want to know the details, I suggest you to check it with IAR engineer in the IAR website, they are more familiar with the IAR configurations.

  About place it at 0x80000000, if you use the MCUBootutility, it must work, about the IAR, you can try it, if it can't works, you also can check it with IAR side.

 

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
17 Views
Contributor III

It's fine Kerry, very appreciate for your patience and so kindly help!

0 Kudos