X-Git-Url: https://robinkrens.nl/gitweb/?a=blobdiff_plain;f=main.c;h=c8a47aa60ac49d5c9a9a71af1c68867a507f0bf5;hb=36f2cc60f527235aaf1b3af0888f3255c0214030;hp=5b488cfc42ebcfef20210e2e3b3436059302dcf0;hpb=22c1abee1ad44eb88784fd7ff38ca669f41b6c01;p=cortex-from-scratch diff --git a/main.c b/main.c index 5b488cf..c8a47aa 100644 --- a/main.c +++ b/main.c @@ -1,7 +1,7 @@ #include #include #include -#include // <-- your own header file located located in ./include +#include // <-- my own header file located located in ./include #include @@ -46,11 +46,21 @@ void main() ivt_init(); // clock_init(); uart_init(); - systick_init(); uart_puts("LOADING SYSTEM 0.1 ...\n"); + systick_init(); sysinfo(); - addrtohex((volatile uint32_t) 0x12345678 ); - addrtohex((volatile uint32_t) *SCB_VTOR ); + mm_init(); + + //int * p2 = mm_alloc(512); + //memset(p2, 'a', 512); + + //addrtohex(p2); + //addrtohex(*p2); + + //uint32_t * p = (volatile unsigned) 0x21000000; + //regw_u32(p, 0x0CCCCCCCC, 4, 0x01); + + //regw_u8(p, 0xFF, 0, 0x02); // asm("cpsie i"); // enable irq , cpsied f (disable faukts(