Hi Nikhil,
That ISR tells me that the project has an incorrect entry point... when the bootloader passes control to the application it does not start at the correct address. I had the same experience when developing MQX applications with AN4367. By the way, I was using IAR development environment. Here is my findings, and fixes....
Ethernet Bootloader MQX example
An MQX project needs to have user_config,h modified so that it uses RAM vectors... FNET is using the default vector table at 0x0000_0000.
In user_config.h for the BSP, make the following additions:
#DEFINE MQX_ROM_VECTORS 0
Build the libs.
Take an existing MQX example program. It needs some modifications.
1) Needs a new linker file - see intflash_fnet.icf in the project
2) Entry point needs to be fixed: MQX begins execution in cortex.boot.s at the symbol __boot, which is a public symbol. In IAR project options [Alt-F7] Linker | Library view, Override default program entry and specify symbol __boot
3) Not essential, but in IAR project options [Alt-F7] Output Converter | Output view, give the output SREC a helpful name, eg <projectname>_fnet.srec
Build the project. You can modify the BUILD #define to program varying delays into the LED blinking to test you've actually changed the image.
RUNNING THE EXAMPLE
===================
Build FNET bootloader twrk60n512_boot.eww in the FNET 1.0.0 installation. Doesn't need any fixing up. Ethernet project, so TWR-K60N512 uses clock from TWR-SER. Flash image. Console output on 115,200 8N1 as it boots, so run HyperTerminal.
Run tftpd32.exe.
Copy the SREC from step 3 above into short path on harddrive, and point tftpd32.exe to that path. Note IP address assigned to tftpd32.exe displayed in window, in my example is was .10
In HyperTerminal, get IP address assigned to board. Use command sequence:
Parameters loaded from Flash.
************************************************
FNET Bootloader
************************************************
FNET TCP/IP Stack for MK60N512
Version 1.0.0
Built Apr 3 2012 at 15:23:51 by IAR
Copyright 2005-2011 by Freescale Semiconductor
GNU LGPLv3
************************************************
Interface : eth0
IP address : 192.168.1.22 (set manually)
Subnet mask : 255.255.255.0
Gateway : 192.168.0.1
MAC address : 00:04:9F:15:23:57
Link status : connected
TX Packets : 4
RX Packets : 0
Free Heap : 14144
DHCP client : disabled
TFTP server : disabled
Enter 'help' for command list.
************************************************
Startup script: tftps
************************************************
TFTP server (192.168.1.22) started.
************************************************
BOOT> dhcp <<<<<<<<<<<<<<<<<<<<<<<<<<< Type this
Press [Ctr+C] to cancel.
Sending DHCP discover...
************************************************
DHCP has updated/renewed parameters:
************************************************
Interface : eth0
IP address : 192.168.0.11
Subnet mask : 255.255.255.0
Gateway : 192.168.0.1
BOOT> erase all <<<<<<<<<<<<<<<<<<<<<<<<<<< Type this
Erasing...
0x00000000 to 0x0000BFFF skipped
0x0000C000 to 0x0007F7FF erased
0x0007F800 to 0x0007FFFF skipped
BOOT> tftp blinky_fnet.srec 192.168.0.10 <<<<<<<<<<<<<<<<< Type this
Press [Ctr+C] to cancel.
TFTP downloading 'blinky_fnet.srec' (srec) from 192.168.0.10: |
Entry point set to 0x0000C46D
TFTP completed (121654 bytes)
BOOT> set go 0xc421
go : 0xC421
BOOT> save
Parameters saved
BOOT> go
Initialize IO
LED1_TASK created
LED2_TASK created
LED3_TASK created
LED4_TASK created
led1 task
led2 task
led3 task
led4 task
POWER CYCLE BOARD