Workflow
Step 1: install pre-requisites
Step 2: clone repository
Either use
the GitHub CLI, e.g.,
gh repo clone https://github.com/danpage/fiat.git ./fiat
or
git itself, e.g.,
git clone https://github.com/danpage/fiat.git ./fiat
to clone the repository.
Execute
cd ./fiat source ./bin/conf.sh
to configure the environment. For example, you should find that the
FIAT_PATH_REPOenvironment variable is set appropriately.
Step 3: develop target implementation
Edit
${FIAT_PATH_REPO}/src/fiat/target/kernel/imp/kernel_imp.conf
to configure the target implementation (and support for it),
Edit
${FIAT_PATH_REPO}/src/fiat/target/kernel/imp/kernel_imp.h ${FIAT_PATH_REPO}/src/fiat/target/kernel/imp/kernel_imp.c
to complete the target implementation itself.
Step 4: build target implementation
Either decide on the build context then set the associated environment variable, e.g., by executing
export FIAT_CONTEXT="native"
or accept default of
native.Either decide on the driver type then set the associated environment variable, e.g., by executing
export FIAT_DRIVER="binary"
or accept default of
binary.Either decide on the board type then set the associated environment variable, e.g., by executing
export FIAT_BOARD="native"
or accept default of
native.Either
for a
nativebuild context, executemake target/clean make target/fetch-dep make target/patch-dep make target/build-dep make target/build
or
for a
dockerbuild context, executemake target/clean make target/build
Step 5: use target implementation
If the build process succeeds, it produces associated artefacts, e.g.,
${FIAT_PATH_REPO}/build/target/${FIAT_BOARD}/target.elf
in
${FIAT_PATH_REPO}/build/target/${FIAT_BOARD}. Using the appropriate programming infrastructure, you can program your board with one of them.