During my development of bootloader for KL25Z, I found user application starts from any other flash address including 0x4000/0x8000/0xC000 still reserve its original flash protection bytes. Is that necessary?
If we remove these re-directed flash protection bytes, we can save some memory for user application, which is meanful in small micros like KL05Z/KL02Z.
Considering re-direct address is 0x8000, the flash memory ranges from 0x8400 to 0x840F can be freed for user code. Some icf link file even start user application from 0x410 and abandons the room before 0x0400, like FRDM_KL25ZDemo project does. If we remove this, then we can save more bytes, like 0xC0~0x420, about 864 B.
Solved! Go to Solution.
Hi Liu Kai,
The FPROT section will be loaded to FTFA_FPROTn register during the chip reset. During the chip reset, the 0x400 ~0x40F value will be loaded.
After the chip reset, the FPROT related section without any function during the application code run phase.
If the customer application code re-directed at 0x8000, the 0x8400~0x840F contents can be erased without any problem.
Wish it helps.
B.R.
Ma Hui
Hi Liu Kai,
The FPROT section will be loaded to FTFA_FPROTn register during the chip reset. During the chip reset, the 0x400 ~0x40F value will be loaded.
After the chip reset, the FPROT related section without any function during the application code run phase.
If the customer application code re-directed at 0x8000, the 0x8400~0x840F contents can be erased without any problem.
Wish it helps.
B.R.
Ma Hui