serial bootloader for K10 using Codewarrior 10.2

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

serial bootloader for K10 using Codewarrior 10.2

Jump to solution
1,018 Views
Klayton
Contributor III

All,

I am in need of some help.  I am attempting to write a serial bootloader for a K10 processor using Codewarriror 10.2.  I am not using any RTOS or PE stuff.  I have working application code that runs fine, but now I need to write the bootloader.  I have looked at several application notes in an attempt to figure this out but have had little luck.  It seems that they are either written for the IAR compiler or leave out critical info (like how to modify the bootloader's linker file, not just the application's)  Here are the biggest questions I have so far:

 

Application side:

- Linker file needs modification to fit the bootloader into the first part of flash.  This means re-locating the interrupt vector table.

 

- Where do I move the vector table?  to another area of flash?? ram?? which is best and how do I do this?? (in codwarrior with kinetis compiler)

 

 

Bootloader side:

- modify bootloader linker to limit size so it fits in the spot defined in application's linker.  

 

- I understand that I need to limit the m_text section of memory in the linker file, do I also need to limit m_data (RAM) for the bootloader?  Do I need to relocate this??  If I do, where??

 

- Can the bootloaders interrupt vector table remain unchanged?  

 

- provde means to jump to application code

 

 

 

Please realize that this is my first foray into bootloaders and so I have far more (probably dumb) questions than answers.  Any help at all would be greatly appreciated.  

 

K

0 Kudos
1 Solution
456 Views
mjbcswitzerland
Specialist V

Hi

 

There is a serial (SREC) based boot loader for the Kinetis parts in the uTasker project: http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF which occupies about 9k of Flash when built with CW10.2.

 

The application needs to be linked to an address after the end of the serial loader and the serial loader jumps to it as if it were a normal reset vector.

 

The application needs to use an interrupt vectortabel in SRAM and then there are no compatibility problems.

 

Regards

 

Mark

 

P.S. I addition to the SREC loader, which can also be encrypted as described in http://www.utasker.com/docs/uTasker/uTaskerSecureSREC.pdf the serial loader supports USB (when available) and SD card loading (SPI or SDHC based). The project also includes Ethernet (FTP and HTTP) web server loaders for Kinetsi devices with Ethernet.

 

View solution in original post

0 Kudos
2 Replies
456 Views
ignisuti
Contributor IV

Klayton, I'm getting ready to start the same task on the same MCU.

If you have any advice, or even code you could share, the head-start would be greatly appreciated.

0 Kudos
457 Views
mjbcswitzerland
Specialist V

Hi

 

There is a serial (SREC) based boot loader for the Kinetis parts in the uTasker project: http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF which occupies about 9k of Flash when built with CW10.2.

 

The application needs to be linked to an address after the end of the serial loader and the serial loader jumps to it as if it were a normal reset vector.

 

The application needs to use an interrupt vectortabel in SRAM and then there are no compatibility problems.

 

Regards

 

Mark

 

P.S. I addition to the SREC loader, which can also be encrypted as described in http://www.utasker.com/docs/uTasker/uTaskerSecureSREC.pdf the serial loader supports USB (when available) and SD card loading (SPI or SDHC based). The project also includes Ethernet (FTP and HTTP) web server loaders for Kinetsi devices with Ethernet.

 

0 Kudos