|
|
View previous topic :: View next topic |
Author |
Message |
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
How can I use the bootloader in PCM example folder ?? |
Posted: Mon Jan 22, 2007 10:15 am |
|
|
Hi,
Compiler : PCM 3.228
Target: 16F648A, 16F877A
I would like to use the bootloader given in the PICC folder, I have also managed to modify it for a 16F877A mcu, but I find that when I load a program into the mcu, the bootloader gets erased, as a result I have to burn the bootloader using a programmer..
Is this how a bootloader works ?? kindly explain how I can prevent the bootloader from getting erased ...
Unfortuantely I have lost the source code for the above problem, so I may have to work out the program again ....
thanks
arunb |
|
|
Ttelmah Guest
|
|
Posted: Mon Jan 22, 2007 10:33 am |
|
|
The 'keys', are the definitions in bootloader.h. You include this file, with the running program, as well as with the bootloader itself, but in the bootloader program, define the keyword _bootloader, before loading it. In the main program, you load it without this definiton. It then adds these definitions to your 'bootloaded' program:
#define LOADER_END 0x1FF
#define LOADER_SIZE 0x1BF
#build(reset=LOADER_END+1, interrupt=LOADER_END+5)
#org 0, LOADER_END {}
Now, the last two lines of this, move the bootloaded program up, to avoid the bootloader.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|