avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Sharing code between a bootloader and an application.


From: Weddington, Eric
Subject: RE: [avr-gcc-list] Sharing code between a bootloader and an application.
Date: Mon, 29 Dec 2008 06:13:44 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of address@hidden
> Sent: Sunday, December 28, 2008 11:11 PM
> To: address@hidden
> Subject: [avr-gcc-list] Sharing code between a bootloader and 
> an application.
> 
> Since bootloaders need to establish communications in order 
> to function, it would seem useful to be able to use some of 
> this functionality by the bootloaded application code.  In 
> particular, this is in relation to CAN, where the boot-up 
> code will need to establish a node-id, and be able to 
> communicate serial number information to a central node.  
> 
>  
> 
> Obviously, access to the serial number, and links to the CAN 
> driver routines, would be useful in the applications code, 
> and would save duplication.   
> 
>  
> 
> How would one go about producing a header or library file 
> that would let you link references to the routines in the 
> bootloader for use in the application?   

One solution is to place the routines at fixed addresses. In your application, 
you would call these routines by an indirect call through a function pointer, 
pointing at the fixed known address of a subroutine.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]