10 years, 2 months ago.

Bootloader on KL25Z MCU

Hi there,

I have my custom board using Freescale KL25Z, I have developed a bootloader for it, the bootloader uses 12KB in flash.

However, the mbed online compiler makes the firmware to be located at address 0 for boot-up. Is it possible to link it to be bootable at address 12KB so that my bootloader can boot it up?

Thanks, Danny

Hello Danny Poon,

what do you mean by "the firmware" ? Can you provide some more details..

Regards,
0xc0170

posted by Martin Kojtal 17 Feb 2014

3 Answers

Danny Poon
poster
10 years, 2 months ago.

I mean the binary compiled by the mbed online compiler.

-Danny

how did you write your bootloader? shouldn't that one be started at 0x0 and then start teh application if there's any? Tell us more about your bootloader, I am still in dark, sorry.

posted by Martin Kojtal 17 Feb 2014

I wrote the bootloader with gcc which reads application firmware via the USB port and writes to the flash address 0x3000, and then relocates the vector table and jumps to that address to run the application.

The application firmware I hope to be developed using the mbed online compiler.

-Danny

posted by Danny Poon 18 Feb 2014
9 years, 7 months ago.

I see that Freescale has a HID Boot Loader (Application Note AN4764) and it requires that application code be loaded starting at 0x10C0 instead of 0x410. It would be great to be able to use this so that a field update could be performed from USB on a KL25Z based device without the OpenSDA interface. Any progress on getting this to work with mbed?

9 years, 7 months ago.

The online compiler doesn't support building applications with an offset address at the moment. You'll need to use an offline toolchain for the time being.

http://mbed.org/handbook/Exporting-to-offline-toolchains

Is this complicated? I would have thought that somewhere in mbed-lib is the load address.

posted by Tom Russell 21 Sep 2014

Not complicated, just not something that is not enabled at the moment.

posted by Sam Grove 22 Sep 2014