6 years, 5 months ago.

How to use more than 64Kb flash memory for the K64F

If the value for NUM_SECTORS is greater than 16 (64kB) then the MCU locks up or freezes during the for loop using function erase_sector(), with no errors reported.

It would be nice to use more than 128KB of flash memory realizing that the functions with

__attribute__((section(".ARM.__at_0x10080"))) static void setupserial(void) {

are using the upper sectors which should not be erased.

I suspect the bootloader function with address

__attribute__((section(".ARM.__at_0x10000"))) void bootloader(void) {

is being erased when NUM_SECTORS is greater than 16, since


is decimal 65536.

Would I be correct in concluding that for the FRDM-K64F with 1MB flash I need to change the start address mapping to a larger number?

Question relating to:

Example of a Serial bootloader for the K64F platform bootloader, FreescaleIAP, K64F

1 Answer

6 years, 5 months ago.

You are correct, I randomly choose that value, you will need to move it to a larger value if you need more flash. I randomly picked that one, and since it is sufficient for just demonstrating how to do it I never changed it. Now if you do more than 16 sectors it indeed erases its own bootloader.

Accepted Answer

Thank you Eric, for confirming this.

posted by -deleted- 01 Apr 2015