diff options
Diffstat (limited to 'fw/fe310/phone/mem.c')
-rw-r--r-- | fw/fe310/phone/mem.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fw/fe310/phone/mem.c b/fw/fe310/phone/mem.c new file mode 100644 index 0000000..90bc848 --- /dev/null +++ b/fw/fe310/phone/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_start; +extern char metal_segment_bss_end; + +extern char metal_segment_heap_start; +extern char metal_segment_heap_end; + +extern char metal_segment_stack_start; +extern char metal_segment_stack_end; + +void mem_print(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_start, &metal_segment_bss_end); + printf("STACK: %p - %p\n", &metal_segment_stack_start, &metal_segment_stack_end); + printf("HEAP: %p - %p\n", &metal_segment_heap_start, &metal_segment_heap_end); +} |