How to implement K64 bootloader with user program?

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

How to implement K64 bootloader with user program?

Jump to solution
1,206 Views
sierra18
Contributor II

I am having issues implementing/modifying the NXP provided bootloader code as a way to perform a firmware update to my application.

 

All of the firmware code should be able to be triggered through some form of function call/command by my custom application.

I am using an external flash connected over SPI to store the new firmware file, and have already developed code that can be saved in RAM to communicate with the selected location.

In a previous thread (link) I was referred to the example projects frdmk64f_flashloader and frdmk64f_flashloader_loader as being implementations to look at and modify.

However, I cannot get my bearings as to what areas to modify and how to approach using this example with my implementation.

Can someone help point me to references that explain what is going on with these two projects in more detail? Or point me towards the particular code sections of these examples I should be modifying/using?

 

 

Development tool details:

  • MCU Expresso IDE
  • using custom board that contains MK64VLL12
0 Kudos
1 Solution
1,068 Views
sierra18
Contributor II

Based on how long it would take me to understand the NXP bootloader as well as all of the modifications I would have needed to do to it, I decided to use uTasker.

I highly recommend them if you find yourself in need of a bootloader. Mark was very quick to respond to emails and managed to find solutions to my problems quickly. We managed to get done in 5 days what would have taken me weeks.

View solution in original post

0 Kudos
7 Replies
1,069 Views
sierra18
Contributor II

Based on how long it would take me to understand the NXP bootloader as well as all of the modifications I would have needed to do to it, I decided to use uTasker.

I highly recommend them if you find yourself in need of a bootloader. Mark was very quick to respond to emails and managed to find solutions to my problems quickly. We managed to get done in 5 days what would have taken me weeks.

0 Kudos
1,194 Views
mjbcswitzerland
Specialist V

Hi

This functionality (with intermediate storage in various SPI flash types and support for most Kinetis parts) is integrated in the open source uTasker project on GITHUB, including encrypted operation:

https://github.com/uTasker/uTasker-Kinetis

 

Documentation https://www.utasker.com/docs/uTasker/uTasker_BM_Loader.pdf

and simulation guide https://www.youtube.com/watch?v=lm3M-ZlaFLQ&list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&index=17

 

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/kinetis/FRDM-K64F.html

 

0 Kudos
1,156 Views
sierra18
Contributor II

Hi,

I'm liking the ease of set-up so far of your project and am very glad that you shared the video link for tutorials. I noticed in the config step that there is not an option to select a KINETIS_K64 board, are there unique #defines I will need to modify to interact with this?

Thank you for all the help so far!

@mjbcswitzerland 

0 Kudos
1,149 Views
mjbcswitzerland
Specialist V

Hi

The GitHub version was committed in 2016 and not been maintained in the same way as the supported developer's version - it didn't have a K64 configuration. But this is easy to fix since the serial loader and application projects have almost all Kinetis parts configurations which can be copied to it.

I have however added a K64 config (in config.h in the uTaskerBoot project) so you can pull the check-in I just performed to get this.

Regards

Mark

 

0 Kudos
1,187 Views
sierra18
Contributor II

My project is currently set-up to use freeRTOS will uTasker still work?

0 Kudos
1,183 Views
mjbcswitzerland
Specialist V

Hi

The loader can be used by applications built with any operating system.

The open source uTasker Kinetis project application also includes FreeRTOS, as well as the uTasker scheduler.

Regards

Mark

 

 

0 Kudos
1,196 Views
tbiberdorf
Contributor IV

It would be nice to know what changes would be needed to be able to target an external SPI Flash rather than a USB-BM interface.

Also, how do you adjust for the name, size, location of the new code that is to be loaded?

 

Thanks

Terry

0 Kudos