| commit | 0db1c37eb56338f5ca49e5aca374c1bb20ebade6 | [log] [tgz] |
|---|---|---|
| author | Alex Van Damme <atv@google.com> | Thu Aug 10 10:07:06 2023 -0700 |
| committer | Alex Van Damme <atv@google.com> | Mon Aug 14 15:45:22 2023 -0700 |
| tree | 238e3d4b87800f62104501e563a27e2d1e5e343e | |
| parent | a30fe74251e6c04c3df65c13dbccfadb3d8692b0 [diff] |
Modify kelvin _start to ebreak on non-zero exit code - If main returns something non-zero, call ebreak. - If main returns zero, still call mpause. - In either case, infinite loop afterwards. - This allows tests to fail by returning non-zero :) (ISA tests were able to fail before, because their failure macro explicitly called ebreak) Change-Id: I876dca468b75784703cdba1f7049188fce6e1eb0
This project contains the BSP to build the SW artifact that can run on the Kelvin core, and integrated as part of the Shodan repository.
The project supports two build systems -- Bazel and CMake -- for OSS integration reasons. Bazel is used by TFLM flow, while CMake is the build system for IREE.
If you get this project from Project Shodan manifest, you are all set. If not, you need to have following projects as well to build the project successfully.
<dir>/cache/toolchain_kelvinThis project needs to be at <dir>/sw/kelvin.
The project uses Bazel 5.1.1, to align with OpenTitan build system requirements.
bazel build //...
To run the unit tests (with the kelvin_sim ISS) Make sure the Environment variable $ROOTDIR is set to the root directory of the local repo (or run source build/setup.sh)
bazel test //...
TODO: Add CMake flow
The binaries can be simulated with the kelvin simulator, located at <dir>/sim/kelvin.
sim_kelvin <elf location>
Load the generated .bin binaries to the FPGA emulator/Renode simulator.