Hi:
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!
Hi Peter,
By default, MQX allocates the vector table at the first address of the flash memory, 0x0000-0000. Because probably this region of flash memory is used by your bootloader,so it will be necessary to reallocate the vector table in a RAM section.
I want to believe that this appnote can be a guideline for your application:
http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4367.pdf
This appnote describes how to add the FNET bootloader to Kinetis projects. There is a section that includes adding it to the MQX linker which is the section that I believe you will find useful.
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi soledad:
Thank you very much for replying.
This is bootloader without MQX, therefore, there is no MQX involve in this integration.
In this bootloader, I do use FNET as my Ethernet as one of communication channel. I am able to use proprietary PC software download firmware to the target board through the bootloader. this indicates me there is no problem in Ethernet module or MCU flash operation module. After several days further experiment, I found that the USB Host stack had interference with MCU flash operation module. Once I comment out the USB feature, my bootloader works very well. Now I need to concentrate on how the USB host crash my system once MCU perform any flash operation. Thanks!
Peter