aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
Diffstat (limited to 'boards')
-rw-r--r--boards/OLIMEX_LPC_P2148/board.c22
-rw-r--r--boards/OLIMEX_LPC_P2148/board.h10
2 files changed, 15 insertions, 17 deletions
diff --git a/boards/OLIMEX_LPC_P2148/board.c b/boards/OLIMEX_LPC_P2148/board.c
index 26cce1d90..45c492cbf 100644
--- a/boards/OLIMEX_LPC_P2148/board.c
+++ b/boards/OLIMEX_LPC_P2148/board.c
@@ -54,25 +54,18 @@ static CH_IRQ_HANDLER(T0IrqHandler) {
/*
* Early initialization code.
- * This initialization is performed just after reset before BSS and DATA
- * segments initialization.
+ * This initialization must be performed just after stack setup and before
+ * any other initialization.
*/
-void hwinit0(void) {
+void __early_init(void) {
lpc214x_clock_init();
}
/*
- * Late initialization code.
- * This initialization is performed after BSS and DATA segments initialization
- * and before invoking the main() function.
+ * Board-specific initialization code.
*/
-void hwinit1(void) {
-
- /*
- * HAL initialization.
- */
- halInit();
+void boardInit(void) {
/*
* System Timer initialization, 1ms intervals.
@@ -85,9 +78,4 @@ void hwinit1(void) {
timer->TC_MCR = 3; /* Interrupt and clear TC on match MR0. */
timer->TC_TCR = 2; /* Reset counter and prescaler. */
timer->TC_TCR = 1; /* Timer enabled. */
-
- /*
- * ChibiOS/RT initialization.
- */
- chSysInit();
}
diff --git a/boards/OLIMEX_LPC_P2148/board.h b/boards/OLIMEX_LPC_P2148/board.h
index 48dc4f6bb..7a1ec7cf6 100644
--- a/boards/OLIMEX_LPC_P2148/board.h
+++ b/boards/OLIMEX_LPC_P2148/board.h
@@ -82,4 +82,14 @@
#define PB_WP1 24
#define PB_CP1 25
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
#endif /* _BOARD_H_ */