diff --git a/init/main.c b/init/main.c index d29639f..8390f75 100644 --- a/init/main.c +++ b/init/main.c @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -27,17 +28,15 @@ */ int main(void) { - uint32_t count = 0; - unsigned int print_count = 0; - - REG_PIOB_OER = 1 << 27; - REG_PIOB_PER = 1 << 27; - REG_PIOB_CODR = 1 << 27; + volatile uint32_t count = 0; + volatile unsigned int print_count = 0; int err = kent_root_init(); if (err != 0) return err; + kevents_init(); + err = sched_init(); if (err != 0) return err; @@ -50,11 +49,17 @@ int main(void) if (err != 0) return err; + /* we should have a serial console now */ + + REG_PIOB_OER = 1 << 27; + REG_PIOB_PER = 1 << 27; + REG_PIOB_CODR = 1 << 27; + while (true) { if (count++ != 1000000) continue; - printf("hello, world (%u)!\n", print_count); + printf("hello, world (%u)\n", print_count); print_count++; if (print_count % 2)