View previous topic :: View next topic |
Author |
Message |
meereck
Joined: 09 Nov 2006 Posts: 173
|
tiny bootloader |
Posted: Sun Oct 14, 2007 6:16 am |
|
|
hello,
does anyone know how to achieve this with tiny bootloader?
Quote: | Requirements for your program:
The program must meet this requirement: it must have in the first 4 words of memory a GOTO to the start of the main program. (this is what the majority of the bootloaders require). |
I know how to move interrupt vectors and main program:
#define LOADER_END 0x7FF
#define LOADER_SIZE 0x6FF
#build(reset=LOADER_END+1, interrupt=LOADER_END+9)
#org 0, LOADER_END {}
but I don't know how to place GOTO within the first 4 WORDs.
Has anyone tried this before me?
Thank you folks,
Meereck |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Sun Oct 14, 2007 7:30 am |
|
|
#build(reset=0x000:0x0007)
This will prevent the compiler from putting anything other than the jump vector below the reset vectors. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Sun Oct 14, 2007 9:56 am |
|
|
thnx, works like a charm |
|
|
|