diff options
Diffstat (limited to 'boards/OLIMEX_SAM7_P256')
-rw-r--r-- | boards/OLIMEX_SAM7_P256/board.c | 22 | ||||
-rw-r--r-- | boards/OLIMEX_SAM7_P256/board.h | 10 |
2 files changed, 15 insertions, 17 deletions
diff --git a/boards/OLIMEX_SAM7_P256/board.c b/boards/OLIMEX_SAM7_P256/board.c index 12b221930..cd9a43873 100644 --- a/boards/OLIMEX_SAM7_P256/board.c +++ b/boards/OLIMEX_SAM7_P256/board.c @@ -54,10 +54,10 @@ static CH_IRQ_HANDLER(SYSIrqHandler) { /*
* 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) {
/* Watchdog disabled.*/
AT91C_BASE_WDTC->WDTC_WDMR = AT91C_WDTC_WDDIS;
@@ -66,16 +66,9 @@ void hwinit0(void) { }
/*
- * 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) {
/*
* LED pins setup.
@@ -106,9 +99,4 @@ void hwinit1(void) { AIC_EnableIT(AT91C_ID_SYS);
AT91C_BASE_PITC->PITC_PIMR = (MCK / 16 / CH_FREQUENCY) - 1;
AT91C_BASE_PITC->PITC_PIMR |= AT91C_PITC_PITEN | AT91C_PITC_PITIEN;
-
- /*
- * ChibiOS/RT initialization.
- */
- chSysInit();
}
diff --git a/boards/OLIMEX_SAM7_P256/board.h b/boards/OLIMEX_SAM7_P256/board.h index 0e2a3d783..65877652d 100644 --- a/boards/OLIMEX_SAM7_P256/board.h +++ b/boards/OLIMEX_SAM7_P256/board.h @@ -71,4 +71,14 @@ #define PIOA_MMC_NPCS0 11
#define PIOA_MMC_NPCS0_MASK (1 << PIOA_MMC_NPCS0_MASK)
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
#endif /* _BOARD_H_ */
|