|
Thank you! I will try FlashMagic later because I do not have Windows on my PC. About the data in first 64 bytes I do not understand about them but they are in the flash! Please see the below logs showing this strange behaviour. I am using the telnet to send commands: 1) Memory containing correct data: > mdw 0 0x20 0x00000000: e59ff018 e59ff018 e59ff018 e59ff018 e59ff018 b9206e58 e51ff120 e59ff010 0x00000020: 00000038 00001244 00001258 0000121c 00001230 0000126c e59f0198 e321f0db 0x00000040: e1a0d000 e2400004 e321f0d7 e1a0d000 e2400004 e321f0d1 e1a0d000 e2400004 0x00000060: e321f0d2 e1a0d000 e2400040 e321f0d3 e1a0d000 e2400040 e321f0df e1a0d000 2) Now I do a erase and show the data again: > flash erase_sector 0 0 0 erased sectors 0 through 0 on flash bank 0 in 0.171872s > mdw 0 0x20 0x00000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0x00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0x00000040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0x00000060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 3) The flash seems to be erased. Now I turn off the board, turn on again and reconnect the OpenOCD. Here is the result: > halt target state: halted target halted in Thumb state due to debug-request, current mode: Supervisor cpsr: 0xa00000f3 pc: 0x7fffe154 > mdw 0 0x20 0x00000000: e59f4018 e59f5010 e5946000 e0056006 e5846000 e51ff004 7fffe040 ffffbfff 0x00000020: 3fff8000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x00000040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0x00000060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff In the J-Flash software, the command to read back the entire chip shows only 0xff but the J-Link Commander can read exactly the same data: SEGGER J-Link Commander V3.96d ('?' for help) Compiled Nov 21 2008 19:00:17 DLL version V3.96d, compiled Nov 21 2008 18:59:52 Firmware: J-Link ARM V6 compiled Jun 30 2009 11:06:04 Hardware: V6.00 S/N : 156002960 OEM : IAR VTarget = 3.319V Info: TotalIRLen = 4, IRPrint = 0x01 Found 1 JTAG device, Total IRLen = 4: Id of device #0: 0x4F1F0F0F Found ARM with core Id 0x4F1F0F0F (ARM7) ETM V1.2: 1 pairs addr.comp, 0 data comp, 4 MM decs, 1 counters RTCK reaction time is approx. 189ns Using adaptive clocking instead of fixed JTAG speed. J-Link>mem 0 0x80 00000000 = 18 40 9F E5 10 50 9F E5 00 60 94 E5 06 60 05 E0 00000010 = 00 60 84 E5 04 F0 1F E5 40 E0 FF 7F FF BF FF FF 00000020 = 00 80 FF 3F 00 00 00 00 00 00 00 00 00 00 00 00 00000030 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000040 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00000050 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00000060 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00000070 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF J-Link> What can be wrong? Best regards, Marcelo Utikawa da Fonseca Nico Coesel escreveu: ---------------------------------------------The first 64 bytes must always be erased. Try to use flashmagic instead of OpenOCD.These controllers use flash with ECC therefore you cannot program the flash partially / patch single bytes. Nico Coesel-----Original Message----- From: [email protected] [mailto:openocd- [email protected]] On Behalf Of Marcelo Utikawa da Fonseca Sent: woensdag 16 december 2009 13:54 To: [email protected] Subject: Re: [Openocd-development] Problem when tryng to flash LPC2368 Hi again! I am still having problems to write the flahs in an LPC2368. Now I know that the first 64 bytes is never erased. There is always data in this area. 95% of the write errors are caused because the data is not correctly programmed in this area. In the J-Flash software, this area have data after a erase so I think that the data in this area is correct. I am using J-Link in both OpenOCD and J-Flash. I have tried a programmer derivated from axm0432 and I receive the same results... Could this be a bug in OpenOCD? It cannot write in this situation but J-Flash can so the problem is not in the hardware or the programmer because they are the same. Best regards, Marcelo Utikawa da Fonseca Marcelo Utikawa da Fonseca escreveu: Tecnequip Tecnologia em Equipamentos Endereço/Address: R. Ganges, 557 Cidade/City: São Paulo Estado/State: SP País/Country: Brasil CEP/Postal Code: 03445-030 Fone/Phone: 55-11-20937199 FAX: 55-11-29412289 |
_______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
