aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-26 16:33:03 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-26 16:33:03 +0000
commita6c62e43d8b79fb55f717658e6963e15ccfa1e5a (patch)
treebd427ef1e0e193684c40acdb6f58314b4ce10e46
parent1dc98e702694bc7b4d03579ca7ca66c41ba07815 (diff)
downloadChibiOS-a6c62e43d8b79fb55f717658e6963e15ccfa1e5a.tar.gz
ChibiOS-a6c62e43d8b79fb55f717658e6963e15ccfa1e5a.tar.bz2
ChibiOS-a6c62e43d8b79fb55f717658e6963e15ccfa1e5a.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1787 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--boards/EA_LPCXPRESSO_BB_1114/board.c49
-rw-r--r--boards/EA_LPCXPRESSO_BB_1114/board.h51
-rw-r--r--boards/EA_LPCXPRESSO_BB_1114/board.mk5
-rw-r--r--demos/ARMCM0-LPC1114-GCC/Makefile6
-rw-r--r--demos/ARMCM0-LPC1114-GCC/main.c2
-rw-r--r--os/hal/platforms/LPC111x/hal_lld.c13
-rw-r--r--os/hal/platforms/LPC111x/hal_lld.h1
-rw-r--r--os/hal/platforms/LPC111x/platform.mk5
8 files changed, 125 insertions, 7 deletions
diff --git a/boards/EA_LPCXPRESSO_BB_1114/board.c b/boards/EA_LPCXPRESSO_BB_1114/board.c
new file mode 100644
index 000000000..f5310d1c7
--- /dev/null
+++ b/boards/EA_LPCXPRESSO_BB_1114/board.c
@@ -0,0 +1,49 @@
+/*
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ch.h"
+#include "hal.h"
+
+/*
+ * Early initialization code.
+ * This initialization is performed just after reset before BSS and DATA
+ * segments initialization.
+ */
+void hwinit0(void) {
+
+ lpc111x_clock_init();
+}
+
+/*
+ * Late initialization code.
+ * This initialization is performed after BSS and DATA segments initialization
+ * and before invoking the main() function.
+ */
+void hwinit1(void) {
+
+ /*
+ * HAL initialization.
+ */
+ halInit();
+
+ /*
+ * ChibiOS/RT initialization.
+ */
+ chSysInit();
+}
diff --git a/boards/EA_LPCXPRESSO_BB_1114/board.h b/boards/EA_LPCXPRESSO_BB_1114/board.h
new file mode 100644
index 000000000..1c71cab9d
--- /dev/null
+++ b/boards/EA_LPCXPRESSO_BB_1114/board.h
@@ -0,0 +1,51 @@
+/*
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for Embedded Artists LPCXpresso Base Board with LPC1114 daughter
+ * board.
+ */
+
+/*
+ * Board identifiers.
+ */
+#define BOARD_EA_BB_LPC1114
+#define BOARD_NAME "Embedded Artists LPCXpresso Base Board + LPC1114"
+
+/*
+ * Board frequencies.
+ */
+#define HSECLK 8000000
+
+/*
+ * Pin definitions.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void hwinit(void);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BOARD_H_ */
diff --git a/boards/EA_LPCXPRESSO_BB_1114/board.mk b/boards/EA_LPCXPRESSO_BB_1114/board.mk
new file mode 100644
index 000000000..affca2d05
--- /dev/null
+++ b/boards/EA_LPCXPRESSO_BB_1114/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_1114/board.c
+
+# Required include directories
+BOARDINC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_1114
diff --git a/demos/ARMCM0-LPC1114-GCC/Makefile b/demos/ARMCM0-LPC1114-GCC/Makefile
index dcfec8ce6..0722b8604 100644
--- a/demos/ARMCM0-LPC1114-GCC/Makefile
+++ b/demos/ARMCM0-LPC1114-GCC/Makefile
@@ -52,9 +52,9 @@ LDSCRIPT= ch.ld
# Imported source files
CHIBIOS = ../..
-#include $(CHIBIOS)/boards/EA_LPCXPRESSO_MB/board.mk
-#include $(CHIBIOS)/os/hal/platforms/LPC111x/platform.mk
-#include $(CHIBIOS)/os/hal/hal.mk
+include $(CHIBIOS)/boards/EA_LPCXPRESSO_BB_1114/board.mk
+include $(CHIBIOS)/os/hal/platforms/LPC111x/platform.mk
+include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/ports/GCC/ARMCMx/LPC111x/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
diff --git a/demos/ARMCM0-LPC1114-GCC/main.c b/demos/ARMCM0-LPC1114-GCC/main.c
index 0dd187ecd..11c3eb76b 100644
--- a/demos/ARMCM0-LPC1114-GCC/main.c
+++ b/demos/ARMCM0-LPC1114-GCC/main.c
@@ -18,7 +18,7 @@
*/
#include "ch.h"
-//#include "hal.h"
+#include "hal.h"
//#include "test.h"
/*
diff --git a/os/hal/platforms/LPC111x/hal_lld.c b/os/hal/platforms/LPC111x/hal_lld.c
index 8674d4f38..919d1b0c7 100644
--- a/os/hal/platforms/LPC111x/hal_lld.c
+++ b/os/hal/platforms/LPC111x/hal_lld.c
@@ -18,10 +18,10 @@
*/
/**
- * @file templates/hal_lld.c
- * @brief HAL Driver subsystem low level driver source template.
+ * @file LPC111x/hal_lld.c
+ * @brief LPC111x HAL subsystem low level driver source.
*
- * @addtogroup HAL_LLD
+ * @addtogroup LPC111x_HAL
* @{
*/
@@ -55,4 +55,11 @@ void hal_lld_init(void) {
}
+/**
+ * @brief LPC111x clocks and PLL initialization.
+ * @note All the involved constants come from the file @p board.h.
+ */
+void lpc111x_clock_init(void) {
+}
+
/** @} */
diff --git a/os/hal/platforms/LPC111x/hal_lld.h b/os/hal/platforms/LPC111x/hal_lld.h
index dc8b3f143..414ec7867 100644
--- a/os/hal/platforms/LPC111x/hal_lld.h
+++ b/os/hal/platforms/LPC111x/hal_lld.h
@@ -61,6 +61,7 @@
extern "C" {
#endif
void hal_lld_init(void);
+ void lpc111x_clock_init(void);
#ifdef __cplusplus
}
#endif
diff --git a/os/hal/platforms/LPC111x/platform.mk b/os/hal/platforms/LPC111x/platform.mk
new file mode 100644
index 000000000..8dc7de02a
--- /dev/null
+++ b/os/hal/platforms/LPC111x/platform.mk
@@ -0,0 +1,5 @@
+# List of all the LPC111x platform files.
+PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/LPC111x/hal_lld.c
+
+# Required include directories
+PLATFORMINC = ${CHIBIOS}/os/hal/platforms/LPC111x