[PATCH 1/2] smdk2410: Move define of CPU_S3C2410 to bspopts.h
Joel Sherrill
joel at rtems.org
Wed May 9 20:23:33 UTC 2018
Updates #3425.
---
bsps/arm/smdk2410/config/smdk2410.cfg | 2 +-
bsps/arm/smdk2410/include/bsp/irq.h | 2 ++
bsps/arm/smdk2410/include/s3c24xx.h | 4 ++++
c/src/lib/libbsp/arm/smdk2410/configure.ac | 7 +++++--
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/bsps/arm/smdk2410/config/smdk2410.cfg b/bsps/arm/smdk2410/config/smdk2410.cfg
index b5720ca..2653672 100644
--- a/bsps/arm/smdk2410/config/smdk2410.cfg
+++ b/bsps/arm/smdk2410/config/smdk2410.cfg
@@ -8,7 +8,7 @@ RTEMS_CPU=arm
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
-CPU_CFLAGS = -mcpu=arm920t -DCPU_S3C2410
+CPU_CFLAGS = -mcpu=arm920t
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g
diff --git a/bsps/arm/smdk2410/include/bsp/irq.h b/bsps/arm/smdk2410/include/bsp/irq.h
index 8882b43..3f3fe92 100644
--- a/bsps/arm/smdk2410/include/bsp/irq.h
+++ b/bsps/arm/smdk2410/include/bsp/irq.h
@@ -86,6 +86,8 @@
#define BSP_INT_RTC 30
#define BSP_INT_ADC 31
#define BSP_MAX_INT 32
+#else
+#error "Undefined Samsung CPU model"
#endif
#define BSP_INTERRUPT_VECTOR_MIN 0
diff --git a/bsps/arm/smdk2410/include/s3c24xx.h b/bsps/arm/smdk2410/include/s3c24xx.h
index 914b867..bb65608 100644
--- a/bsps/arm/smdk2410/include/s3c24xx.h
+++ b/bsps/arm/smdk2410/include/s3c24xx.h
@@ -8,10 +8,14 @@
#ifndef S3C24XX_H_
#define S3C24XX_H_
+#include <bspopts.h>
+
#ifdef CPU_S3C2400
#include<s3c2400.h>
#elif defined CPU_S3C2410
#include<s3c2410.h>
+#else
+#error "Undefined Samsung CPU model"
#endif
#endif /*S3C24XX_H_*/
diff --git a/c/src/lib/libbsp/arm/smdk2410/configure.ac b/c/src/lib/libbsp/arm/smdk2410/configure.ac
index 8e5df41..9e79651 100644
--- a/c/src/lib/libbsp/arm/smdk2410/configure.ac
+++ b/c/src/lib/libbsp/arm/smdk2410/configure.ac
@@ -11,8 +11,6 @@ RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
RTEMS_BSP_CONFIGURE
-
-
RTEMS_BSPOPTS_SET([ON_SKYEYE],[*],[])
RTEMS_BSPOPTS_HELP([ON_SKYEYE],
[If defined, enable options which optimize executingon the Skyeye
@@ -20,6 +18,11 @@ RTEMS_BSPOPTS_HELP([ON_SKYEYE],
time spent in the idle task is minimized. This significantly reduces
the wall time required to execute the RTEMS test suites.])
+RTEMS_BSPOPTS_SET([CPU_S3C2410],[smdk2410],[1])
+RTEMS_BSPOPTS_SET([CPU_S3C2410],[*],[])
+RTEMS_BSPOPTS_HELP([CPU_S3C2410],
+[If defined, enable optons for the S3C2410 CPU model.])
+
RTEMS_BSP_CLEANUP_OPTIONS
# Explicitly list all Makefiles here
--
1.8.3.1
More information about the devel
mailing list