#3747 assigned defect

Address Cortex-M3 Errata 602117

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: arch/arm Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

While testing on a NXP LPC1788 it found that this chip is affected by the Cortex-M3 Errata 602117. NXP didn't bother to document this in their errata sheet for the chip:

https://www.nxp.com/docs/en/errata/ES_LPC177X_8X.pdf

To avoid the issues, you have to compile everything with -mfix-cortex-m3-ldrd. This option is enabled by default, if you use -mcpu=cortex-m3.

I think we have to change our GCC multilibs to account for this errata. For example:

diff --git a/gcc/config/arm/t-rtems b/gcc/config/arm/t-rtems
index 026a5895662..e276b4f3e57 100644
--- a/gcc/config/arm/t-rtems
+++ b/gcc/config/arm/t-rtems
@@ -1,7 +1,7 @@
 # Custom RTEMS multilibs for ARM

-MULTILIB_OPTIONS  = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m/mcpu=cortex-m7 mfpu=neon/mfpu=vfp/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16/mfpu=fpv5-d16 mfloat-abi=hard
-MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m cortex-m7 neon vfp vfpv3-d16 fpv4-sp-d16 fpv5-d16 hard
+MULTILIB_OPTIONS  = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/mcpu=cortex-m3/mcpu=cortex-m4/mcpu=cortex-m7 mfpu=neon/mfpu=vfp/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16/mfpu=fpv5-d16 mfloat-abi=hard
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r cortex-m3 cortex-m4 cortex-m7 neon vfp vfpv3-d16 fpv4-sp-d16 fpv5-d16 hard

 # Enumeration of multilibs

@@ -16,7 +16,8 @@ MULTILIB_REQUIRED += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 MULTILIB_REQUIRED += mthumb/march=armv7-a
 MULTILIB_REQUIRED += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
 MULTILIB_REQUIRED += mthumb/march=armv7-r
-MULTILIB_REQUIRED += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_REQUIRED += mthumb/mcpu=cortex-m3
+MULTILIB_REQUIRED += mthumb/mcpu=cortex-m4
+MULTILIB_REQUIRED += mthumb/mcpu=cortex-m4/mfpu=fpv4-sp-d16/mfloat-abi=hard
 MULTILIB_REQUIRED += mthumb/mcpu=cortex-m7/mfpu=fpv5-d16/mfloat-abi=hard
-MULTILIB_REQUIRED += mthumb/march=armv7-m
 MULTILIB_REQUIRED += mthumb

Change History (3)

comment:1 Changed on May 14, 2019 at 6:56:12 AM by Sebastian Huber <sebastian.huber@…>

In 72271f6/rtems-source-builder:

5: Update GCC 7 baseline

Pick up ARM multilib changes to address Cortex-M3 Errata 602117.

Update #3747.

comment:2 Changed on May 14, 2019 at 9:08:23 AM by Sebastian Huber <sebastian.huber@…>

In b446457/rtems:

bsps/arm: Adjust machine flags for ARMv7-M

Update machine flags for Cortex-M3 and Cortex-M4 based BSPs to account
for Cortex-M3 Errata 602117 which required GCC multilib changes.

Update #3747.

comment:3 Changed on May 15, 2019 at 5:21:31 AM by Sebastian Huber <sebastian.huber@…>

In 7f51440/rtems-docs:

cpu-supplement: Update ARM multilibs

Update #3747.

Note: See TracTickets for help on using tickets.