Ive been looking around the internet at bootloading.
This may be a stupid question, but, why does everyone seem to use a hardware switch to enter bootloader mode?
Cant i just do the following?
Using the microchip generic framework as a starting point,
Write my own bootloader code,
assign a 'Command' to bootloader mode.
Send the command from the pc and just enter bootloader mode.
You can do that... You can use almost any trigger mechanism you like...
I prefer the hardware trigger and I often use an existing switch in the project and simply test to see if the switch is pressed during power up... This way I don't have to dedicate a pin for the bootloader trigger...
They don't, I've never used a bootloader that does - they simply check for a serial input for a fixed time, if they don't find one they boot the existing code. I've always thought a bootloader requiring a switch was a waste of time.
They don't, I've never used a bootloader that does - they simply check for a serial input for a fixed time, if they don't find one they boot the existing code.
I use an adaptation of the Microchip bootloader with the 18F1320. I have a couple of products where I'd like to be able to update the firmware from time to time and I just check the state of the RX serial port on startup. If it is high then there is a MAX232 serial interface connected to it and it goes into bootloader mode. If its low then it jumps to the main code.