TFTP Boot loader for LPC1769

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

TFTP Boot loader for LPC1769

1,875 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jharwood on Mon Feb 07 09:08:08 MST 2011
A project I'm working on involves an LPC1769 in a remote location communicating with the outside world via wired ethernet.

From time to time, I would like to upgrade the firmware without having to physically interact with the target. So I came up with this TFTP secondary boot loader.

When the MCU is reset or powered on the boot loader is run first. It makes a TFTP request to a predefined IP address for a predefined file. If successful, the contents of the file are written to flash starting at location 0x10000 (64k) and the boot loader jumps to the application code. If the TFTP server is down, or the file is not available, the boot loader jumps to the existing application code. Of course, checks are made to determine the validity of the application code before running it.

Please see the readme.txt file included in the project for more details.
0 项奖励
回复
5 回复数

1,669 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by alanisgp on Thu Mar 08 10:57:39 MST 2012
Following the step to debug the user application, according to the steps contained in the wiki Code Read:

http://support.code-red-tech.com/CodeRedWiki/DebugThroughBootloader

I run the application which stopped at the Systick ISR, which was not authorized within the code in particular, and there was no implementation.

In a previous attempt had disabled all INT or so I believed by a call to the code:

    //NVIC_DeInit();
    //NVIC_SCBDeInit(); now commented

A simple call to NVIC_DisableIRQ (SysTick_IRQn) went straight to the hardfault!, I do not know why yet...
It worked with the addition of functions contained in "lpc17xx_systick.h" to disable Systick and its interruption.
Add file to see the amendment, I have included the ".H" file because the definitions that exist but C code was copied directly into the flash.c file.
Hope this helps, it was a headache not knowing where my application was going while conducting the code break ..
Best regards!
0 项奖励
回复

1,669 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by alanisgp on Wed Mar 07 06:05:27 MST 2012
Hi, I have successfully managed to run the application, in fact,  download the binary image and burn it to flash. The problem I have found  then is that it hangs when trying to run the user application. I  followed all the steps to create the corresponding script link to the  binary image.
Why not run?. Any  suggestions?
Thank you very much and best regards
0 项奖励
回复

1,669 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hareesha on Wed Feb 15 22:51:42 MST 2012
[COLOR=#000000][FONT=Times New Roman, serif][SIZE=3][/SIZE][/FONT][/COLOR]


[COLOR=#000000][FONT=Times New Roman, serif][SIZE=3]          Mr Jharwood, Thanks for your help, Do u have any useful documents, data and links to understand your application and code. If u have plz give, I will tell you infinity thanks to you.[/SIZE][/FONT][/COLOR]
[COLOR=#000000][/COLOR]


[COLOR=#000000][FONT=Times New Roman, serif][SIZE=3]Thanks & Regards,[/SIZE][/FONT][/COLOR]
[COLOR=#000000][FONT=Times New Roman, serif][SIZE=3]Hareesha.[/SIZE][/FONT][/COLOR]
0 项奖励
回复

1,669 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by klausc127 on Tue Oct 04 06:35:21 MST 2011
Hello jharwood
I would like to use your solution but for me it would be nicer to have it using tcp due to security reasons.
I also would like to read files from the host for other purposes and also write files back to the host with results. On the LPC I simply need and have the data for example as string.
Could you give me some hints please how to achieve this, may be there are examples somewhere I didn't find so far.
Tank you very much in advance.
Klaus
0 项奖励
回复

1,669 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by litris on Tue Mar 29 03:43:42 MST 2011
Hi jharwood,

I'm trying to compile the tftboot project, but I get the following error:

Building target: tftpboot.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"/home/clopez/workspace_3.8/CMSISv1p30_LPC17xx/Release" -Xlinker -Map=tftpboot.map -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "tftpboot_Release.ld" -o"tftpboot.axf"  ./uip/psock.o ./uip/timer.o ./uip/uip-fw.o ./uip/uip-neighbor.o ./uip/uip-split.o ./uip/uip.o ./uip/uip_arp.o ./uip/uiplib.o  ./src/cr_startup_lpc176x.o ./src/main.o  ./main/bootloaderapp.o ./main/clock-arch.o ./main/diagnostics.o ./main/flash.o ./main/tapdev.o ./main/tcpapp.o ./main/tftp.o  ./main/lpc1700/lpc17xx_emac.o ./main/lpc1700/lpc17xx_systick.o   -lCMSISv1p30_LPC17xx
/usr/local/LPCXpresso_3.8/tools/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: tftpboot.axf section `.text' will not fit in region `MFlash512'
/usr/local/LPCXpresso_3.8/tools/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: region `MFlash512' overflowed by 1000 bytes
collect2: ld returned 1 exit status
make: *** [tftpboot.axf] Error 1

It seems that flash is full, but I think it's imposible and there is some trouble with the linker.
I'm using the last Linux Version: LPCXpresso 3.8.2 [Build 129] [31/01/2011]
and the microcontroller is LPC1768,

Could you please help me?

Thanks in advance,

Best Regards,
0 项奖励
回复