Debugging TWR-K64F120M with Ulink2 in Keil IDE

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

Debugging TWR-K64F120M with Ulink2 in Keil IDE

Jump to solution
1,150 Views
csmgsarma
Contributor IV

Dear list,

I am using ULIK2 debugger to flash/debug applications using Keil IDE for my TWR-K64F120M board. The "target driver setup" in Debug section project options was not detecting my board with default settings. After removing J39 Jumper, the TWR board was detected by the tool.

When I run the debug session or try to flash the application(default blinky project in the installation directory), I am seeing flash errors as in the attachment.

Is it possible to launch debug session with Ulink2 debugger with default jumper settings? If anyone has tried this combination(Ulink2, Keil IDE and TWR-K64F120M), request you to share the Jumper settings as I suspect that the problem lies in the jumper settings. The Ulink2 debugger is working fine as I am using it to flash and debug another Freescale K10 series mirco too. 

I have tried the trouble shooting steps given here.

and here.

Thanks in anticipation.

Best regards
Sarma

0 Kudos
1 Solution
823 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi CSMG Sarma,

  

   I don't have the ULINK on my side, so I just test the external JLINK+TWR_K64F120M +MDK.

  From the keil website, ULINK should support K64 chip.

  Now answer your questions:

1. Is it possible to launch debug session with Ulink2 debugger with default jumper settings? 

  No, you must remove the J39,  the default is connect the J39, this pin is connecting the SWD_CLK pin to the on board debugger.

If you want to use the external debugger, you need to remove J39.

pastedImage_2.png

Besides J39, please also connect J2 to power on the board.

2. You problem about :cannot load flash programming algorithm

Please check the algorithm on your configuration, the RAM for algorithm, and the Programming algorithm, the following picture is from my side:

pastedImage_1.png

I can download the blink project from the install path with external JLINK.

So, please check algorithm on your side at first.

Actually, about the ULINK question, and the keil install path problem, you also can contact with the keil engineer, which you can find from this link:

Keil Product Support 

Wish it helps you!

If you still have problem , please let me know!


Have a great day,
Kerry

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

View solution in original post

5 Replies
823 Views
csmgsarma
Contributor IV

I have captured all hardware and software preconditions to create a simple MQX multi tasking Blinky project from scratch and attaching here for further references. Hope this helps for others to get started with.

I used main.c attached here for this project.

Best regards
Sarma.

0 Kudos
823 Views
csmgsarma
Contributor IV

Hi Kerry,

Thanks for the correction. I had removed this J39 connection already but forgot to mention this. Sorry.
Besides this J29 connected to 5-6.
With these connections made, the following sequence of target power ON has to be followed:
1. Poweroff target and Ulink2 debugger.
2. Connect Ulink2 to the Target board.
3. Power ON Ulink2 Debugger first.
4. Power ON target board.


Now the debugging and flash sessions are happening smoothly. Thanks for your suggestions. Full Marks :smileyhappy:

Best regards
Sarma.

823 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi sarma,

    Thank you for telling your problem is solved.

    If you don't have any other question, please help to mark the correct answer to close this question.


Have a great day,
Kerry

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

0 Kudos
823 Views
csmgsarma
Contributor IV

Hi Kerry

I had marked your answer helpful. Anyways I’ll recheck and update the site. Also I am planning to update the same a short document so any other user of TWR64F120 need not have to waste his time.

Best regards

Sarma

0 Kudos
824 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi CSMG Sarma,

  

   I don't have the ULINK on my side, so I just test the external JLINK+TWR_K64F120M +MDK.

  From the keil website, ULINK should support K64 chip.

  Now answer your questions:

1. Is it possible to launch debug session with Ulink2 debugger with default jumper settings? 

  No, you must remove the J39,  the default is connect the J39, this pin is connecting the SWD_CLK pin to the on board debugger.

If you want to use the external debugger, you need to remove J39.

pastedImage_2.png

Besides J39, please also connect J2 to power on the board.

2. You problem about :cannot load flash programming algorithm

Please check the algorithm on your configuration, the RAM for algorithm, and the Programming algorithm, the following picture is from my side:

pastedImage_1.png

I can download the blink project from the install path with external JLINK.

So, please check algorithm on your side at first.

Actually, about the ULINK question, and the keil install path problem, you also can contact with the keil engineer, which you can find from this link:

Keil Product Support 

Wish it helps you!

If you still have problem , please let me know!


Have a great day,
Kerry

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