diff options
Diffstat (limited to 'boards')
-rw-r--r-- | boards/OLIMEX_STM32_H103/board.c | 22 | ||||
-rw-r--r-- | boards/OLIMEX_STM32_H103/board.h | 10 | ||||
-rw-r--r-- | boards/OLIMEX_STM32_P103/board.c | 22 | ||||
-rw-r--r-- | boards/OLIMEX_STM32_P103/board.h | 10 | ||||
-rw-r--r-- | boards/ST_STM3210C_EVAL/board.c | 25 | ||||
-rw-r--r-- | boards/ST_STM3210C_EVAL/board.h | 10 | ||||
-rw-r--r-- | boards/ST_STM32VL_DISCOVERY/board.c | 22 | ||||
-rw-r--r-- | boards/ST_STM32VL_DISCOVERY/board.h | 10 |
8 files changed, 61 insertions, 70 deletions
diff --git a/boards/OLIMEX_STM32_H103/board.c b/boards/OLIMEX_STM32_H103/board.c index 1f48eb629..e380b8b9a 100644 --- a/boards/OLIMEX_STM32_H103/board.c +++ b/boards/OLIMEX_STM32_H103/board.c @@ -36,28 +36,16 @@ const PALConfig pal_default_config = /*
* 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) {
stm32_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();
-
- /*
- * ChibiOS/RT initialization.
- */
- chSysInit();
+void boardInit(void) {
}
diff --git a/boards/OLIMEX_STM32_H103/board.h b/boards/OLIMEX_STM32_H103/board.h index b4ddace8b..0219d4fdd 100644 --- a/boards/OLIMEX_STM32_H103/board.h +++ b/boards/OLIMEX_STM32_H103/board.h @@ -122,4 +122,14 @@ #define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
#define VAL_GPIOEODR 0xFFFFFFFF
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
#endif /* _BOARD_H_ */
diff --git a/boards/OLIMEX_STM32_P103/board.c b/boards/OLIMEX_STM32_P103/board.c index 1f48eb629..e380b8b9a 100644 --- a/boards/OLIMEX_STM32_P103/board.c +++ b/boards/OLIMEX_STM32_P103/board.c @@ -36,28 +36,16 @@ const PALConfig pal_default_config = /*
* 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) {
stm32_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();
-
- /*
- * ChibiOS/RT initialization.
- */
- chSysInit();
+void boardInit(void) {
}
diff --git a/boards/OLIMEX_STM32_P103/board.h b/boards/OLIMEX_STM32_P103/board.h index b8baddb65..9ed8f5785 100644 --- a/boards/OLIMEX_STM32_P103/board.h +++ b/boards/OLIMEX_STM32_P103/board.h @@ -131,4 +131,14 @@ #define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
#define VAL_GPIOEODR 0xFFFFFFFF
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
#endif /* _BOARD_H_ */
diff --git a/boards/ST_STM3210C_EVAL/board.c b/boards/ST_STM3210C_EVAL/board.c index 0dfa60bfc..4b907f5ed 100644 --- a/boards/ST_STM3210C_EVAL/board.c +++ b/boards/ST_STM3210C_EVAL/board.c @@ -36,34 +36,21 @@ const PALConfig pal_default_config = /*
* 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) {
stm32_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) {
+void boardInit(void) {
/*
- * HAL initialization.
- */
- halInit();
-
- /*
- * Remap USART2 to the PD5/PD6 pins, done after halInit since HAL resets
- * these.
+ * Remap USART2 to the PD5/PD6 pins.
*/
AFIO->MAPR |= AFIO_MAPR_USART2_REMAP;
-
- /*
- * ChibiOS/RT initialization.
- */
- chSysInit();
}
diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h index 30bb6cb94..b8833ac9f 100644 --- a/boards/ST_STM3210C_EVAL/board.h +++ b/boards/ST_STM3210C_EVAL/board.h @@ -113,4 +113,14 @@ #define VAL_GPIOECRH 0x44444444 /* PE15...PE8 */
#define VAL_GPIOEODR 0xFFFFFFFF
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
#endif /* _BOARD_H_ */
diff --git a/boards/ST_STM32VL_DISCOVERY/board.c b/boards/ST_STM32VL_DISCOVERY/board.c index 1f48eb629..e380b8b9a 100644 --- a/boards/ST_STM32VL_DISCOVERY/board.c +++ b/boards/ST_STM32VL_DISCOVERY/board.c @@ -36,28 +36,16 @@ const PALConfig pal_default_config = /*
* 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) {
stm32_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();
-
- /*
- * ChibiOS/RT initialization.
- */
- chSysInit();
+void boardInit(void) {
}
diff --git a/boards/ST_STM32VL_DISCOVERY/board.h b/boards/ST_STM32VL_DISCOVERY/board.h index 7dc2e77e2..4b16fc43a 100644 --- a/boards/ST_STM32VL_DISCOVERY/board.h +++ b/boards/ST_STM32VL_DISCOVERY/board.h @@ -133,4 +133,14 @@ #define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
#define VAL_GPIOEODR 0xFFFFFFFF
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
#endif /* _BOARD_H_ */
|