Harold Hallikainen wrote: >> A few weeks ago there was considerable activity on Boot Loaders, just a >> quick question without a lot of detail, just wanted to make sure there >> wasn't some obvious roadblock. >> >> I have a 18F1320 (slave) that has USART going to onboard fiber optic >> transmitter/receiver (62.5/125um) that is then converted to 2 wire >> RS-485 with a B&B FOSTC converter and then to a PLC (TRI-PLC >> T100MD888)(master). The PLC is programmable and online >> monitoring/control via RS-232 to a PC. I also have a RS-232/RS-485 >> converter and have talked to the PIC over the Fiber optic/Rs-485 network >> with a terminal program. I am thinking that either I can use the >> RS-232/RS-485 converter to use the boot loader (after having programed >> the 1320 with the boot loader) from a PC, or via the PLC which has been >> programmed to pass through the 1320 program. >> >> Comments? >> >> > > Sounds like it should work. How are you going to start bootloader > execution? I typically check for a button press during power up. If the > button is down, I go in to the bootloader. If not, I go to the > application. It's possible to have the application also call the > bootloader, but should the application get corrupted, you need another way > to get to the bootloader. > > Also, on bootloaders, I've started writing them to accept the Intel hex > ascii records directly with either DC1/DC3 or RTS/CTS handshaking. Nothing > special is then required on the host end, just send the ascii file. > > > I write bootloaders, too. So far, they all are embedded (part of the operation of the product itself, i.e. it uses the UART and certain commands activate the bootloader). The objection I have to doing the Intel Hex bit is that it is easy for the data to be trapped and the firmware stolen by a competitor. To reduce corruption, I install a bridge in the first 16 words that is "permanent" until the new data is installed correctly, then the bridge is replaced with the correct bit. During the update, normal operation of the product is suspended, and only the firmware installer runs. My new firmware is installed into a serial EEPROM temporarily, and the transferred data is encrypted for the transfer step, and decrypted while being installed. Once CRC checks are done on the serial EEPROM, then the update process begins. --Bob A -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist