summaryrefslogtreecommitdiff
path: root/fw/fe310/test/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/test/mem.c')
-rw-r--r--fw/fe310/test/mem.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/fw/fe310/test/mem.c b/fw/fe310/test/mem.c
new file mode 100644
index 0000000..a8c9546
--- /dev/null
+++ b/fw/fe310/test/mem.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+
+extern char metal_segment_itim_target_start;
+extern char metal_segment_itim_target_end;
+
+extern char metal_segment_data_target_start;
+extern char metal_segment_data_target_end;
+
+extern char metal_segment_bss_target_start;
+extern char metal_segment_bss_target_end;
+
+extern char metal_segment_heap_target_start;
+extern char metal_segment_heap_target_end;
+
+extern char metal_segment_stack_begin;
+extern char metal_segment_stack_end;
+
+void print_mem(void) {
+ printf("ITIM: %p - %p\n", &metal_segment_itim_target_start, &metal_segment_itim_target_end);
+ printf("DATA: %p - %p\n", &metal_segment_data_target_start, &metal_segment_data_target_end);
+ printf("BSS: %p - %p\n", &metal_segment_bss_target_start, &metal_segment_bss_target_end);
+ printf("HEAP: %p - %p\n", &metal_segment_heap_target_start, &metal_segment_heap_target_end);
+ printf("STACK: %p - %p\n", &metal_segment_stack_begin, &metal_segment_stack_end);
+}