Bootloaders.

Introduction.
This page is a bit unusual, because as far as I can remember I have NEVER known much about Bootloaders Hi!. I know what they do but not how they work. Recently a very kind person offered to write a bootloader program for the children's project, but since then I have had a memory wipe, so this is an attempt to recover information and get it written down, ready for my next blank period !.
What is a bootloader ?.
Normally, we write microprocessor programs on a PC using a compiler. We need the Compiler to translate out program in English into assembler code that the microprocessor can 'understand' and work with. Once the program is compiled we then transfer it from the PC to the microprocessor where it will run. In the past that meant using an eprom programmer to copy the assembler program from the PC into the microprocessor chip. In practice this meant physically moving the chip between the programmer and the target board, until we had perfected our program. This was a laborious process !.
The next stage of development was the introduction of "In Circuit Serial Programming" (ICSP) which still used the programmer, but connected it to the microprocessor programming pins on the target board, which saved having to physically move the microprocessor chip all the time.
In the early 2000's PIC microprocessors were introduced that were capable of modifying their own memory and this led to another way of transferring the assembler program from the PC to the microprocessor using a 'BootLoader' system. A bootloader is really two small programs, one of which resides in the PC and a smaller one that resides in the microprocessor chip. We still need the programmer to program the bootloader program into the microprocessor chip, but once that is done, modifying programs becomes so much easier and for that reason I decided that the children's project had to work with a bootloader.
In the past the two PC serial ports COM1 and COM2 were commonly used to download the program in assembler from the PC, to the microprocessor target board. It was found that most schools now use lap top computers, most of which do not have the COM1 and COM2 ports, so instead we have to use a USB to TTL cable to download the program into the microprocessor.
A self inflicted injury !
A typical USB to TTL download cable (AXE027) costs about £10 or £14 with tax, postage and packing and unfortunately the whole project was aimed to be affordable out of children's pocket money and fixed at £10. So a solution had to be found for this problem and a total sum of £1.50 allotted for the cable and this was eventually solved, after several false starts.
The next problem was that the PIC microprocessor chosen for the new training board was the 18F25K22 and that did not go into quantity production until just before last Christmas, which meant that no bootloader existed for this chip at that time !. Around January time, the free DS30 bootloader became available but although it worked with the 3.3 volt 18F25K20 PIC, it did not work with the target 18F25K22 PIC. I had already come to the conclusion that a five volt microprocessor had to be the basis of the training board, as there was too much resistance from schools against a 3.3 volt device
A further problem was that the free Amicus compiler chosen for the latest version of the project only worked with the 18F25K20 PIC but not the latest 5 volt 18F25K22 PIC. Popular demand finally caused the Amicus compiler creators to also include the 18F25K22 chip.
Finding a free 18F25K22 bootloader !
Modern compilers often provide bootloaders for a range of PIC's but invariably, it takes time for them to appear. For example there is no bootloader for the 18F25K22 chip in either Amicus or Swordfish at this time. While investigating this problem, a very kind gentleman offered to write bootloader for the 18F25K22 !. About the same time enthusiasts were also trying to get the DS30 bootloader to work with the 18F25K22 chip, but had failed because of a range of reasons such as errors on the interim data sheets etc..
The gentleman who offered to write a bootloader also mentioned the DS30, so I thought I would have a look at both ideas. To that end I will create a page for each and my amateur experience with them. Please bear in mind that I have brain damage and am going through a 'blank' period at the moment so I will not always see, what may be obvious to others. My object is to learn and get something down on paper while I can.