Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need C code of a PIC18X bootloader

Not open for further replies.


Junior Member level 2
Dec 2, 2005
Reaction score
Trophy points
Activity points
Hi all,

Im trying to implement a bootloader for my PIC18 micro.

Can someone direct me, where can find information regarding the linker commands. i want to set the address of the main application right after the boot firmware.

Thanks, Ben.

pic 18x

Hi Rafael,

Thanks, im familiar with the Tiny Bootloader, i guess i didnt mention it earlier, im interested in a C code for the bootloader. (im not so familiar with the Pic asm commands).

Im likely to change the code of the bootloader in order to integrate it into my design. therefor im looking for the source code in C for that.

Im using the PIC18F452.

Thanks, Ben.


Well, you can use the asm into your C code....

if you´re using mcc18 you´ll have to learn how to use some pragmas to mix the code...

what´s your compiler ?

Re: PIC18X bootloader

Take a look at the MPLAB MPASM/MPLINK User's Guide -
Lots of details on linking.

You might look at the microchip appnote - it includes a bootloader specifically for the 452. It has a linker script that might be of use. The full source code including the PC side program is available. Worth looking at for ideas or more.

I would not recommend the approach you are taking. Keeping the bootloader seperate and loading it high gives a lot more flexibility and protection but, of course, I don't know all your reasoning...

Re: PIC18X bootloader


Im using the Hi-tech compiler for my programs.

usually, the code at these bootloaders files dont use the interupts for the uart nor for the timers. i would like to use the interupts (i think that this way the code is much more stable).

Any way, i have found the C code i was looking for, thank you all for helping.
(Its in C format though it does the same as the ASM ones).

If you are interested, you can download the files here.

Thanks, Ben.

Not open for further replies.

Part and Inventory Search

Welcome to