> Is it true that Phillips ISP does the checksum calculation before
> programming the vector code into flash?
> I notice the .hex files that I'm making (using IAR's software)
> doesn't contain the calculated checksum (0x14)for the vector code.
> It's usually filled with 0's (without the fill option).
> Is there's a way for me to generate the vector checksum in the 0x14
> space of the hex file?
Leighton,
This is what I do.
The vector table for the processor (The first 32 bytes of memory)
normally has branches to the routines. Since routine addresses change
as code is changed, the checksum changes.
I created a table of seven addresses located immediately after the
vector table. These seven addresses are the start addresses for reset
and the interrupts. The branch instructions of the interrupt vector
table were replaced with a load PC instruction pointing to the
appropriate address.
The hex file will then have the checksum. My startup code below:
@---------------------------------------------------------------------------
@ Interrupt vectors
@---------------------------------------------------------------------------
intvect:
LDR pc, startaddr
LDR pc, undefinstaddr
LDR pc, softintaddr
LDR pc, preabortaddr
LDR pc, dataabortaddr
.word 0xb8a06f60
LDR pc, interruptaddr
LDR pc, fastintaddr
startaddr:
.word start
undefinstaddr:
.word undefined_instruction_routine
softintaddr:
.word software_interrupt_routine
preabortaddr:
.word prefetch_abort_routine
dataabortaddr:
.word data_abort_routine
interruptaddr:
.word interrupt_routine
fastintaddr:
.word fast_interrupt_routine
@---------------------------------------------------------------------------
@ Start up code
@---------------------------------------------------------------------------
start:
<code...>Message
Re: [lpc2000] Vector Checksum not generated in .hex file
2005-01-13 by rob@usbmicro.com
Attachments
- No local attachments were found for this message.