2
.github/workflows/ci-workflow.yml
vendored
@@ -171,7 +171,6 @@ jobs:
|
||||
with:
|
||||
upload_app_binaries_artifact: "ragger_elfs"
|
||||
flags: "DEBUG=1 CAL_CI_KEY=1 DOMAIN_NAME_TEST_KEY=1"
|
||||
run_for_devices: '["nanos", "nanox", "nanosp"]'
|
||||
|
||||
jobs-ragger-tests:
|
||||
name: Run Ragger tests
|
||||
@@ -180,4 +179,3 @@ jobs:
|
||||
with:
|
||||
download_app_binaries_artifact: "ragger_elfs"
|
||||
test_dir: tests/ragger
|
||||
run_for_devices: '["nanos", "nanox", "nanosp"]'
|
||||
|
||||
1
.gitignore
vendored
@@ -5,6 +5,7 @@ bin/
|
||||
debug/
|
||||
dep/
|
||||
obj/
|
||||
build/
|
||||
|
||||
# Python
|
||||
*.pyc
|
||||
|
||||
43
Makefile
@@ -54,6 +54,7 @@ include ./makefile_conf/chain/$(CHAIN).mk
|
||||
else
|
||||
$(error Unsupported CHAIN - use $(SUPPORTED_CHAINS))
|
||||
endif
|
||||
CFLAGS += -DAPPNAME=\"$(APPNAME)\"
|
||||
|
||||
#########
|
||||
# Other #
|
||||
@@ -65,6 +66,12 @@ DEFINES += $(DEFINES_LIB)
|
||||
#prepare hsm generation
|
||||
ifeq ($(TARGET_NAME),TARGET_NANOS)
|
||||
ICONNAME=icons/nanos_app_$(CHAIN).gif
|
||||
else ifeq ($(TARGET_NAME),TARGET_STAX)
|
||||
ICONNAME=icons/stax_app_$(CHAIN).gif
|
||||
DEFINES += ICONGLYPH=C_stax_$(CHAIN)_64px
|
||||
DEFINES += ICONBITMAP=C_stax_$(CHAIN)_64px_bitmap
|
||||
DEFINES += ICONGLYPH_SMALL=C_stax_$(CHAIN)
|
||||
GLYPH_FILES += $(ICONNAME)
|
||||
else
|
||||
ICONNAME=icons/nanox_app_$(CHAIN).gif
|
||||
endif
|
||||
@@ -79,9 +86,10 @@ all: default
|
||||
############
|
||||
|
||||
DEFINES += OS_IO_SEPROXYHAL
|
||||
DEFINES += HAVE_BAGL HAVE_SPRINTF HAVE_SNPRINTF_FORMAT_U
|
||||
DEFINES += HAVE_SPRINTF HAVE_SNPRINTF_FORMAT_U
|
||||
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=4 IO_HID_EP_LENGTH=64 HAVE_USB_APDU
|
||||
DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M) LEDGER_MINOR_VERSION=$(APPVERSION_N) LEDGER_PATCH_VERSION=$(APPVERSION_P)
|
||||
DEFINES += BUILD_YEAR=\"$(shell date +%Y)\"
|
||||
|
||||
# U2F
|
||||
DEFINES += HAVE_U2F HAVE_IO_U2F
|
||||
@@ -90,30 +98,41 @@ DEFINES += USB_SEGMENT_SIZE=64
|
||||
DEFINES += BLE_SEGMENT_SIZE=32 #max MTU, min 20
|
||||
DEFINES += UNUSED\(x\)=\(void\)x
|
||||
DEFINES += APPVERSION=\"$(APPVERSION)\"
|
||||
DEFINES += HAVE_UX_FLOW
|
||||
|
||||
#WEBUSB_URL = www.ledgerwallet.com
|
||||
#DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=$(shell echo -n $(WEBUSB_URL) | wc -c) WEBUSB_URL=$(shell echo -n $(WEBUSB_URL) | sed -e "s/./\\\'\0\\\',/g")
|
||||
|
||||
DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=0 WEBUSB_URL=""
|
||||
|
||||
ifeq ($(TARGET_NAME),TARGET_NANOX)
|
||||
ifneq (,$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX))
|
||||
DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000
|
||||
DEFINES += HAVE_BLE_APDU # basic ledger apdu transport over BLE
|
||||
SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_NAME),TARGET_NANOS)
|
||||
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=72
|
||||
DEFINES += HAVE_WALLET_ID_SDK
|
||||
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128
|
||||
else
|
||||
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_NAME),TARGET_STAX)
|
||||
DEFINES += NBGL_QRCODE
|
||||
else
|
||||
DEFINES += HAVE_BAGL
|
||||
DEFINES += HAVE_UX_FLOW
|
||||
ifeq ($(TARGET_NAME),TARGET_NANOS)
|
||||
DEFINES += HAVE_WALLET_ID_SDK
|
||||
DEFINES += BAGL_WIDTH=128 BAGL_HEIGHT=32
|
||||
else
|
||||
DEFINES += HAVE_GLO096
|
||||
DEFINES += HAVE_BAGL BAGL_WIDTH=128 BAGL_HEIGHT=64
|
||||
DEFINES += BAGL_WIDTH=128 BAGL_HEIGHT=64
|
||||
DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature
|
||||
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX
|
||||
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX
|
||||
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX
|
||||
endif
|
||||
endif
|
||||
|
||||
# Enables direct data signing without having to specify it in the settings. Useful when testing with speculos.
|
||||
ALLOW_DATA:=0
|
||||
@@ -167,7 +186,6 @@ endif
|
||||
endif
|
||||
|
||||
# Enabling debug PRINTF
|
||||
DEBUG:=0
|
||||
ifneq ($(DEBUG),0)
|
||||
DEFINES += HAVE_STACK_OVERFLOW_CHECK
|
||||
ifeq ($(TARGET_NAME),TARGET_NANOS)
|
||||
@@ -204,13 +222,11 @@ endif
|
||||
|
||||
CC := $(CLANGPATH)clang
|
||||
|
||||
#CFLAGS += -O0
|
||||
CFLAGS += -Oz -Wno-format-invalid-specifier -Wno-format-extra-args
|
||||
CFLAGS += -Wno-format-invalid-specifier -Wno-format-extra-args
|
||||
|
||||
AS := $(GCCPATH)arm-none-eabi-gcc
|
||||
|
||||
LD := $(GCCPATH)arm-none-eabi-gcc
|
||||
LDFLAGS += -O3 -Os
|
||||
LDLIBS += -lm -lgcc -lc
|
||||
|
||||
# import rules to compile glyphs(/pone)
|
||||
@@ -219,11 +235,12 @@ include $(BOLOS_SDK)/Makefile.glyphs
|
||||
### variables processed by the common makefile.rules of the SDK to grab source files and include dirs
|
||||
APP_SOURCE_PATH += src_common src src_features src_plugins
|
||||
SDK_SOURCE_PATH += lib_stusb lib_stusb_impl lib_u2f
|
||||
ifeq ($(TARGET_NAME),TARGET_STAX)
|
||||
APP_SOURCE_PATH += src_nbgl
|
||||
else
|
||||
SDK_SOURCE_PATH += lib_ux
|
||||
ifeq ($(TARGET_NAME),TARGET_NANOX)
|
||||
SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
|
||||
endif
|
||||
APP_SOURCE_PATH += src_bagl
|
||||
endif
|
||||
|
||||
### initialize plugin SDK submodule if needed, rebuild it, and warn if a difference is noticed
|
||||
ifeq ($(CHAIN),ethereum)
|
||||
|
||||
BIN
glyphs/stax_akroma_64px.gif
Normal file
|
After Width: | Height: | Size: 886 B |
BIN
glyphs/stax_apothemnetwork_64px.gif
Normal file
|
After Width: | Height: | Size: 815 B |
BIN
glyphs/stax_artis_sigma1_64px.gif
Normal file
|
After Width: | Height: | Size: 997 B |
BIN
glyphs/stax_artis_tau1_64px.gif
Normal file
|
After Width: | Height: | Size: 985 B |
BIN
glyphs/stax_astar_64px.gif
Normal file
|
After Width: | Height: | Size: 1019 B |
BIN
glyphs/stax_atheios_64px.gif
Normal file
|
After Width: | Height: | Size: 584 B |
BIN
glyphs/stax_bsc_64px.gif
Normal file
|
After Width: | Height: | Size: 885 B |
BIN
glyphs/stax_bttc_64px.gif
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
glyphs/stax_callisto_64px.gif
Normal file
|
After Width: | Height: | Size: 773 B |
BIN
glyphs/stax_conflux_espace_64px.gif
Normal file
|
After Width: | Height: | Size: 641 B |
BIN
glyphs/stax_cube_64px.gif
Normal file
|
After Width: | Height: | Size: 966 B |
BIN
glyphs/stax_dexon_64px.gif
Normal file
|
After Width: | Height: | Size: 914 B |
BIN
glyphs/stax_ellaism_64px.gif
Normal file
|
After Width: | Height: | Size: 639 B |
BIN
glyphs/stax_energywebchain_64px.gif
Normal file
|
After Width: | Height: | Size: 836 B |
BIN
glyphs/stax_ether1_64px.gif
Normal file
|
After Width: | Height: | Size: 622 B |
BIN
glyphs/stax_ethereum_64px.gif
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
glyphs/stax_ethereum_classic_64px.gif
Normal file
|
After Width: | Height: | Size: 618 B |
BIN
glyphs/stax_ethergem_64px.gif
Normal file
|
After Width: | Height: | Size: 649 B |
BIN
glyphs/stax_ethersocial_64px.gif
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
glyphs/stax_expanse_64px.gif
Normal file
|
After Width: | Height: | Size: 384 B |
BIN
glyphs/stax_flare_64px.gif
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
glyphs/stax_flare_coston_64px.gif
Normal file
|
After Width: | Height: | Size: 210 B |
BIN
glyphs/stax_gochain_64px.gif
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
glyphs/stax_goerli_64px.gif
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
glyphs/stax_hpb_64px.gif
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
glyphs/stax_id4good_64px.gif
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
glyphs/stax_kardiachain_64px.gif
Normal file
|
After Width: | Height: | Size: 310 B |
BIN
glyphs/stax_kusd_64px.gif
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
glyphs/stax_meter_64px.gif
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
glyphs/stax_mix_64px.gif
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
glyphs/stax_moonbeam_64px.gif
Normal file
|
After Width: | Height: | Size: 212 B |
BIN
glyphs/stax_moonriver_64px.gif
Normal file
|
After Width: | Height: | Size: 294 B |
BIN
glyphs/stax_multivac_64px.gif
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
glyphs/stax_musicoin_64px.gif
Normal file
|
After Width: | Height: | Size: 300 B |
BIN
glyphs/stax_oasys_64px.gif
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
glyphs/stax_okc_64px.gif
Normal file
|
After Width: | Height: | Size: 247 B |
BIN
glyphs/stax_pirl_64px.gif
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
glyphs/stax_poa_64px.gif
Normal file
|
After Width: | Height: | Size: 299 B |
BIN
glyphs/stax_polygon_64px.gif
Normal file
|
After Width: | Height: | Size: 681 B |
BIN
glyphs/stax_reosc_64px.gif
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
glyphs/stax_ropsten_64px.gif
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
glyphs/stax_rsk_64px.gif
Normal file
|
After Width: | Height: | Size: 295 B |
BIN
glyphs/stax_rsk_testnet_64px.gif
Normal file
|
After Width: | Height: | Size: 295 B |
BIN
glyphs/stax_shiden_64px.gif
Normal file
|
After Width: | Height: | Size: 342 B |
BIN
glyphs/stax_shyft_64px.gif
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
glyphs/stax_songbird_64px.gif
Normal file
|
After Width: | Height: | Size: 251 B |
BIN
glyphs/stax_tecracoin_64px.gif
Normal file
|
After Width: | Height: | Size: 389 B |
BIN
glyphs/stax_tecratestnet_64px.gif
Normal file
|
After Width: | Height: | Size: 389 B |
BIN
glyphs/stax_thundercore_64px.gif
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
glyphs/stax_tobalaba_64px.gif
Normal file
|
After Width: | Height: | Size: 228 B |
BIN
glyphs/stax_tomochain_64px.gif
Normal file
|
After Width: | Height: | Size: 227 B |
BIN
glyphs/stax_ubiq_64px.gif
Normal file
|
After Width: | Height: | Size: 295 B |
BIN
glyphs/stax_volta_64px.gif
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
glyphs/stax_wanchain_64px.gif
Normal file
|
After Width: | Height: | Size: 313 B |
BIN
glyphs/stax_webchain_64px.gif
Normal file
|
After Width: | Height: | Size: 217 B |
BIN
glyphs/stax_wethio_64px.gif
Normal file
|
After Width: | Height: | Size: 305 B |
BIN
glyphs/stax_xdcnetwork_64px.gif
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
icons/stax_app_akroma.gif
Normal file
|
After Width: | Height: | Size: 467 B |
BIN
icons/stax_app_apothemnetwork.gif
Normal file
|
After Width: | Height: | Size: 410 B |
BIN
icons/stax_app_artis_sigma1.gif
Normal file
|
After Width: | Height: | Size: 476 B |
BIN
icons/stax_app_artis_tau1.gif
Normal file
|
After Width: | Height: | Size: 481 B |
BIN
icons/stax_app_astar.gif
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
icons/stax_app_atheios.gif
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
icons/stax_app_bsc.gif
Normal file
|
After Width: | Height: | Size: 473 B |
BIN
icons/stax_app_bttc.gif
Normal file
|
After Width: | Height: | Size: 471 B |
BIN
icons/stax_app_callisto.gif
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
icons/stax_app_conflux_espace.gif
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
icons/stax_app_cube.gif
Normal file
|
After Width: | Height: | Size: 438 B |
BIN
icons/stax_app_dexon.gif
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
icons/stax_app_ellaism.gif
Normal file
|
After Width: | Height: | Size: 381 B |
BIN
icons/stax_app_energywebchain.gif
Normal file
|
After Width: | Height: | Size: 446 B |
BIN
icons/stax_app_ether1.gif
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
icons/stax_app_ethereum.gif
Normal file
|
After Width: | Height: | Size: 309 B |
BIN
icons/stax_app_ethereum_classic.gif
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
icons/stax_app_ethergem.gif
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
icons/stax_app_ethersocial.gif
Normal file
|
After Width: | Height: | Size: 136 B |
BIN
icons/stax_app_expanse.gif
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
icons/stax_app_flare.gif
Normal file
|
After Width: | Height: | Size: 110 B |
BIN
icons/stax_app_flare_coston.gif
Normal file
|
After Width: | Height: | Size: 116 B |
BIN
icons/stax_app_gochain.gif
Normal file
|
After Width: | Height: | Size: 150 B |
BIN
icons/stax_app_goerli.gif
Normal file
|
After Width: | Height: | Size: 157 B |
BIN
icons/stax_app_hpb.gif
Normal file
|
After Width: | Height: | Size: 161 B |
BIN
icons/stax_app_id4good.gif
Normal file
|
After Width: | Height: | Size: 151 B |
BIN
icons/stax_app_kardiachain.gif
Normal file
|
After Width: | Height: | Size: 153 B |
BIN
icons/stax_app_kusd.gif
Normal file
|
After Width: | Height: | Size: 133 B |
BIN
icons/stax_app_meter.gif
Normal file
|
After Width: | Height: | Size: 148 B |
BIN
icons/stax_app_mix.gif
Normal file
|
After Width: | Height: | Size: 126 B |
BIN
icons/stax_app_moonbeam.gif
Normal file
|
After Width: | Height: | Size: 107 B |
BIN
icons/stax_app_moonriver.gif
Normal file
|
After Width: | Height: | Size: 142 B |
BIN
icons/stax_app_multivac.gif
Normal file
|
After Width: | Height: | Size: 161 B |
BIN
icons/stax_app_musicoin.gif
Normal file
|
After Width: | Height: | Size: 146 B |
BIN
icons/stax_app_oasys.gif
Normal file
|
After Width: | Height: | Size: 149 B |
BIN
icons/stax_app_okc.gif
Normal file
|
After Width: | Height: | Size: 131 B |
BIN
icons/stax_app_pirl.gif
Normal file
|
After Width: | Height: | Size: 145 B |
BIN
icons/stax_app_poa.gif
Normal file
|
After Width: | Height: | Size: 147 B |
BIN
icons/stax_app_polygon.gif
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
icons/stax_app_reosc.gif
Normal file
|
After Width: | Height: | Size: 148 B |