Kinetis K boot loader code optimization/minimization

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Kinetis K boot loader code optimization/minimization

934件の閲覧回数
paulschoenke
Contributor III

Hello:

For a new project, I’m looking to use the Kinetis MK02FN64VLF10.  If we need more memory or a smaller footprint for the project we will be going to the MK22FN128VMP10.

I will not be doing the firmware for this project, however I've been tasked with getting the boot loader code needed for this micro.

Are there any code snippets and associated application notes / descriptions for protecting the flash memory that contains the boot loader?

Also, since we plan on using UART1 for programming, we would like to know what code can be removed from the boot loader code that's not being used, such as the code for programming with the IC2, and SPI bus. The amount of flash memory is limited on this device and we’re trying to optimize the code density with the flash size.

Any feedback or input is welcomed and appreciated.

Thanks again!

Paul

ラベル(1)
0 件の賞賛
返信
1 返信

796件の閲覧回数
mjbcswitzerland
Specialist V

Hi

For low memory footprint KBOOT, Developer's loader (AN2295), UART SREC/IHEX loaders for your parts you can see also

http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF

This will avoid you needing to port or rework code and solves your boot sector protection with a single define:

#define KINETIS_FLASH_CONFIGURATION_PROGRAM_PROTECTION (0xffffffff)  // PROT[24:31]:PROT[23:16]:PROT[15:8]:PROT[7:0] - no protection when all are '1'

#define KINETIS_FLASH_CONFIGURATION_PROGRAM_PROTECTION (0xffffffe) for example protects the lowest sector (setting each subsequent bit to 0 protects further sectors).

Works with KDS, CW, IAR, Keil, Rowley Crossworks, Atollic, Green Hills, Coo Cox, GCC and VS.

Kboot UART mode is about 6k (depending on compiler) without any further configuring/optiisation work required. See http://www.utasker.com/kinetis.html for reference binaries available for most boards.

Regards

Mark

0 件の賞賛
返信