The RISC-V64 ELF Bareboard Example

This tutorial shows how to build an example and run it with GNATemulator.

Compiling the example

The example comprises 2 files:

  • hello.adb, the main subprogram.

  • hello.gpr, the project to build the program

To build, simply invoke gprbuild:

gprbuild --target=riscv64-elf -P hello.gpr --RTS=embedded-polarfiresoc

Running the example

To launch the example just run:

riscv64-elf-gnatemu --board=polarfiresoc hello

GNATemulator will automatically load the ELF file (hello) and start execution at the entry point.