K60 AN4379 USB MSD Boot loader not switching to user application

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K60 AN4379 USB MSD Boot loader not switching to user application

773 Views
pramodk_g_
Contributor III

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

0 Kudos
2 Replies

493 Views
pramodk_g_
Contributor III

Hi All,

Just now i figured out that this issue is only in Windows 8. In windows 8/8.1 when we try to copy and paste the .S19 file it is showing error because as soon as we paste or drag and drop into the drive, the drive disappears and windows shows error in copying. So i assume the image file is not loaded into the flash.

In windows 7, only after the completion of paste operation the drive disappears and the flashing is working. In this case the code is jumping to user application area.

Please let me know what is the issue in Windows 8. Will the provided code work on windows 8 or is it meant for only windows 7 etc?

Also we found that MAC PC is not even recognizing this device as Mass Storage.

Please let us know if there is any version of K70 boot loader code that will work for MAC, Windows 8 and Windows 7.

Thanks

Pramod

0 Kudos

493 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Pramod:

Thanks for sharing, I think this post answered your question , K60 MSD boot loader not switching to user flash

Regards

Daniel

0 Kudos