projects
/
cortex-from-scratch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic memory management and uart wait fix
[cortex-from-scratch]
/
main.c
diff --git
a/main.c
b/main.c
index
5b488cf
..
84496d5
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-49,8
+49,19
@@
void main()
systick_init();
uart_puts("LOADING SYSTEM 0.1 ...\n");
sysinfo();
systick_init();
uart_puts("LOADING SYSTEM 0.1 ...\n");
sysinfo();
- addrtohex((volatile uint32_t) 0x12345678 );
- addrtohex((volatile uint32_t) *SCB_VTOR );
+ mm_init();
+
+ int * p2 = mm_alloc(200);
+ *p2 = 0x12345678;
+
+ test_memory(p2);
+
+ addrtohex(p2);
+ addrtohex(*p2);
+
+
+ //addrtohex((volatile uint32_t) 0x12345678 );
+ //addrtohex((volatile uint32_t) SCB_VTOR );
// asm("cpsie i"); // enable irq , cpsied f (disable faukts(
// asm("cpsie i"); // enable irq , cpsied f (disable faukts(