I am working on bootloader for my custom target board with K60FN1M0 (120MHz with 1M Flash capacity) based on "AN2297 Developer's serial bootloader" and "AN4368 USB MSD Host bootloader". I would like to be able to flash my application at address 0x10000 when a USB stick is attached with default "image.s19" presented.
The "AN2297 Developer's serial bootloader" gives me ability to program K60FN1M0, and "AN4368 USB MSD Host bootloader" shows me how to make USB host with FatFS file system. However, I am facing problem with this integration. I have target address erased at the beginning of initialization. Once I have my USB stick attached, the software trapped with hard fault.
However, if I comment out wither flash operation or FatFS operating, the software works well.
I wonder if anybody have experience on this situation. If you have any suggestion, please let me know. Thank you very much!