Hello Rui Faria,
1. Check the hardware
FRDM-KL25 is using 8Mhz external crystal, I don't know whether your KL15 external circuit is the same as FRDM-KL25.
2. If you can make the code work in FRDM-KL25.
Then you can disable the USB function in the code, and download it to your KL15 board.
Please modify your bootloader_config.h
#if !defined(BL_CONFIG_UART)
#define BL_CONFIG_UART (1)
#endif
#if !defined(BL_CONFIG_I2C)
#define BL_CONFIG_I2C (0)//1
#endif
#if !defined(BL_CONFIG_SPI)
#define BL_CONFIG_SPI (0)//1
#endif
#if !defined(BL_CONFIG_USB_HID)
#define BL_CONFIG_USB_HID (0)//1
#endif
#if !defined(BL_CONFIG_USB_MSC)
#define BL_CONFIG_USB_MSC (0)//1
#endif
Just leave UART port.
3. If you are still not OK, you can debug your board, check it, where the code is stopping.
Because I don't have the board, then you need to test it on your side by yourself.
Any updated test information, please let me know.
I think, the most important thing is, you need to make your own KL15 board works at first with the external 8Mhz, you can use KDS PE to configure a project, and test it.
Just to exclude the hardware problem.
About the KL15 headfile, I have attached, please refer to it.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------