FIO Ledger App for Ledger Nano S
make load
Builds and loads the application into connected device. Just make sure to close the Ledger app on the device before running the command.
In Makefile
, uncomment
#DEVEL = 1
#DEFINES += HEADLESS
also comment out
DEFINES += RESET_ON_CRASH
and then run make clean load
.
Make sure you have:
- SDK >= 2.0.0
- MCU >= 1.11
Environment setup and developer documentation is sufficiently provided in Ledger’s Read the Docs.
You want a debug version of the MCU firmware (but it blocks SDK firmware updates, so for the purpose of upgrading SDK, replace it temporarily with a non-debug one). Instructions for swapping MCU versions: https://github.com/LedgerHQ/ledger-dev-doc/blob/master/source/userspace/debugging.rst
The quickstart guide's script sets up your udev rules, but there still might be problems.
To learn more about development process and individual commands, check the desing doc.
The build process is managed with Make.
load
: Load signed app onto the Ledger deviceclean
: Clean the build and output directoriesdelete
: Remove the application from the devicebuild
: Build obj and bin api artefacts without loadingformat
: Format source code.
See Makefile
for list of included functions.
Ordinarily, Ledger computes a rolling hash of the serialized transaction body, but the body itself is not available. It is possible to acquire it from the development build by going through the following steps:
-
Install debug MCU on your Ledger Nano S device.
-
Install the debug version of FIO app (see above).
-
Install
usbtool
and turn on console printing. -
Send a single
signTx
call to Ledger (e.g. by runningyarn test-integration --grep "<some-signTx-test>"
). -
After the call is processed, the terminal running console printing now contains all log messages resulting from that
signTx
call. (See theTRACE*
macros.). You can build the transactions using data between logged within sha_256_append function.