aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARMCM0-LPC1114-GCC/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/ARMCM0-LPC1114-GCC/main.c')
-rw-r--r--demos/ARMCM0-LPC1114-GCC/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/demos/ARMCM0-LPC1114-GCC/main.c b/demos/ARMCM0-LPC1114-GCC/main.c
index 2b05b6f5d..14f913a0a 100644
--- a/demos/ARMCM0-LPC1114-GCC/main.c
+++ b/demos/ARMCM0-LPC1114-GCC/main.c
@@ -92,8 +92,7 @@ static msg_t Thread2(void *arg) {
}
/*
- * Entry point, note, the main() function is already a thread in the system
- * on entry.
+ * Application entry point.
*/
int main(int argc, char **argv) {
uint8_t i;
@@ -102,6 +101,16 @@ int main(int argc, char **argv) {
(void)argv;
/*
+ * System initializations.
+ * - HAL initialization, this also initializes the configured device drivers
+ * and performs the board-specific initializations.
+ * - Kernel initialization, the main() function becomes a thread and the
+ * RTOS is active.
+ */
+ halInit();
+ chSysInit();
+
+ /*
* Activates the SD1 and SPI1 drivers.
*/
sdStart(&SD1, NULL); /* Default: 38400,8,N,1. */