Hi All,
I tried AN4379 Boot loader example for TWR K60 board in CW 10.5, MQX 4.0 using the "Freescale USB Mass Storage Device Bootloader" document.
But when i copy the ".afx.s19" image to the the Bootloader Drive the Drive disappears and appears again showing "SUCCESS.TXT" file which is expected as per document. But the code never switch to user application area, again when i restarts the board it goes to the boot loader. I tried with the images given in the zip file but no use. So i created a MQX hello world program by changing the .lcf file as the following
MEMORY
{
vectorrom (RX): ORIGIN = 0x0000C000, LENGTH = 0x00000400
cfmprotrom (R): ORIGIN = 0x0000C400, LENGTH = 0x00000020
rom (RX): ORIGIN = 0x0000C420, LENGTH = 0x00077BE0 # Code + Const data
ram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000 # SRAM - RW data
# kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap)
end_of_kd (RW): ORIGIN = 0x2000FFF0, LENGTH = 0x00000000
# Boot stack reused by MQX Kernel data
bstack (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200 # Boot stack
end_bstack (RW): ORIGIN = 0x2000FC00, LENGTH = 0x00000000
}
but the same issue it always goes into bootloader code and i am not sure if it is writing the user code to its flash location.
The serial port shows the following log before copying the .afx.s19 file,
CodeWarrior binary file found
FLASHING....
Please do not remove your device
########################
Erasing flash memory...
#######################################################################################################################################################################################################################################
ERASE complete!
Open Image File
ERROR......
Unknown file type#
Erasing flash memory...
#######################################################################################################################################################################################################################################
ERASE complete!
Open Image File
Erasing flash memory...
#######################################################################################################################################################################################################################################
ERASE complete!
Open Image File
And here is the log when i copy paste the .afx.s19 file to the drive,
"
Flash image file complete!
Press RESET button to enter application mode.
Erasing flash memory...
#######################################################################################################################################################################################################################################
ERASE complete!
Open Image File
Erasing flash memory...
#######################################################################################################################################################################################################################################
ERASE complete!
Open Image File
Erasing flash memory...
#######################################################################################################################################################################################################################################
ERASE complete!
Open Image File
Erasing flash memory...
#######################################################################################################################################################################################################################################
ERASE complete!
Open Image File
"
Then the drive reappears and shows SUCCESS.TXT file.
Please let me know in which step i went wrong.
Thanks
Pramod