This is the code for the Karlsen embedded app.
The app-builder docker image from this repository contains all needed tools and library to build and load an application. You can download it from the ghcr.io docker repository:
docker pull ghcr.io/karlsen-network/ledger-app-builder/ledger-app-builder-legacy:latest
You can then enter this development environment by executing the following command from the directory of the application git
repository:
cd app-karlsen
docker run --rm -ti -v "$(realpath .):/app" --user root ghcr.io/karlsen-network/ledger-app-builder/ledger-app-builder-legacy:latest
The application's code will be available from inside the docker container, you can proceed to the following compilation steps to build your app.
make DEBUG=1 # compile optionally with PRINTF
make load # load the app on the Nano using ledgerblue
High level documentation such as APDU, commands and transaction serialization are included in developer documentation which can be generated with doxygen
doxygen .doxygen/Doxyfile
the process outputs HTML and LaTeX documentations in doc/html
and doc/latex
folders.
The flow processed in GitHub Actions is the following:
- Code formatting with clang-format
- Compilation of the application for Ledger Nano S in ledger-app-builder
- Unit tests of C functions with cmocka (see unit-tests/)
- End-to-end tests with Speculos emulator (see tests/)
- Code coverage with gcov/lcov and upload to codecov.io
- Documentation generation with doxygen
It outputs 3 artifacts:
speculos-log
within APDU command/response when executing end-to-end testscode-coverage
within HTML details of code coveragedocumentation
within HTML auto-generated documentation