forked from Firmware/Firmwares
expands README
This commit is contained in:
parent
765f48e85a
commit
64d6045d43
26
README.md
26
README.md
|
@ -1,3 +1,25 @@
|
|||
# Firmware
|
||||
# MINRES Firmware Repository
|
||||
## Structure
|
||||
This repository comes with several executables ready to be built, such as `hello-world` or `coremark` and `dhrystone` in the `benchmark` directory.
|
||||
Creating the executables in the easiest way possible is done by calling `make`in the corresponding directory.
|
||||
|
||||
Using `make clean && bear -- make ` will cause a correct compile_commands.json to be emitted. This allows using completion tools like clangd.
|
||||
## Prerequisite
|
||||
This repository requires `riscv64-unknown-elf-gcc` to be located in `$PATH`.
|
||||
|
||||
## How to Use
|
||||
When compiling executables, the target platform needs to be specified using the 'BOARD' variable. When compiling for the TGC5C for example, use `make BOARD=tgc_vp`, when compiling for RTL `make BOARD=rtl`. The default value for the Board variable is 'iss'.
|
||||
The arch can be set with the 'ISA' variable, the default value is 'imc'.
|
||||
|
||||
When compiling for the TGC5A VP for example, the call to create the correct binary is the following:
|
||||
```
|
||||
make BOARD=tgc_vp ISA=e
|
||||
```
|
||||
## Useful information
|
||||
Using `bear -- <build-command>` will cause a compile_commands.json to be emitted. This allows using completion tools like clangd.
|
||||
|
||||
## Current Limitations
|
||||
Currently, this repository only supports creation of 32-bit executables (Even when setting the `RISCV_ARCH` and `RISCV_ABI` manually).
|
||||
|
||||
Compiling for the 'e' extension / ISA together with any other extension (`ISA=emc` for example), requires setting the `RISCV_ABI=ilp32e` explicitly.
|
||||
|
||||
When switching ABI ensure that object files in the corresponding 'env' dir in the 'bare-metal-bsp' submodule are removed, so they get created with the appropriate flags (namely the 'init.o' file).
|
||||
|
|
Loading…
Reference in New Issue