This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001395] LPC1766/LPC17XX .ldi file forgets about IAP RAM usageand NXP flash checksum


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001395

--- Comment #1 from Ilija Kocho <ilijak@siva.com.mk> 2011-12-03 14:00:16 GMT ---
Created an attachment (id=1444)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1444)
Avoid placing code at Vector 7 location on LPC17xx.

(In reply to comment #0)

Thank you for reporting this bug Bernard.

> This problem impacts all LPC17XX target since newer ports to LPC17XX MCU will
> probably be based on this file:
> 
> - if In Application Programming (IAP) is used, then the upper 32 bytes of
> internal RAM are used by the IAP built-in ROM. (section 32.3.2.8 of NXP
> document UM10360). This area is ignored in .ram definition.

This could be fixed with appropriate patch to .ldi file. I think this should be
optional/configurable by a CDL option. But is it likely that IAP will be used
from eCos?

> 
> - There is no consideration about NXP 'Valid User Code' (section 32.3.1.1 of
> NXP document UM10360). This is a checksum used by the built-in ROM to validate
> the flash content when the MCU boots and is stored at vector location 7 (offset
> 0x1C). A program like OpenOCD will write this code after flashing the target.
> The checksum overwrites the instruction 'b hal_reset_vsr' (the second
> instruction of reset_vector).

This is a serious flaw, so I am proposing a patch. It doesn't calculate
checksum (leaves it to flash loader) but brings code out of vector 07 location.
I have set up OpenOcd and did some tests. I would appreciate if someone
re-confirms (both + and - )

Ilija

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]