by i-Bot » Sun Sep 03, 2006 6:43 pm
by i-Bot
Sun Sep 03, 2006 6:43 pm
Sorry to have been silent on this topic, very busy !
The following is my understanding of how the boot loader works, based on a number of factors.
The bootloader resides at location 0xf000 in AtMega128 Flash. (when the command 0xAF boot is sent from the PC, the C3024 code jumps to 0xf000)
The fuses are set to jump to 0xf000 on reset to enter the bootloader. The bootloader sends the ">" char, waits for a response for a given period, then jumps to start the main code at location 0x0000. ( the main code does not send the ">" char.
The fuses have the LPM instruction set disabled on the boot area. (programming a blank Atmega128 with the main code, gives the same checksum as the C3024, though the checksum is done over the entire 64K words. Not sure about SPM, but this does not help us yet.
The Robobasic executable v2.5e, does contain the C3024 main code in un encryted form, so it is intended to download this to the C3204 (I have extracted the code and run in a virgin AtMeag128.)
I have tried in vain to get robobasic to invoke the loader. I have emulated the C3204, told it the wrong version, checksum, etc. No sign of access to the loader.
As soon as Robobasic invokes the loader it is cracked, since we know what code will be downloaded. However Hitec and Minirobots never update the code !
If anyone get an idea of when the loader is invoked, many points, since the fuses are set to disable the SPI and JTAG. I had to change the chip. I use a Jtag, but any freeware serial bootloader can be then used.
For a replacement board a direct copy of the C3024 would be fine, then it could run either Robobasic, or anything else. I can offer a code version which works at constant 115K which I use with bluetooth, but it is rather slow due to the bluetooth delays. The only real requirement is for the repalcement borad is for the servo pins to be in about the same place, and to have the EEPROM on the SPI. I have an Olimex in this configuration, with a bluetooth instead of the RS232 interface and this works fine.
Sorry to have been silent on this topic, very busy !
The following is my understanding of how the boot loader works, based on a number of factors.
The bootloader resides at location 0xf000 in AtMega128 Flash. (when the command 0xAF boot is sent from the PC, the C3024 code jumps to 0xf000)
The fuses are set to jump to 0xf000 on reset to enter the bootloader. The bootloader sends the ">" char, waits for a response for a given period, then jumps to start the main code at location 0x0000. ( the main code does not send the ">" char.
The fuses have the LPM instruction set disabled on the boot area. (programming a blank Atmega128 with the main code, gives the same checksum as the C3024, though the checksum is done over the entire 64K words. Not sure about SPM, but this does not help us yet.
The Robobasic executable v2.5e, does contain the C3024 main code in un encryted form, so it is intended to download this to the C3204 (I have extracted the code and run in a virgin AtMeag128.)
I have tried in vain to get robobasic to invoke the loader. I have emulated the C3204, told it the wrong version, checksum, etc. No sign of access to the loader.
As soon as Robobasic invokes the loader it is cracked, since we know what code will be downloaded. However Hitec and Minirobots never update the code !
If anyone get an idea of when the loader is invoked, many points, since the fuses are set to disable the SPI and JTAG. I had to change the chip. I use a Jtag, but any freeware serial bootloader can be then used.
For a replacement board a direct copy of the C3024 would be fine, then it could run either Robobasic, or anything else. I can offer a code version which works at constant 115K which I use with bluetooth, but it is rather slow due to the bluetooth delays. The only real requirement is for the repalcement borad is for the servo pins to be in about the same place, and to have the EEPROM on the SPI. I have an Olimex in this configuration, with a bluetooth instead of the RS232 interface and this works fine.