How do you flash a binary to kinetis with multilink universal fx?

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

How do you flash a binary to kinetis with multilink universal fx?

4,492 Views
robotjosh
Contributor IV

I have been able to modify my bootloader to generate a binary and fill it with 0xff up to 0x10000.  I concatenate this with a main application compiled for address 0x10000 with the section at 0x400 removed.  The resulting binary should load the bootloader, then jump to the main application and run from there.  The problem now is how do you load a .bin file using the multilink fx?  I see the "Load executable" option and point it to my concatenated binary.  Then I run the debugger and it fails to load.  Looking at the logs I see this message "is not an object file: File format not recognized".  Does this debugger only support elf files?  There must be a way to flash a binary.

0 Kudos
15 Replies

1,504 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Josh:

There is a variety of options to do that. However when posting a question please mention the MCU part number and also the IDE or software tools you are using or trying to use. In general any information or details that could be relevant for your question.

This way it is easier for the community peer developers or Freescale employees to help you :smileyhappy:.

Regards!

Jorge_Gonzalez

0 Kudos

1,504 Views
robotjosh
Contributor IV

Its a MK22FN512VLH12 and I am using kinetis design studio.

0 Kudos

1,504 Views
BlackNight
NXP Employee
NXP Employee

Hi Josh,

you can use the 'Flash from file...' in Kinetis Design Studio:

pastedImage_0.png

Erich

0 Kudos

1,504 Views
robotjosh
Contributor IV

This appears to have the same problem as flashing from debug, the configuration screens are the same too.  I have put the binary path in "C/C++ Application" and unchecked "Load symbols".  I noticed the same error from the gdb logs:

084,471 &"\"C:\\Users\\josh jordan\\Documents\\geektree_local\\pgm\\Bootloader_K22\\Debug\\full.bin\\

" is not an object file: File format not recognized\n"

On further inspection, nothing was written to flash.

0 Kudos

1,504 Views
a8Chcx
Contributor V

Hi Guys,

I have the same problem on FRDM-K64F demo board with KDS 2.0. Could anyone tell me how to fix problem to load "freedom_bootloader.bin" to my board by using KDS 2.0 with USB Multilink?

Thanks,

Christie

0 Kudos

1,504 Views
robotjosh
Contributor IV

I'm not sure its possible to flash a .bin file from the multilink.  You can use the debug chip on the FRDM-K64F by resetting its firmware and then drag and drop bins to the mass storage device it enumerates as.

0 Kudos

1,504 Views
a8Chcx
Contributor V

Hi Josh,

It works fine if I use "drag and drop"...Now, I am using KDS2.0 to build my boot-loader for K64 MCU. But, I want to try the one that Freescale provided. Looks like that I can't flash *.bin using KDS. Only file I can flash is "*.elf". Is it true?

What kind of IDE are you using to develop your boot-loader? Any suggestion?

Thanks,

Christie

0 Kudos

1,504 Views
robotjosh
Contributor IV

I'm actually wrapping up work on a K22F bootloader right now.  I made 2 separate projects for the bootloader and main app.  For the main app, I changed interrupts to run from ram so they don't conflict with bootloader interrupts.  Modified the linker script to begin at location 0x10000 and checked the option for processor expert to not generate linker.  To debug the main application this way, I added a few debugger statements to write at 0x00 the jump statements to begin at 0x10000.

0 Kudos

1,504 Views
a8Chcx
Contributor V

Hi Josh,

Thank you for your information. Are you using KDS? Are you build your own boot-loader by using KDS? Or are you working on some sample project?

When you build the application for boot-loader, are you using KDS? If so, are you using PE to change "build options" on MCU?

Thanks,

Christie

0 Kudos

1,504 Views
robotjosh
Contributor IV

Yes I am using KDS to write bootloader and main app.  I used PE build options to disable linker generation because I made small changes to the linker script. Here is more info on what I did in this thread: Bootloader for Kinetis K64 (Cortex M4)

0 Kudos

1,504 Views
a8Chcx
Contributor V

Hi Josh,

What kind of file do you build for boot-loader? Which tool do you use to flash to MCU?

Thanks,

Christie

0 Kudos

1,504 Views
robotjosh
Contributor IV

The bootloader is flashed from the kds debugger from elf format.  I don't yet have a way to flash the bootloader from bin using the multilink.  Might have to purchase the cortex flash tool from arm in order to do that.

0 Kudos

1,504 Views
a8Chcx
Contributor V

Hi Josh,

Do you know if there is any one to provide the service for source code level boot-loader of K64F using KDS?

Look like that I have to buy j-link+j-flash to flash *.bin file...

Thanks,

Christie

0 Kudos

1,504 Views
robotjosh
Contributor IV

We can do that at Anidea, we have done many bootloaders, most recently for the K22F.  Check out anidea-engineering.com.

0 Kudos

1,504 Views
a8Chcx
Contributor V

Hi Josh,

I want to do boot-loader on K64F120 with UART and CANBUS interface...

Could you tell who I can talk to and want to get the price of that?

Thanks,

Christie

0 Kudos