MQX bootloader help / interrupt vectors

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

MQX bootloader help / interrupt vectors

Jump to solution
1,375 Views
ralu
Contributor III

I need bootloder that does not fail. That mean that if you turn off power during update it does not crash. Devices I am working on must be able to upgrade image over some bus (does not matter which) one. 

I have done bootloader before whit such feature and this is how it worked.

 

Memory map (linked file - pseudo code):

 

%vectors pointing on jump list: (n vectors)jv1jv2jv3...jvnbootloader code working whitout interrupts (approx 4k)------------------- % this address is fixedjv1: .jmp vector1jv2: .jmp vector2...jv3: .jmp vector nall reamining code

 

Bootloader is working in way that it figures out if it has valid image in memory device (external flash in my case) and copies that image at address space after  end of bootloader where is

line jv1: .jmp vector1.

 

It is responsibility of main  program that enables writing code from bus (eth for instance) to  appropriate address in memory.

 

We can see that this approach does not consume much of flash and can be done ressistant on power faliures.

Now I need something similar in MQX, but i have problems understanding how are vectors mapped.

My cpu is 51JM

 

Only table i can find is in vectors.c but all vectors there are mapped on DEFAULT_VECTOR which is _int_kernel_isr.

Does MQX maps all interrupts tough this _int_kernel_isr ? 

 

Woul be enough if i put only jmp  _int_kernel_isr on fixed place out of kernel space and vectors pointing on SP (stack pointer) and PC (program counter), so that they can be changed later if needed. 

Thanks 

 

0 Kudos
1 Solution
361 Views
DavidS
NXP Employee
NXP Employee

Hi Ralu,

The USB MSD Bootloader does work on JM128 (ColdFire V1), ColdFire V2, and Kinetis.

Here is information on it and several others as reference material others might like:

AN4367 : Ethernet Bootloader for MCU (pdf)| AN4367SW |   
This document explains how to modify the .lcf and .icf link files of CodeWarrior and IAR IDEs respectively, in order to...

AN4370 : USB DFU Bootloader for MCUs (pdf)| AN4370SW |   
This document demonstrates how DFU fits in an embedded device and gives examples of implementation using a PC with...

AN4368 : USB Mass Storage Device Host Bootloader (pdf)| AN4368SW |   
Bootloader is a small program put into a device that allows user application codes to be programmed to the...

AN4379 : Freescale USB Mass Storage Device Bootloader (pdf)| AN4379SW |   
This application note describes a mass storage device (MSD) USB bootloader that has been written to work with...

 

https://community.freescale.com/thread/102108

 

Also documents for MQX:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MQX&fpsp=1&tab=Documentation_Tab&tid=...

 

Hope this helps.

Best Regards,

David

View solution in original post

0 Kudos
1 Reply
362 Views
DavidS
NXP Employee
NXP Employee

Hi Ralu,

The USB MSD Bootloader does work on JM128 (ColdFire V1), ColdFire V2, and Kinetis.

Here is information on it and several others as reference material others might like:

AN4367 : Ethernet Bootloader for MCU (pdf)| AN4367SW |   
This document explains how to modify the .lcf and .icf link files of CodeWarrior and IAR IDEs respectively, in order to...

AN4370 : USB DFU Bootloader for MCUs (pdf)| AN4370SW |   
This document demonstrates how DFU fits in an embedded device and gives examples of implementation using a PC with...

AN4368 : USB Mass Storage Device Host Bootloader (pdf)| AN4368SW |   
Bootloader is a small program put into a device that allows user application codes to be programmed to the...

AN4379 : Freescale USB Mass Storage Device Bootloader (pdf)| AN4379SW |   
This application note describes a mass storage device (MSD) USB bootloader that has been written to work with...

 

https://community.freescale.com/thread/102108

 

Also documents for MQX:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MQX&fpsp=1&tab=Documentation_Tab&tid=...

 

Hope this helps.

Best Regards,

David

0 Kudos