How to just upload a binary file ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to just upload a binary file ?

123 Views
offin
Contributor I

Hello,

I have the MCU-link device, and the software MCUXpresso IDE is installed on my PC.
My goal is to upload a binary file to a sample pcb with a KL25 IC.

But it looks the process to do that is more complex that just open the binary file and press "upload to IC". If i right understood, i have first to create a complete project. I tried that but no success.

Could you please tell me if there is a tutorial showing from zero how to create a complete project which allows at the end to be able to use the GUI Flash Tool for binary file uploading ?

If no existing tutorial, could you please point me to the first steps to do ?

Regards.

0 Kudos
6 Replies

87 Views
offin
Contributor I

Hello Erich,

Thank you very much for your help.

Yes, my sample PCB is connected to the debug probe "MCU-link" with 3 wires (DIO, CLK and GND).
I do not have the FRDM-KL25Z.
I do not have the J-Link debug probe.

I am presently making tests with a sample PCB with a KL27Z256 IC, because i do not have the final KL25 based sample PCB yet, but i think the process to upload a binary file is similar.

So i have installed the SDK for the KL27Z256, and the wizard has generated a complete project for this IC.

The software sees the "MCU-link" device.

But when i try to make an action with the "GUI Flash Tool", i see a window "SWD Configuration" which says "0 available SWD Devices detected. Connect a device and try again."

Can i consider that things look ok in the "MCUXpresso IDE" & "MCU-link" side, so the problem is now between the debug probe "MCU-link" and my PCB sample ?

Regards.

0 Kudos

83 Views
ErichS
Senior Contributor III

>>I do not have the FRDM-KL25Z.

I asked this because initially you said that you want to program a KL25, but it looks this was a type as you reference the KL27Z.

So it looks you have everything in place, and MCU-Link is fine too.

>>So i have installed the SDK for the KL27Z256, and the wizard has generated a complete project for this IC.

Have you tried to debug that project created? I would try this first and then use the "GUI Flash Programmer".

>>Can i consider that things look ok in the "MCUXpresso IDE" & "MCU-link" side, so the problem is now between the debug probe "MCU-link" and my PCB sample ?

Yes. I suspect your problem is that the probe cannot communicate to the KL27Z: check your SWD wires and make sure your MCU is properly powered. I recommend that you connect the Reset line to the MCU-Link too (see the wiring based on the FRDM-KL27Z board).

I hope this helps,

Erich

73 Views
offin
Contributor I

Yes, i am making presently the tests with a KL27 based pcb. This is a home made pcb. It is running a customised firmware. When i plug it to the PC via USB, i see it in the PC USB devices list.

I just received my sample of KL25 pcb. I am not able to check if it is 100% ok, because i am not able to upload any firmware in it. So i prefered to start my tests with the KL27 based pcb, because i am sure this one works well.

The Debug process returns a similar error than the "GUI Flash Tool" error: "Unable to connect wire for probe index 1. Error: Wire Ack Fault - target connected?"

I added the "reset" wire, but no change.

Here is a schematic of the wires connections between the KL27 of my pcb sample and the MCU-link debug probe.
Could you please tell me if these connections are correct ?

 

0 Kudos

66 Views
converse
Senior Contributor IV

57 Views
offin
Contributor I

Thank you for this link.
I read the page. It looks like 3 wires are effectively needed (DIO, CLK, GND), plus RESET which is strongly recommended.

With my oscilloscope i see this in the debug port of the sample KL27 based PCB, when i press the button "Run" in the "GUI Flash Tool":
- there is some activity during around one second in the pins DIO and CLK
- then "MCUXpresso IDE" says "Unable to connect wire for probe index 1 ... Target connected?"
- then the pin RESET goes to low and stays at low until i disconnect/reconnect the MCU-link debug probe

I just tried with the KL25 based sample PCB (with KL25 SDK installed and project created from wizard), and same problem. It is written at the bottom right of the MCUXpresso window in red color: "No connection to chip's debug port".

It indeed looks like the connection between the MCU-link and the sample PCB is not correct.

I will re-check all connections.

 

0 Kudos

111 Views
ErichS
Senior Contributor III

Hi @offin ,

My goal is to upload a binary file to a sample pcb with a KL25 IC.

I assume that for your sample PCB you have a debug (JTAG/SWD) connector with the associated debug probe (LinkServer, P&E or SEGGER). If you are using the FRDM-KL25Z, then I assume you have programmed the board with the corresponding OpenSDA firmware.

Now it depends to some extend what binary (S19, Bin or Hex, see https://mcuoneclipse.com/2012/09/27/s-record-intel-hex-and-binary-files/ ) and debug connection you have. See https://mcuoneclipse.com/2017/05/06/using-eclipse-to-program-binary-files-to-an-embedded-target/.

For the 'GUI Flash Programmer' in the MCUXpresso IDE you have to have a project where it can store the settings. These come with the SDK files for the KL25Z (which I assume you have installed too).

Then it goes down to:

1) Create a new project using the Quickstart panel:

ErichS_0-1623128660882.png

 

2) Start the 'Program to Flash' action as outlined in https://mcuoneclipse.com/2017/05/06/using-eclipse-to-program-binary-files-to-an-embedded-target/ and point to your binary.

3) done.

 

A much easier route is if you have a J-Link connection to the device.

Start the JFlashLite.exe (I assume Windows: it is in C:\Program Files (x86)\SEGGER\JLink) and specify your device:

ErichS_1-1623128807300.png

Then specify your binary file and program it:

ErichS_2-1623128870196.png

 

done.

 

 

I hope this helps,

Erich