a couple guys asked how I am jumping to the bootloader from my application.
I modified the an2295 program to performa checksum of the application space and only jump to is if
the checksum was valid
I modifed the master program to calculate and insert the checksum, as well as skip the baud rate check.
(I will post that when I get to my other computer.)
My host program sends this sequence before executing the "dos" program
I have a spot in the application that jumps to "jumphook" in the boot if a specific sequence of characters
is received from the PC. The jump address is sent with the reboot command.
else if(SerialCommand == 0x42) // Reboot!
{
Serial_RecvChar(&RxByte1);
Serial_RecvChar(&RxByte2);
if(RxByte1 == 0x42 && RxByte2 == 0x42 ) // BBB
{
Serial_RecvChar(&RxByte1);
Serial_RecvChar(&RxByte2);
pointer = ((unsigned int)RxByte1)<<8;
pointer += RxByte2;
// LED1_SetVal();
Cpu_DisableInt();
asm
{
ldhx pointer ; jump vector
jmp ,x
}
Bob