|
From: | Bob Paddock |
Subject: | Re: [avr-chat] Mega88 bootloader? |
Date: | Thu, 21 Jul 2005 12:13:49 -0400 |
User-agent: | Opera M2/7.54u1 (Win32, build 3918) |
I understand why it does not work now, one of those "Duh" moments, when someone looks over your shoulder. Of course a Relative Jump (RJMP) is not going to jump to absolute zero. Still don't understand why it came out at what seems to be an arbitrary address.Curious: what address does the reset vector jump to?
Not sure I know what you are asking there. The Mega88 fuses are set to jump to word address $0E00 / byte address $1C00. At the end of the bootloader I clear IVESEL and jump to absolute zero, now using clr r30/clr r31/ijmp , which works. If you are asking what is at address zero it is: 00000000 <__vectors>: 0: 40 c0 rjmp .+128 ; 0x82 2: 59 c0 rjmp .+178 ; 0xb6 4: 58 c0 rjmp .+176 ; 0xb6 the bootloader has this at byte address 1C00: 00001c00 <__vectors>: 1c00: 19 c0 rjmp .+50 ; 0x1c34 1c02: 32 c0 rjmp .+100 ; 0x1c68 1c04: 31 c0 rjmp .+98 ; 0x1c68If you go by PC = PC + k + 1 where k = 0 seems like it should effectively be a NOP, jumping to the next instruction? Not jump to some arbitrary address like -434??
[Prev in Thread] | Current Thread | [Next in Thread] |