How can I program a bootloader binary file during debug of a major application ?

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

How can I program a bootloader binary file during debug of a major application ?

888 Views
nexcode
Contributor II

Someone can help me ?

How can I program a bootloader binary file during debug of major application ?

I develop a bootloader for a K64 product, but I would like to insert it on the major application.

In a way that, when I make a debug/release of this major application, the KDS insert first, the binary (or .s19) file in the begining of flash memory and after it, insert the major program.

So when a boot occur, the bootloader runs first and in the sequence... the major application will run in sequence, after bootloader do not detect some firmware upgrade ( on a external flash)

Today.

My major application loads the new application to a external flash memory and after it

I open/run bootloader application that look to this external flash memory, see the "new" application

and loads it to the right position on K64 flash memory.

It's hard and generate some dificults on production.

So. how can I insert the binary bootloader file (In the project explorer for example) and load it into flash memory together ?

I think that I a have to edit some launch settings or init file and include the name of a bootloader binary file.

But I do not know how to do it.

It is to not to do all this stages that I make today.

Best Regards

Rodrigo

Labels (1)
Tags (1)
0 Kudos
1 Reply

710 Views
mjbcswitzerland
Specialist V

Hello Rodrigo

If I have understood correctly you have developed something similar to the uTasker "Bare-Minimum" loader so see this document that may help with some practical details: http://www.utasker.com/docs/uTasker/uTasker_BM_Loader.pdf

The way that the loader is used is to build the loader and then the application and combine the outputs images to a single binary or SREC, which is the loaded to the board as a single image during production (see the uTasker utilities http://www.utasker.com/forum/index.php?topic=1445.0 for combining files).

When developing it is usual to first program either of the two (which will not operate alone) and then program the second one that you would like to debug. Some IDEs allow this because they only delete the Flash areas that the code will be loaded to but some don't because they will simply delete all memory and thus trash the first one. IAR, for example, is easy to work with. For less flexible IDE/debuggers you can load the combined file and then "connect" to the code with the debugger (without loading) and then debug from this point.

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html
Kinetis K64:
- http://www.utasker.com/kinetis/FRDM-K64F.html
- http://www.utasker.com/kinetis/TWR-K64F120M.html
- http://www.utasker.com/kinetis/TEENSY_3.5.html
- http://www.utasker.com/kinetis/Hexiwear-K64F.html
BM-Loaders: http://www.utasker.com/docs/uTasker/uTasker_BM_Loader.pdf
Serial loaders: Serial Loader: http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf