kalloc and kfree interface and abstraction
[cortex-from-scratch] / main.c
diff --git a/main.c b/main.c
index b4ed64a..26a7305 100644 (file)
--- a/main.c
+++ b/main.c
@@ -18,7 +18,9 @@
 #include <sys/mmap.h>
 
 #include <lib/regfunc.h>
+#include <lib/pool.h>
 #include <lib/stdio.h>
+#include <lib/string.h>
 #include <lib/tinyprintf.h>
 
 #include <drivers/uart.h>
@@ -29,6 +31,7 @@
 //#include <drivers/mk450_joystick.h>
 #include <drivers/st7735s.h>
 
+
 void main()
 {
 
@@ -42,17 +45,20 @@ void main()
        uart_init();
 
        /* TFT screen */
-       tft_init();
+       // tft_init();
        
        /* Cortex M* integrated systick, can be replaced
         * by the more accurate RTC.
        systick_init();
        */
        
-
        /* Set up a very small libc library */
        init_printf(NULL, putc);
 
+       /* Heap init */
+       kheap_init();
+       //printf("%p\n", get_kheap());
+       
        /* Display some basic info at startup */
        sysinfo();
 
@@ -60,8 +66,9 @@ void main()
        led_init();
 
        /* Real time clock */
-       //rtc_init();
-       
+       rtc_init();
+
+
        /* Eeprom Driver
        eeprom_at24c_init();
        eeprom_test();