Page 1 of 1

Creation of bootloader for remote firmware updates via UART

Posted: Fri Aug 08, 2025 12:56 pm
by george_b
Hello all!

I wish you have a great summer so far!


I would like to implement remote firmware update on a PIC (16F & 18F) target devices.

After a few minutes of reading, I learned that I will need a bootloader burned in to the flash of my device.
Then this bootloader will handle the image which will be send serially via UART hardware pins.


First i will try to achieve firmware upload to the desired target device with a UART to USB serial connector.

Then I will move on a wireless serial communication device like HC-12 module and try to achieve the same firmware upload wirelessly.

The devices i am interested to use are 18F4680,18F46k80,18F4523.

Is there any instruction or application manual for creating the bootloader?

What else am I missing to achieve my goal?


Thank you in advance

Best Regards
George

Re: Creation of bootloader for remote firmware updates via UART

Posted: Fri Aug 08, 2025 1:09 pm
by mnfisher
Take a look at https://ww1.microchip.com/downloads/en/ ... 00851b.pdf

A Microchip bootloader for MCUs that allow self-programming....

Martin

Re: Creation of bootloader for remote firmware updates via UART

Posted: Mon Sep 01, 2025 5:53 pm
by george_b
Thanks for the details.

I am wondering if i could use flowcode to write a bootloader for pic 18F devices?

Re: Creation of bootloader for remote firmware updates via UART

Posted: Tue Sep 02, 2025 3:09 pm
by mnfisher
It wouldn't be easy. In theory, Flowcode is C, could be used - some chips have only 512bytes available for the bootloader which might be tight?
If you have a chip that allows more space to be allocated to the bootloader then chances improve.
You will need to do lots of low level register handling and this will be C (or asm) - a Google showed up some possibly helpful code...

Martin