Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

own bootloader and IAP problem

own bootloader and IAP problem

2004-10-27 by burner_itfi

hello friends

i hope you can help me. 

I programmed a bootloader (sector 0) who can check the flashed
application (sectors 1-13) if the application is correct and can flash
a new application or configuration over can0, can1 or serial. After
the start, the bootlaoder starts with a function pointer (when the
check sum calculation is correct) to the startup code of the
application the application. (the bootloader and the application are
two projects, not one hex file). When the application get the message
that it whould be flashed, it must call the programming function in
the bootloader.

I tried to jump from the application directly to the program function
of the bootloader but the startup code of the application overwrite
all variable of the bootloader so that the program function not
correctly work.

My Problem is, how i can tell the bootloader that it is not a normal
start when the application jump with a function pointer back to the
startup code from the bootloader, but it is call from the application
and it go into program mode.

best regards
Tobi

ps.: Sorry my english is not the best. ;-)

RE: [lpc2000] own bootloader and IAP problem

2004-10-28 by Joe Hlebasko

I am not sure of the rest of your design, but here is how we typically
handle the reprograming of an application.  

Bootload sequence:
 read in application CRC value from an external EEPROM (SPI based)
 caclulate the CRC value of the application in flash
 if The CRCs match then jump to the application entry point
 else go into firmware download mode (either CAN or serial depending on your
app)

When the application receives the flash command (either serial or CAN):
 app code reads in the current CRC value from external EEPROM 
 increments the CRC value
 write the modified CRC value to EEPROM
 reset the micro (see above)


Joe
Show quoted textHide quoted text
> -----Original Message-----
> From: burner_itfi [mailto:burner_itfi@...] 
> Sent: Wednesday, October 27, 2004 5:03 AM
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] own bootloader and IAP problem
> 
> 
> 
> hello friends
> 
> i hope you can help me. 
> 
> I programmed a bootloader (sector 0) who can check the 
> flashed application (sectors 1-13) if the application is 
> correct and can flash a new application or configuration over 
> can0, can1 or serial. After the start, the bootlaoder starts 
> with a function pointer (when the check sum calculation is 
> correct) to the startup code of the application the 
> application. (the bootloader and the application are two 
> projects, not one hex file). When the application get the 
> message that it whould be flashed, it must call the 
> programming function in the bootloader.
> 
> I tried to jump from the application directly to the program 
> function of the bootloader but the startup code of the 
> application overwrite all variable of the bootloader so that 
> the program function not correctly work.
> 
> My Problem is, how i can tell the bootloader that it is not a 
> normal start when the application jump with a function 
> pointer back to the startup code from the bootloader, but it 
> is call from the application and it go into program mode.
> 
> best regards
> Tobi
> 
> ps.: Sorry my english is not the best. ;-)
> 
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> --------------------~-->
> $9.95 domain names from Yahoo!. Register anything.
> http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/dN_tlB/TM
> --------------------------------------------------------------
> ------~-> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.