Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Executing code in boot page from application page

2008-04-08 by ldevriesau

Hi All,
I like to use bootloaders and have that working quite succesfully.

I like the idea of using certain routines in the boot code from my 
application code to conserve space in the application program , by 
utilizing potentially unused code in the boot page.  Ie. async I/O, 
string routines, and other routines used int the bootloading are 
usefull in other code.  In addition other utilities could be tucked 
away in there, which have nothing to do with bootloading but fill up 
unused space in the bootblock.  Ie LCD drivers could reside there, 
OUTHEX, INHEX, OUTBYTE,INBYTE etc. etc.

I placed a jump table at the start of the bootloader (with the first 
jump to the bootloader of course) followed by jumps to my utilities 
that I wish to call).
Result, whenever I attempt to call any routine from the application 
by using CALL or ICALL, it goes into the bootloading routine Ie. 
effectivily RESETS.  IE. CALL 0xf801 ; getchar 

Perusing the data sheets for the ATMEga128, I can't see why this 
should not work, can any guru shed light on where I am going wrong.
 

Regards,
Lee

Guru 
a. A teacher and guide in spiritual and philosophical matters.
b. A trusted counselor and adviser; a mentor.
c. A recognized leader in a field.
d. An acknowledged and influential advocate.

Attachments

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.