summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/examples/memory/main.c
blob: 01c5d0be5e587755a8d62c45e3f805a47b122ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "femto.h"
#ifdef __riscv
#include "arch/riscv/encoding.h"
#include "arch/riscv/machine.h"
#endif

extern char _memory_start;

int main(int argc, char **argv)
{
#ifdef __riscv
	memory_info_t info = memory_probe();
	printf("memory_start=0x%lx - 0x%lx\n", info.start, info.end);
#else
	puts("architecture-not-supported");
#endif
}