I have been unable to get the ROM Bootloader to launch on the KL43 device p/n MKL43Z256VLH4. Specifically, on a new chip on our target board, I successfully load our app through the SWD port; but attempting to connect to the LPUART0 with the Windows app KinetisFlashTool.exe always responds with the message, “Connect device failed”. I have checked the bootloader configuration area on the flash memory (3C0 – 3FF) and it has not been modified (all FF). I have attempted to connect via UART interface on our target, and also on a FRDM-KL43Z board through the open-SDA interface, and the response is the same in each case:”Error: Connect device failed(Error: Initial ping failure: Invalid packet type.).
Update: I later discovered that the KDS disables bootloader by default by writing to address 0x40D the first time any application code is written. Modifying the default startup_MKL43Z4.S with something other than:
/* Flash Configuration */
.section .FlashConfig, "a"
should fix this.
If anyone has a simpler way to keep the bootloader enabled when using KDS, your input is appreciated. Thanks.