aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-26 10:55:58 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-26 10:55:58 +0000
commit9f12fc709ed9a73ebad92da8f4d01345a69b46eb (patch)
treee7390f8eea2e88a9ceb27d40422179cf3912dcb5 /os
parentce46beee69f46e8fc26a67c6e8b993ff6f45d2cd (diff)
downloadChibiOS-9f12fc709ed9a73ebad92da8f4d01345a69b46eb.tar.gz
ChibiOS-9f12fc709ed9a73ebad92da8f4d01345a69b46eb.tar.bz2
ChibiOS-9f12fc709ed9a73ebad92da8f4d01345a69b46eb.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6729 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/boards/ST_EVB_SPC560P/board.c31
-rw-r--r--os/hal/boards/ST_EVB_SPC560P/board.h33
-rw-r--r--os/rt/ports/e200/compilers/GCC/mk/port_spc560pxx.mk14
3 files changed, 48 insertions, 30 deletions
diff --git a/os/hal/boards/ST_EVB_SPC560P/board.c b/os/hal/boards/ST_EVB_SPC560P/board.c
index 3f89b89ff..5ad702a70 100644
--- a/os/hal/boards/ST_EVB_SPC560P/board.c
+++ b/os/hal/boards/ST_EVB_SPC560P/board.c
@@ -19,31 +19,33 @@
#if HAL_USE_PAL || defined(__DOXYGEN__)
/* Initial setup of all defined pads, the list is terminated by a {-1, 0, 0}.*/
static const spc_siu_init_t spc_siu_init[] = {
- {PCR(PORT_B, PB_LIN0_TDX), PAL_HIGH, PAL_MODE_OUTPUT_ALTERNATE(1)},
- {PCR(PORT_B, PB_LIN0_RDX), PAL_HIGH, PAL_MODE_INPUT},
- {PCR(PORT_D, PD_BUTTON1), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_D, PD_BUTTON2), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_D, PD_BUTTON3), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_D, PD_BUTTON4), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_D, PD_LED1), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
- {PCR(PORT_D, PD_LED2), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
- {PCR(PORT_D, PD_LED3), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
- {PCR(PORT_D, PD_LED4), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_B, PB_LIN0_TDX), PAL_HIGH, PAL_MODE_OUTPUT_ALTERNATE(1)},
+ {PCR(PORT_B, PB_LIN0_RDX), PAL_HIGH, PAL_MODE_INPUT},
+ {PCR(PORT_D, PD_BUTTON1), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_D, PD_BUTTON2), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_D, PD_BUTTON3), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_D, PD_BUTTON4), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_D, PD_LED1), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_D, PD_LED2), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_D, PD_LED3), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_D, PD_LED4), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
{-1, 0, 0}
};
/* Initialization array for the PSMI registers.*/
static const uint8_t spc_padsels_init[SPC5_SIUL_NUM_PADSELS] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,
};
/**
* @brief PAL setup.
*/
const PALConfig pal_default_config = {
- PAL_MODE_UNCONNECTED, /* Default mode for all undefined pads. */
+ PAL_MODE_UNCONNECTED,
spc_siu_init,
spc_padsels_init
};
@@ -63,5 +65,4 @@ void __early_init(void) {
* Board-specific initialization code.
*/
void boardInit(void) {
-
}
diff --git a/os/hal/boards/ST_EVB_SPC560P/board.h b/os/hal/boards/ST_EVB_SPC560P/board.h
index a02225c13..9688036d5 100644
--- a/os/hal/boards/ST_EVB_SPC560P/board.h
+++ b/os/hal/boards/ST_EVB_SPC560P/board.h
@@ -18,14 +18,19 @@
#define _BOARD_H_
/*
- * Setup for a generic SPC560Pxx proto board.
+ * Setup for a generic SPC560Pxx board.
*/
/*
* Board identifiers.
*/
-#define BOARD_GENERIC_SPC560P
-#define BOARD_NAME "Generic SPC560Pxx"
+#define BOARD_SPC560PXX_EVB
+#define BOARD_NAME "EVB with SPC560Pxx Mini Module"
+
+/*
+ * Device identifier.
+ */
+#define _SPC560P50L5_
/*
* Board frequencies.
@@ -37,18 +42,16 @@
/*
* I/O definitions.
*/
-#define PB_LIN0_TDX 2
-#define PB_LIN0_RDX 3
-
-#define PD_BUTTON1 0
-#define PD_BUTTON2 1
-#define PD_BUTTON3 2
-#define PD_BUTTON4 3
-
-#define PD_LED1 4
-#define PD_LED2 5
-#define PD_LED3 6
-#define PD_LED4 7
+#define PB_LIN0_TDX 2
+#define PB_LIN0_RDX 3
+#define PD_BUTTON1 0
+#define PD_BUTTON2 1
+#define PD_BUTTON3 2
+#define PD_BUTTON4 3
+#define PD_LED1 4
+#define PD_LED2 5
+#define PD_LED3 6
+#define PD_LED4 7
/*
* Support macros.
diff --git a/os/rt/ports/e200/compilers/GCC/mk/port_spc560pxx.mk b/os/rt/ports/e200/compilers/GCC/mk/port_spc560pxx.mk
new file mode 100644
index 000000000..e9d078aff
--- /dev/null
+++ b/os/rt/ports/e200/compilers/GCC/mk/port_spc560pxx.mk
@@ -0,0 +1,14 @@
+# List of the ChibiOS/RT e200z0 SPC560Pxx port files.
+PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c
+
+PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC560Pxx/boot.s \
+ $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \
+ $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \
+ $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s
+
+PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \
+ ${CHIBIOS}/os/common/ports/e200/devices/SPC560Pxx \
+ ${CHIBIOS}/os/rt/ports/e200 \
+ ${CHIBIOS}/os/rt/ports/e200/compilers/GCC
+
+PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld