Documentation
Printf

Printf

The firmware supports the PRINTF macro debugging feature, which is defined it in the Makefile.

DEFINES += HAVE_SPRINTF HAVE_PRINTF PRINTF=screen_printf

You can use PRINTF with the Speculos emulator.

Usually, PRINTF is defined as void, with this line DEFINES += PRINTF\(...\)=.
Check if PRINTF is already defined somewhere in your Makefile, and if so, comment out this definition so it doesn't override.

⚠️

The PRINTF macro is a debugging feature, it must not be used in production.
When compiling an application for release, please check that PRINTF is disabled in the Makefile:
insert the line DEFINES += PRINTF(...)= and comment out the other one.

Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Nano S, Ledger Vault, Bolos are registered trademarks of Ledger SAS