I have the Ethernet bootloader v2.6.3 and MQX 4.0.2 running on an MK60FX512 board. This application will be using the TFTP feature of the bootloader to upgrade MQX/application; the upgrade will be with a "raw" binary file.
1. I cannot figure out how the "go" address is derived. I was able to determine the "go" address for the binary by generating an s-record version of MQX and looking at the s-records. Can someone explain to me how the "go" address is derived? I thought it was the __boot location but this does not match the address from an objdump of the MQX elf file.
2. How can I make the "go" address fixed so that it stays the same for each new build of MQX? The reason is that in this application the upgrade can be initiated from an RS-232 command line or from an Ethernet network message. The network message only signals to start an upgrade so the "go" address is stored as a bootloader parameter that needs to stay the same for each new version of software.
Thanks in advance for your help.
************************************************
FNET Bootloader
************************************************
FNET TCP/IP Stack for MK60FN1
Version 2.6.3
Built Mar 27 2014 at 15:41:31 by CW
Copyright by FNET Community
GNU LGPLv3
************************************************
Interface : eth0
IPv4 Address : 192.168.1.40 <manual>
IPv4 Subnet mask : 255.255.255.0
IPv4 Gateway : 0.0.0.0
MAC Address : 00:04:9f:14:09:09
Link Status : connected
TX Packets : 3
RX Packets : 0
Free Heap : 14128
Enter 'help' for command list.
************************************************
Press any key to stop (go): 0
go 0x000177d9
.
.
.
MQX Version : 4.0.2
BSP Version : 01
Software Version: 00.00.04
.
.
.Setting static IP address............[OK]
IP Address : 192.168.1.40
Subnet Address : 255.255.255.0
Gateway Address : 192.168.1.1
Starting Telnet server...............[OK]
Creating shell task..................[OK]
Shell (build: Mar 26 2014)
Copyright (c) 2013 Freescale Semiconductor
shell>
shell>
Thanks for the responses. Raw (binary) upgrade made it a little more difficult since the binary file does not give a "go" address like an s-rec file does, and the entry address kept changing whenever new code caused __boot() to move. What I ended up doing was to create my own function called __startrom() that just calls __boot(). I made __startrom() the entry point and updated the linker file to have it always put __startrom() at 0xC420. So the "go" address in FNET is always 0xC420 now.
Hi Greg
Sorry for bother again.
One more question, is FNET bootloader 2.6.4 support FlexNVM program?
Hi Greg
I also using MK60FX512VLQ12 for ethernet application.
Could you please kindly share your experience how to implement FNET bootloader and modify MQX link file?
I met a issue now, console always print "****default_isr entered on vector 3*****".
I have download the latest version of FNET is 2.6.4.
Many thanks for your help.
Hi Greg,
I'm not sure about the behavior of a raw-file download as for me with a s-record (.S19) the bootloader (FNET 2.6.3 like you) can find by itself the go_address. (can change according your code changes)
What I did:
1. An "upgrade firmware" function in my software that clear the go_address boot parameter in flash using flashx driver. (write 0x00000000 @ 0xFF030 for a 1M)
2. Update the boot code to check 0x00000000 as invalid also in the go cmd. (Originally it checks => if((fapp_params_boot_config.go_address == 0) || (*(fnet_uint32*)address == 0xffffffff)) )
- By this was, the go is erased and software stays in boot to permit you an update. (I hard coded the boot script to start tftps and go directly after startup)
- No go address until a complete and secure software has been downloaded since the bootloader will save the new go_address only when the whole file has been successful downloaded.
I hope it help.
BR
-stéphan-
Hi Greg,
The "go" address is obtained from the last s-record. If you are using IAR, it will generate a different start address. You can go to the Project Options > Linker > Library and check "Override default program entry point" and set the Entry symbol you want.
And regarding to the fixed "go" address, you can hardcode the address you need in the FNET application.
Cegards,
Carlos