Hi Guys
Could someone clear the air on what i have to add to my c program to use a bootloader.
with picbasic i just add DEFINE LOADER_USED 1 to the begining of the program and the bootloader software knows that command.
Is the command below correct for 16f877?
#org 0x1F00, 0x1FFF void loader16F877(void) {}
What is used for 18f452 ?
iyobor
K i W i Guest
Posted: Sat Apr 10, 2004 10:19 pm
i always wanted to know that as well .. any help would be greatly appretiated
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sun Apr 11, 2004 12:00 am
I'm not quite sure what you're asking.
Are you asking where to find a bootloader ?
----------------------------
Or, are you asking how to tell the CCS compiler to reserve ROM
space for the bootloader ?
If the bootloader is a small one, that takes up the first 512 bytes
of ROM in an 18F series PIC, then this link has the CCS code which
will reserve that ROM space:
http://mdubuc.freeshell.org/Jolt/#relocate
iyobor
Joined: 30 Mar 2004 Posts: 7
Posted: Sun Apr 11, 2004 6:44 am
How to Relocate User Code
CCS
Add the following directives in you .c file:
#build(reset=0x200)
#build(interrupt=0x208)
#org 0x0000,0x01ff
void bootloader() {
#asm
nop
#endasm
} // Reserve space for the bootloader
Thanks PCM
This is what i was looking for
Very much appreciated
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