![]() | ![]() ![]() |
| ![]() |
|
The fail-safe bootloader is run if PortC.4 is held LOW at reset, or if the command 'SYS $110' is executed. A status character is return for each Intel Hex Record that the bootloader interprets. * - The Record was written O - The Record is verified and does not need to be written. C - Checksum Error, the checksum did not match. A - Address error, either trying to overwrite the bootloader or odd address. S - Size Error, odd sized or zero sized. R - Range Error, the address beyond the end of flash ram $1FFF. I - Info Error, an extended address record ignored by PicPuter. ? - Not an intel hex record. When you upload a __HEXREC__ file to PicPuter's bootloader, a series of characters will appear and look something like this... ?I**************AAAAAAAAAAAAAAAA****************S PicPuter only writes to flash if it has to, before a write occurs the contents are read back to make sure the write is necessary. This makes verify a snap. If you want to verify that the program was written correctly, resend the file and the output should now look like... ?IOOOOOOOOOOOOOOAAAAAAAAAAAAAAAAOOOOOOOOOOOOOOOOOS PicPuter will not allow the fail-safe bootloader program to be modified, otherwise it would not be fail-safe. This includes the flash locations $100-$1FF and $0. Location $0 contains the assembler statement 'Goto $100', which jumps into the bootloader program. If PortC.4 is held HIGH, the bootloader returns execution by executing 'Goto $1', otherwise the bootloader is executed. While in the bootloader all of flash (excluding $0,$100-$1ff) can be written. This allows users that insist on modifying the PicPuter kernel a way to reflash PicPuter to the factory program. It is also a convenient mechanism to update picputer in the future. You can even use the bootloader with the output of MPLab, the MicroChip assembler. |