USB Bootloader in MQX

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

USB Bootloader in MQX

1,478 Views
admin
Specialist II

Hi,

I'm new in MQX world, I don't understand  if there is an USB bootloader that works without ethernet or serial. I can explain better, I'm searching a bootloader alreardy done that works:

 1) I insert USB with file.s19 and a file.txt where there is a command

 2) Reset

 3) In automatic the device read file.txt and understand if upgrade with file.s19 or not

 

Regards,

MG

0 Kudos
Reply
2 Replies

401 Views
admin
Specialist II

I'me searching for an USB bootloader that works in MQX ...

0 Kudos
Reply

401 Views
CarlFST60L
Senior Contributor II

There is not much to it once you understand how it all works.

 

Call your bootloader from within vectors.c (you have to modifiy vectors in MQX, add your bootloader call code there before the two calls that start MQX.

You can then run straight C code based on non MQX libraries supplied by freescale, or, make a cut down version of MQX with only what you need to load the USB and upload the flash image (obviously your boot loader will either do its flash update, or, boot to the valid MQX)

Obviously you will have to modifiy your linker file to make the area's for your boot loader and code, or, in my case, boot loader (MRAM), and two images and let the boot loader choose the right image to boot.

 

I have setup a dual boot image in mine, I just have to compile two versions of my code, one for image 1 and one for image 2, (and another for the bootloader itself) the actual image upload happens from within MQX so all the drivers are loaded and running.

 

I also have a USB boot loader that will update the code directly from the boot loader if its attached on power up.

 

Our boot loader ony selects the 'right' image to boot to by checking some NVM. The actual image updating happens from within the main MQX code.

 

I use to believe MQX should provide a boot loader, however, its really outside what the MQX RToS is for.