summaryrefslogtreecommitdiff
path: root/fw/fe310/test/mem.c
blob: a8c95468039413bd524286c10f3392b716800e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
}