New to MCUXpresso, using old FRDM-KL25Z, can't figure it out with J-Link Lite.

cancel
Showing results for 
Search instead for 
Did you mean: 

New to MCUXpresso, using old FRDM-KL25Z, can't figure it out with J-Link Lite.

Jump to solution
1,553 Views
dave408
Senior Contributor II

It's been over 3 years since I posted here and worked with the Kinetis processors.  Since we are using MCUXpresso here now and I personally don't have experience with it, and since my colleagues aren't using J-Link Lite, I've been trying to figure it out on my own.

So far, I've got MCUXpresso 11.6.1.8255 and the MCUXpresso Config Tools 12.1 installed.  I think the pin and peripheral configuration is straightforward and not all that different from what I used to do in KDS.  However, right now I'm struggling with debugging, as I cannot get the SEGGER J-Link Lite part of things figured out.

All of the old articles about this link to a new J-Link page (https://www.segger.com/downloads/jlink#), which installs a package with all kinds of firmware binaries.  I went into Bootloader mode on the FRDM board by holding reset and plugging my USB cable into the OpenSDA port.  When the USB flash drive appeared, I copied over JLink_Lite_Synergy.bin, since that is apparently the firmware for Cortex M0+ microcontrollers.  While it doesn't seem like the right file (I don't know if it's actually for OpenSDA or not), I couldn't find anything else that makes sense.

I've yet to find an article/tutorial online for this sort of thing.  If I have to buy a JTAG to speed things up, I will, but since I'm just playing around and there should be a free option for the FRDM boards, I wanted to give that a try first.

Any suggestions or tips that would point me in the right direction would be really helpful!  Thank you!

Tags (1)
0 Kudos
1 Solution
1,540 Views
ErichStyger
Senior Contributor V

Hi @dave408 ,

the synergy firmware file is the wrong one.

Go to https://www.segger.com/products/debug-probes/j-link/models/other-j-links/opensda-sda-v2/

and scroll down to:

ErichStyger_0-1673333465293.png

Clock on that  'Firmware download' link which gets you to the OpenSDA firmware download page, and download the one for the FRDM-KL25Z:

ErichStyger_1-1673333540023.png

Then put the board into bootloader mode (power it by USB with SW1 pressed), then copy the downloaded file to the board. After that, it should enumerate as a J-Link device.

Otherwise, check out one of my articles about that board, e.g.

https://mcuoneclipse.com/2012/09/20/opensda-on-the-freedom-kl25z-board/

or in general about OpenSDA:

https://mcuoneclipse.com/tag/opensda/

One thing too keep in mind: if your board is really old, you will need to update the bootloader on it:

https://mcuoneclipse.com/2014/11/01/illustrated-step-by-step-instructions-updating-the-freescale-fre...

I hope this helps,

Erich

View solution in original post

0 Kudos
11 Replies
1,541 Views
ErichStyger
Senior Contributor V

Hi @dave408 ,

the synergy firmware file is the wrong one.

Go to https://www.segger.com/products/debug-probes/j-link/models/other-j-links/opensda-sda-v2/

and scroll down to:

ErichStyger_0-1673333465293.png

Clock on that  'Firmware download' link which gets you to the OpenSDA firmware download page, and download the one for the FRDM-KL25Z:

ErichStyger_1-1673333540023.png

Then put the board into bootloader mode (power it by USB with SW1 pressed), then copy the downloaded file to the board. After that, it should enumerate as a J-Link device.

Otherwise, check out one of my articles about that board, e.g.

https://mcuoneclipse.com/2012/09/20/opensda-on-the-freedom-kl25z-board/

or in general about OpenSDA:

https://mcuoneclipse.com/tag/opensda/

One thing too keep in mind: if your board is really old, you will need to update the bootloader on it:

https://mcuoneclipse.com/2014/11/01/illustrated-step-by-step-instructions-updating-the-freescale-fre...

I hope this helps,

Erich

0 Kudos
1,516 Views
dave408
Senior Contributor II

@ErichStyger Ok, it's working with my KL02Z!  Although others might already know this, I'm posting this info so others don't waste time.

Windows 7 in a VM will not work. 

I found an old laptop here in the office and ran through the steps to install the OpenSDA firmware.  While I also tried to update the bootloader to v1.11, it was still apparently stuck at 1.09, but OpenSDA works and I'm now able to connect via MCUXpresso!

I'll do the same thing with my KL25Z, and from that point on, I'll likely hit some other programming related hurdles.  But at least I'm moving forward.

Thanks again!

0 Kudos
1,502 Views
ErichStyger
Senior Contributor V

Hi @dave408 ,

I really recommend to update the bootloader if possible, otherwise the host OS might interfere with it. We have updated all our boards over here and had no issues with the bootloader afterwards.

Erich

0 Kudos
1,499 Views
dave408
Senior Contributor II

@ErichStyger ok, thank you for the recommendation.  I checked SDA_INFO prior to updating and it was 1.09.  I then updated to PEmicro 1.11, and afterward the SDA_INFO file still said 1.09.  Is this normal?  Whatever firmware is on there seems to take the SEGGER OpenSDA binary just fine.  What kind of OS interference occurs, exactly?

0 Kudos
1,483 Views
ErichStyger
Senior Contributor V

Hi @dave408 ,

it really should report 1.11:

ErichStyger_0-1673510120135.png

One easy mistake is: not following the step 6 and 7 as described in

https://mcuoneclipse.com/2014/11/01/illustrated-step-by-step-instructions-updating-the-freescale-fre...

In order to update the bootloader, you have to unpower and normally power the board.

Maybe this is the reason for you?

 

Erich

0 Kudos
1,477 Views
dave408
Senior Contributor II
Erich, you're right. I know what I did wrong. After copying over the bootloader, I repowered the board but skipped a step and held down the reset button again. It's 1.11 now! Thank you for making sure I re-read the instructions more carefully.
1,475 Views
ErichStyger
Senior Contributor V
Great to hear that you are now on 1.11
0 Kudos
1,513 Views
dave408
Senior Contributor II
Found an old laptop at home, installed Windows 7, and was easily able to update the firmware to SEGGER's OpenSDA. Already debugging in MCUXpresso!
0 Kudos
1,531 Views
dave408
Senior Contributor II

Looks like I'm a bit stuck as I'm on Windows 10 and 11, and I'm getting that green blinky status when I copy over the file, as you had mentioned in one of your posts, and it doesn't enumerate as a J-Link device (actually doesn't enumerate at all)

I've tried to use VirtualBox to run a Windows 7 VM, and while I was able to copy the file over, I ended up with the same result for some reason.  I'll keep at it, and might have to find an old PC somewhere that I can temporarily load Windows 7 onto for testing.  I'll also try updating the original bootloader, but since I'm at work, I brought my FRDM-KL02Z with me so I could leave my KL25 at home, and I'll have to see if the same situation applies to this board.

UPDATE

I couldn't find the old archive from Freescale for the PE Micro OpenSDA firmware, so I tried to load the latest version (DEBUG-APP_Pemicro_v108.SDA) in my Win7 VM, but it doesn't enumerate.  Due to my lack of experience, I am not sure if that's because I must install the old version first.

I blindly went ahead and then went back into bootloader mode and copied over the SEGGER OpenSDA firmware.  It also didn't enumerate.

In both cases, as expected, MCUXpresso didn't detect any J-Link or P&E debug probes.  I also did all of my file copying from the command line, using extracted binaries only.

I'll keep at it and will continue to dig through your blog and other links you have provided.

UPDATE

I've tried several times, and nothing is working.  The LED always does 8 quick blinks and never the 1Hz blink.  I open the SDA_INFO file and it appears to have PE firmware 1.09:

<form id="form1" name="form1" method="post" action="http://www.pemicro.com/opensda/index.cfm">
<input name="tag" type="hidden" id="tag" value="description" />
<input name="BOARD" type="hidden" id="BOARD" value="FRDM-KL02Z" />
<input name="BOOTVER" type="hidden" id="BOOTVER" value="1.09" />
<input name="APPVER" type="hidden" id="APPVER" value="0.00" />
<input name="DUID" type="hidden" id="DUID" value="74823937-473181CD-3776C808-B678E678" />
<input name="EUID" type="hidden" id="EUID" value="6AE3D036-A84B873F-1875AA1B-948168D6" />
<input name="TUID" type="hidden" id="TUID" value="74823938-473281AA-3745F80A-B83BE678" />
<!--471-->
<input name="TOA" type="hidden" id="TOA" value="86B6E505-39FD25FB-C2EA9734-7D729790" />
<input name="TOA2" type="hidden" id="TOA2" value="86B6E505-543BBBFE-2E141CE7-3322BF50" />
<input name="SUID" type="hidden" id="SUID" value="86B6E505-49458799-37239804-8003EC65" />
<input name="MICROVER" type="hidden" id="MICROVER" value="1.05" />
<input name="APPNAME" type="hidden" id="APPNAME" value="" />

 I'll probably take a break and wait until I get home, where I'll be able to run the same tests on a KL25Z board.

0 Kudos
1,535 Views
dave408
Senior Contributor II

@ErichStyger @Robin_Shen Thank you, I greatly appreciate both of your responses!  I will give it a go now.

Erich, I'm very grateful for your blog, too.  Back when I was trying to figure out (and eventually succeeded) to get everything working on our K64 project, your posts were indispensable!

1,543 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi dave408,

If you want to use the onboard OpenSDA as Segger J-Link, please refer to Segger J-Link OpenSDA Firmware with Virtual MSD

If you are using a old FRDM-KL25Z board(Bootloader version NOT showing the required 1.11) with Win10 PC, please refer to Recovering OpenSDA Boards with Windows 10


Best Regards,
Robin
-------------------------------------------------------------------------------
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