This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001195] New: lpc2xxx_flash driver doesn't work with lpc1xxxand -mthumb
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Thu, 14 Apr 2011 03:42:05 +0100
- Subject: [Bug 1001195] New: lpc2xxx_flash driver doesn't work with lpc1xxxand -mthumb
- Auto-submitted: auto-generated
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001195
Summary: lpc2xxx_flash driver doesn't work with lpc1xxx and
-mthumb
Product: eCos
Version: 3.0
Platform: Other (please specify)
OS/Version: Cortex-M
Status: UNCONFIRMED
Severity: normal
Priority: low
Component: Flash
AssignedTo: unassigned@bugs.ecos.sourceware.org
ReportedBy: dhirving@gmail.com
CC: ecos-bugs@ecos.sourceware.org
Class: Advice Request
The problem occurs in eCosPro 3.0.28 with the mcb1700 HAL. Attempts to use the
flash driver on LPC1xxx when the thumb instruction set is in use fail, crashing
the processor.
In devs/flash/arm/lpc2xxx/v3_0_28/src/lpc2xxx_flash.c on line 95 there are two
#ifdef'd definitions for the iap_entry function. One uses the C function call
interface, the other one uses some inline assembly.
The inline assembly has the address for the IAP entry hard-coded to the value
for the LPC2xxx. The #ifdef only checks if the thumb instruction set is in
use, but doesn't check whether we are on an LPC1xxx. Attempting an IAP call on
LPC1xxx using the thumb instruction set fails because the address is incorrect.
The problem can be worked around by changing line 95 from:
#ifndef __thumb__
to
#if defined(CYGPKG_HAL_CORTEXM_LPC1XXX) || !defined(__thumb__)
I don't fully understand what problem the inline assembly solves, so I'm not
sure if it is relevant to the LPC1xxx series or not. With this change
everything seems to work fine with the LPC1768.
--
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.