Marcelo,

The current lpc2000.c mentions this:

/*
* flash bank lpc2000 <base> <size> 0 0 <target#> <lpc_variant> <cclk>
[calc_checksum]
*/

Have you tried adding "calc_checksum"?

On Wed, Dec 16, 2009 at 16:13, Nico Coesel <[email protected]> wrote:
>> -----Original Message-----
>> From: [email protected] [mailto:openocd-
>> [email protected]] On Behalf Of Igor Skochinsky
>> Sent: woensdag 16 december 2009 16:01
>> To: Marcelo Utikawa da Fonseca
>> Cc: [email protected]
>> Subject: Re: [Openocd-development] Problem when tryng to flash LPC2368
>>
>> Hello Marcelo,
>>
>> What you see is bootrom code that gets automatically mapped to 0 if
>> there is no user code or it's invalid.
>>
>> "The interrupt vectors residing in the boot block of the on-chip flash
>> memory also become active after reset, i.e., the bottom 64 bytes of
>> the boot block are also visible in the memory region starting from the
>> address 0x0000 0000. The reset vector contains a jump instruction to
>> the entry point of the flash boot loader software."
>>
>> 00000000                 LDR     R4, =0x3FFF8000
>> 00000004                 LDR     R5, =0xFFFFBFFF
>> 00000008                 LDR     R6, [R4]
>> 0000000C                 AND     R6, R5, R6
>> 00000010                 STR     R6, [R4]
>> 00000014                 LDR     PC, =0x7FFFE040
>>
>> 0x7FFFE040 is the bootrom entrypoint.
>>
>> "3.1.1 Criterion for Valid User Code
>> Criterion for valid user code: The reserved ARM interrupt vector
>> location (0x0000 0014) should contain the 2's complement of the
>> check-sum of the remaining interrupt vectors. This causes the checksum
>> of all of the vectors together to be 0. The boot loader code disables
>> the overlaying of the interrupt vectors from the boot block, then
>> checksums the interrupt vectors in sector 0 of the flash. If the
>> signatures match then the execution control is transferred to the user
>> code by loading the program counter with 0x0000 0000. Hence the user
>> flash reset vector should contain a jump instruction to the entry
>> point of the user application code."
>>
>> My guess is that FlashMagic automatically patches the checksum to be
>> correct.
>
> IIRC OpenOCD should do this or has this function been deleted? I recall
> some discussion about that but I don't remember the outcome. I can't
> imagine OpenOCD doesn't calculate the checksum. All compiler / linker
> tools more or less assume the programming software takes care of
> creating the checksum.
>
> Nico Coesel
>
> _______________________________________________
> Openocd-development mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/openocd-development
>



-- 
WBR, Igor
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to