From d2bcafe8fbad5f264432228ba86ce61134ce0f7e Mon Sep 17 00:00:00 2001 From: Kees Bakker Date: Tue, 6 Sep 2016 21:03:30 +0200 Subject: [PATCH] cpu/sam21_common: remove define of LITTLE_ENDIAN This define conflicts with LITTLE_ENDIAN defined in include/machine/endian.h which is part of gcc-arm-none-eabi. Also, the define does not seem to be used by the ASF included files. --- cpu/sam21_common/include/cmsis/samd21/README.md | 12 ++++++++++++ .../include/cmsis/samd21/include/samd21e15a.h | 1 - .../include/cmsis/samd21/include/samd21e15b.h | 1 - .../include/cmsis/samd21/include/samd21e15bu.h | 1 - .../include/cmsis/samd21/include/samd21e15l.h | 1 - .../include/cmsis/samd21/include/samd21e16a.h | 1 - .../include/cmsis/samd21/include/samd21e16b.h | 1 - .../include/cmsis/samd21/include/samd21e16bu.h | 1 - .../include/cmsis/samd21/include/samd21e16l.h | 1 - .../include/cmsis/samd21/include/samd21e17a.h | 1 - .../include/cmsis/samd21/include/samd21e18a.h | 1 - .../include/cmsis/samd21/include/samd21g15a.h | 1 - .../include/cmsis/samd21/include/samd21g15b.h | 1 - .../include/cmsis/samd21/include/samd21g15l.h | 1 - .../include/cmsis/samd21/include/samd21g16a.h | 1 - .../include/cmsis/samd21/include/samd21g16b.h | 1 - .../include/cmsis/samd21/include/samd21g16l.h | 1 - .../include/cmsis/samd21/include/samd21g17a.h | 1 - .../include/cmsis/samd21/include/samd21g17au.h | 1 - .../include/cmsis/samd21/include/samd21g18a.h | 1 - .../include/cmsis/samd21/include/samd21g18au.h | 1 - .../include/cmsis/samd21/include/samd21j15a.h | 1 - .../include/cmsis/samd21/include/samd21j15b.h | 1 - .../include/cmsis/samd21/include/samd21j16a.h | 1 - .../include/cmsis/samd21/include/samd21j16b.h | 1 - .../include/cmsis/samd21/include/samd21j17a.h | 1 - .../include/cmsis/samd21/include/samd21j18a.h | 1 - cpu/sam21_common/include/cmsis/samr21/README.md | 12 ++++++++++++ .../include/cmsis/samr21/include/samr21e16a.h | 1 - .../include/cmsis/samr21/include/samr21e17a.h | 1 - .../include/cmsis/samr21/include/samr21e18a.h | 1 - .../include/cmsis/samr21/include/samr21g16a.h | 1 - .../include/cmsis/samr21/include/samr21g17a.h | 1 - .../include/cmsis/samr21/include/samr21g18a.h | 1 - 34 files changed, 24 insertions(+), 32 deletions(-) diff --git a/cpu/sam21_common/include/cmsis/samd21/README.md b/cpu/sam21_common/include/cmsis/samd21/README.md index 7cf595bf924e8..b1bdedfc864fe 100644 --- a/cpu/sam21_common/include/cmsis/samd21/README.md +++ b/cpu/sam21_common/include/cmsis/samd21/README.md @@ -32,3 +32,15 @@ the trailing white space had to be removed. Please take this into account when comparing to the original ASF distribution. find include/ -name '*.h' -exec sed -i 's/\s*$//' '{}' + + +## LITTLE_ENDIAN + +These include files define `LITTLE_ENDIAN`. But we think this is wrong. It +seems more logical to let the compiler decide in which mode the ARM code is +to be translated. In include/machine/endian.h there is already a define of +`LITTLE_ENDIAN` (and `BIG_ENDIAN`) for a different purpose. + +So, we decided to remove the define from the ASF CMSIS files. The command +for it (running from this directory) is: + + find include/ -name '*.h' -exec sed -i '/^#define\s\s*LITTLE_ENDIAN/d' '{}' + diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15a.h index ede4517b6396d..aee721d471af8 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15a.h @@ -222,7 +222,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15b.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15b.h index 4bccfb67f27a6..bb3501fa9d5f7 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15b.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15b.h @@ -219,7 +219,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15bu.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15bu.h index 9465f6a1a25ca..f45017c5c6a28 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15bu.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15bu.h @@ -219,7 +219,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15l.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15l.h index 1de76eba88ccd..60dd54de72b6f 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e15l.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e15l.h @@ -215,7 +215,6 @@ void AC1_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16a.h index 1eccb36ec2bc7..df81cafd4fb22 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16a.h @@ -222,7 +222,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16b.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16b.h index 5b6ada8290656..631e2e68fee8f 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16b.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16b.h @@ -219,7 +219,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16bu.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16bu.h index 410c8c13d4149..6682207478732 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16bu.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16bu.h @@ -219,7 +219,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16l.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16l.h index a61b2c6ef0b24..6993495876942 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e16l.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e16l.h @@ -215,7 +215,6 @@ void AC1_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e17a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e17a.h index e2aaa0ebe9aa7..e8d8918b88f53 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e17a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e17a.h @@ -222,7 +222,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21e18a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21e18a.h index 6ffe7b8050ddf..14ebd0830fc42 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21e18a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21e18a.h @@ -222,7 +222,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g15a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g15a.h index 4ca300080c527..bd7f6d05b4b32 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g15a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g15a.h @@ -226,7 +226,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g15b.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g15b.h index 86374812a156f..95dd548dfe0ab 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g15b.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g15b.h @@ -223,7 +223,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g15l.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g15l.h index 51c56ed008c32..dea7588b7f605 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g15l.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g15l.h @@ -223,7 +223,6 @@ void AC1_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g16a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g16a.h index f6d012d22b388..1b6fdb48a78ef 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g16a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g16a.h @@ -226,7 +226,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g16b.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g16b.h index 68b69ecbb3390..2149946e829c0 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g16b.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g16b.h @@ -223,7 +223,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g16l.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g16l.h index ef662df4e105f..3e7659f9bb543 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g16l.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g16l.h @@ -223,7 +223,6 @@ void AC1_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g17a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g17a.h index fdea00c604447..a8cc5158c69ff 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g17a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g17a.h @@ -226,7 +226,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g17au.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g17au.h index a78bf4e98dfee..4546e777e959a 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g17au.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g17au.h @@ -230,7 +230,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g18a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g18a.h index 9d29c2be9ff4f..9b6919b4bf6f0 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g18a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g18a.h @@ -226,7 +226,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21g18au.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21g18au.h index 8098ff2cb324e..17917e98a86fd 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21g18au.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21g18au.h @@ -230,7 +230,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21j15a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21j15a.h index b224162536834..022a8a2cd7030 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21j15a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21j15a.h @@ -230,7 +230,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21j15b.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21j15b.h index e694ed9743ced..634f19f3eed8c 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21j15b.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21j15b.h @@ -227,7 +227,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21j16a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21j16a.h index 16aa510e45223..0c9cf64f811da 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21j16a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21j16a.h @@ -230,7 +230,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21j16b.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21j16b.h index 353a1515d56b5..c93a212965020 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21j16b.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21j16b.h @@ -227,7 +227,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21j17a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21j17a.h index f37138e251859..3a79e3d54324d 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21j17a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21j17a.h @@ -230,7 +230,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samd21/include/samd21j18a.h b/cpu/sam21_common/include/cmsis/samd21/include/samd21j18a.h index 0fbe7899cf9f0..7e272e704da3e 100644 --- a/cpu/sam21_common/include/cmsis/samd21/include/samd21j18a.h +++ b/cpu/sam21_common/include/cmsis/samd21/include/samd21j18a.h @@ -230,7 +230,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samr21/README.md b/cpu/sam21_common/include/cmsis/samr21/README.md index 9c9ff143b8f08..fd622f3b55773 100644 --- a/cpu/sam21_common/include/cmsis/samr21/README.md +++ b/cpu/sam21_common/include/cmsis/samr21/README.md @@ -13,3 +13,15 @@ the trailing white space had to be removed. Please take this into account when comparing to the original ASF distribution. find include/ -name '*.h' -exec sed -i 's/\s*$//' '{}' + + +## LITTLE_ENDIAN + +These include files define `LITTLE_ENDIAN`. But we think this is wrong. It +seems more logical to let the compiler decide in which mode the ARM code is +to be translated. In include/machine/endian.h there is already a define of +`LITTLE_ENDIAN` (and `BIG_ENDIAN`) for a different purpose. + +So, we decided to remove the define from the ASF CMSIS files. The command +for it (running from this directory) is: + + find include/ -name '*.h' -exec sed -i '/^#define\s\s*LITTLE_ENDIAN/d' '{}' + diff --git a/cpu/sam21_common/include/cmsis/samr21/include/samr21e16a.h b/cpu/sam21_common/include/cmsis/samr21/include/samr21e16a.h index 931bafca9cf45..88be0a31efaba 100644 --- a/cpu/sam21_common/include/cmsis/samr21/include/samr21e16a.h +++ b/cpu/sam21_common/include/cmsis/samr21/include/samr21e16a.h @@ -229,7 +229,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samr21/include/samr21e17a.h b/cpu/sam21_common/include/cmsis/samr21/include/samr21e17a.h index 38d7a98c75be3..8e42ec2da3702 100644 --- a/cpu/sam21_common/include/cmsis/samr21/include/samr21e17a.h +++ b/cpu/sam21_common/include/cmsis/samr21/include/samr21e17a.h @@ -229,7 +229,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samr21/include/samr21e18a.h b/cpu/sam21_common/include/cmsis/samr21/include/samr21e18a.h index 6bae1e0e0a570..ebaf8fb988b34 100644 --- a/cpu/sam21_common/include/cmsis/samr21/include/samr21e18a.h +++ b/cpu/sam21_common/include/cmsis/samr21/include/samr21e18a.h @@ -229,7 +229,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samr21/include/samr21g16a.h b/cpu/sam21_common/include/cmsis/samr21/include/samr21g16a.h index 5a51cc15abc39..5e60e728ca1eb 100644 --- a/cpu/sam21_common/include/cmsis/samr21/include/samr21g16a.h +++ b/cpu/sam21_common/include/cmsis/samr21/include/samr21g16a.h @@ -229,7 +229,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samr21/include/samr21g17a.h b/cpu/sam21_common/include/cmsis/samr21/include/samr21g17a.h index 1f7ed0341c215..fde6b89fe6313 100644 --- a/cpu/sam21_common/include/cmsis/samr21/include/samr21g17a.h +++ b/cpu/sam21_common/include/cmsis/samr21/include/samr21g17a.h @@ -229,7 +229,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ diff --git a/cpu/sam21_common/include/cmsis/samr21/include/samr21g18a.h b/cpu/sam21_common/include/cmsis/samr21/include/samr21g18a.h index 00ac5f292ed59..28cd2a3eaadfd 100644 --- a/cpu/sam21_common/include/cmsis/samr21/include/samr21g18a.h +++ b/cpu/sam21_common/include/cmsis/samr21/include/samr21g18a.h @@ -229,7 +229,6 @@ void I2S_Handler ( void ); * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals */ -#define LITTLE_ENDIAN 1 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */