public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-bugs@ecos.sourceware.org
Subject: [Bug 1001395] LPC1766/LPC17XX .ldi file forgets about IAP RAM usage and NXP flash checksum
Date: Sat, 03 Dec 2011 14:00:00 -0000	[thread overview]
Message-ID: <20111203140021.E172B2F78004@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001395-13@http.bugs.ecos.sourceware.org/>

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 on the CC list for the bug.


  reply	other threads:[~2011-12-03 14:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 11:44 [Bug 1001395] New: " bugzilla-daemon
2011-12-03 14:00 ` bugzilla-daemon [this message]
2011-12-03 14:35 ` [Bug 1001395] " bugzilla-daemon
2011-12-05  9:01 ` bugzilla-daemon
2011-12-05 21:21 ` bugzilla-daemon
2011-12-08  8:09 ` bugzilla-daemon
2011-12-22  9:31 ` bugzilla-daemon
2012-01-16  0:02 ` bugzilla-daemon
2012-01-16  0:10 ` bugzilla-daemon
2012-01-24 12:59 ` bugzilla-daemon
  -- strict thread matches above, loose matches on Subject: below --
2011-11-30 11:44 [Bug 1001395] New: " bugzilla-daemon
2011-12-03 14:00 ` [Bug 1001395] " bugzilla-daemon
2011-12-03 14:35 ` bugzilla-daemon
2011-12-05 21:21 ` bugzilla-daemon
2011-12-06 11:21 ` bugzilla-daemon
2011-12-22  9:32 ` bugzilla-daemon
2012-01-16  0:10 ` bugzilla-daemon
2012-01-24 12:59 ` bugzilla-daemon
2012-01-24 19:47 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111203140021.E172B2F78004@mail.ecoscentric.com \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-bugs@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).