PIC18 Bootloader

This bootloader is an modified version of Diolan’s bootloader.
Is a nice piece of software, very easy to use, fast, driverless (HID device).
With all options active, complied code is under 2048 bytes.


– all extended instructions was replaced with standard instructions
– code re-arranged, all configurations moved into .cfg files
– protocol commands changed (no more compatible with Diolan “fw_update” application)
– cmds read_id & write_id removed for security reasons
– ported to PIC18F 25K50,45K50

How to compile

  1. Install Microchip’s MPLAB
  2. Edit Buid.cmd and change paths to mpasmx.exe, mplink.exe and processor type
  3. Optional: Change VID/PID and encryption key
  4. Edit bootloader.cfg according to your hardware
  5. Run Build.cmd !

How to use

  • Write bootloader to PIC using a programmer (ex. ICD2 or PicKit2.. etc)
  • Start your device into bootloader-mode (eg. keeping BL button pressed while reset/power on)
  • Run PicBLFlash.exe, select .hex file then write


Command line parameters

-F   FileName (*.HEX)
-W   Write to PIC
-X   Reset PIC after write
-Q   Close immediately after programming
-Q5  Close with 5 seconds delay


  • If you change bootloader VID/PID update PicBLFlash.cfg with proper values
  • A small test firmware is included: I/O pins was configured for Pololu P-Star 25K50 and you need MikroPascal to compile


PIC18_Bootloader_v1.7.zip (43.5 KiB)
MD5: 9ad7de0aeaa7cd20ea3fd6e73f2eae3f
PIC18_Bootloader_v1.8.zip (43.6 KiB)
MD5: 5cf8303ab2044b3273187b9387e8ca89

PicBLFlash_v1.0_B205.zip (279.2 KiB)
MD5: 60059dc19869d0cfd5538e6b5cb50979
PicBLFlash_v1.1_B208.zip (347.1 KiB)
MD5: 2f012d953415c448d057521344542877

Comments are closed.