Skip to content

Commit e908c59

Browse files
Merge pull request #778 from LedgerHQ/abo_update_api_level_21_2409
Update API_LEVEL_21
2 parents d88d4db + cbf19c3 commit e908c59

39 files changed

+901
-534
lines changed

.github/workflows/unit_tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
cd ../lib_nbgl/
2828
cmake -Bbuild -H. && make -C build && CTEST_OUTPUT_ON_FAILURE=1 make -C build test
2929
STAX=1 cmake -Bbuild -H. && make -C build && CTEST_OUTPUT_ON_FAILURE=1 make -C build test
30+
cd ../lib_ux_sync/
31+
cmake -Bbuild -H. && make -C build && make -C build test
3032
3133
- name: Generate code coverage
3234
run: |
@@ -42,6 +44,12 @@ jobs:
4244
lcov --directory . -b "$(realpath build/)" --add-tracefile coverage.base --add-tracefile coverage.capture -o coverage.info && \
4345
lcov --directory . -b "$(realpath build/)" --remove coverage.info '*/unit-tests/*' -o coverage.info && \
4446
genhtml coverage.info -o coverage
47+
cd ../lib_ux_sync/
48+
lcov --directory . -b "$(realpath build/)" --capture --initial -o coverage.base && \
49+
lcov --rc lcov_branch_coverage=1 --directory . -b "$(realpath build/)" --capture -o coverage.capture && \
50+
lcov --directory . -b "$(realpath build/)" --add-tracefile coverage.base --add-tracefile coverage.capture -o coverage.info && \
51+
lcov --directory . -b "$(realpath build/)" --remove coverage.info '*/unit-tests/*' -o coverage.info && \
52+
genhtml coverage.info -o coverage
4553
4654
4755
- uses: actions/upload-artifact@v3
@@ -53,7 +61,7 @@ jobs:
5361
uses: codecov/codecov-action@v3
5462
with:
5563
token: ${{ secrets.CODECOV_TOKEN }}
56-
files: ./unit-tests/lib_standard_app/coverage.info,./unit-tests/lib_nbgl/coverage.info
64+
files: ./unit-tests/lib_standard_app/coverage.info,./unit-tests/lib_nbgl/coverage.info,./unit-tests/lib_ux_sync/coverage.info
5765
flags: unittests
5866
name: codecov-app-boilerplate
5967
fail_ci_if_error: true

Makefile.standard_app

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,15 @@ ifeq ($(HAVE_APPLICATION_FLAG_LIBRARY), 1)
198198
# APPLICATION_FLAG_LIBRARY 0x800
199199
STANDARD_APP_FLAGS := $(shell echo $$(($(STANDARD_APP_FLAGS) + 0x800)))
200200
endif
201+
ifeq ($(HAVE_APPLICATION_FLAG_NOT_REVIEWED), 1)
202+
# APPLICATION_FLAG_LIBRARY 0x2000
203+
STANDARD_APP_FLAGS := $(shell echo $$(($(STANDARD_APP_FLAGS) + 0x20000)))
204+
endif
205+
201206

207+
# deprecated
202208
# Pending review flag
209+
# use HAVE_APPLICATION_FLAG_NOT_REVIEWED flag instead
203210
ifeq ($(ENABLE_PENDING_REVIEW_SCREEN), 1)
204211
TLVRAW_APP_LOAD_PARAMS += 9F:01
205212
DEFINES += HAVE_PENDING_REVIEW_SCREEN

include/appflags.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
*/
8181
#define APPLICATION_FLAG_BACKGROUND_IMG 0x10000
8282

83+
/**
84+
* Application was not yet audited by ledger
85+
*/
86+
#define APPLICATION_FLAG_NOT_REVIEWED 0x20000
87+
8388
/**
8489
* Custom AEM flag to test AEM capabilities without standard UX permissions
8590
*/
@@ -89,15 +94,9 @@
8994
#define APPLICATION_FLAG_AEM_PIN APPLICATION_FLAG_BOLOS_UX
9095
#endif // BOLOS_DEBUG_UX_PERMISSION_FLAG
9196

92-
#ifdef HAVE_BACKGROUND_IMG
9397
#define APPLICATION_FLAGS_MASK (0x00000000FFFFFFFFULL)
9498
#define APPLICATION_FLAG_NEG_MASK (0xFFFFFFFF00000000ULL)
9599
#define APPLICATION_FLAGS_SHIFT (32)
96-
#else
97-
#define APPLICATION_FLAGS_MASK (0x0000FFFF)
98-
#define APPLICATION_FLAG_NEG_MASK (0xFFFF0000)
99-
#define APPLICATION_FLAGS_SHIFT (16)
100-
#endif // HAVE_BACKGROUND_IMG
101100

102101
#define GET_COMPLEMENTED_APPLICATION_FLAGS(flags) \
103102
(((~((flags) &APPLICATION_FLAGS_MASK) << APPLICATION_FLAGS_SHIFT)) \

include/cx_stubs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
// auto-generated by cxsdk.py
3+
// auto-generated by shared_export.py
44
#define _NR_cx_aes_dec_block 0x00
55
#define _NR_cx_aes_enc_block 0x01
66
#define _NR_cx_aes_gcm_check_tag 0x02

include/cx_trampoline.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

include/os_app.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,8 @@ typedef struct application_s {
3838
// into Thumb code
3939
appmain_t main;
4040

41-
#ifdef HAVE_BACKGROUND_IMG
4241
// special flags for this application
4342
uint64_t flags;
44-
#else
45-
// special flags for this application
46-
uint32_t flags;
47-
#endif
4843

4944
// Memory organization: [ code (RX) |alignpage| data (RW) |alignpage| install params (R) ]
5045

include/seproxyhal_protocol.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_SCREEN_BIG 0x00000100UL
4747
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_SCREEN_SML 0x00000200UL
4848
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_SCREEN_SSD1312 0x00000300UL
49-
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_LEDRGB 0x00001000UL
49+
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_HW_VERSION_MASK 0x0000F000UL
50+
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_HW_VERSION_POS 12
5051
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_BATTERY 0x00000008UL
5152
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_ISET_MASK 0xF0000000UL
5253
#define SEPROXYHAL_TAG_SESSION_START_EVENT_FEATURE_ISET_BASIC 0x00000000UL

include/shared_trampoline.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
3+
#include "bolos_target.h"
4+
5+
#if defined(TARGET_NANOS)
6+
#define SHARED_TRAMPOLINE_ADDR 0x00120001
7+
#elif defined(TARGET_NANOX)
8+
#define SHARED_TRAMPOLINE_ADDR 0x00210001
9+
#elif defined(TARGET_NANOS2)
10+
#define SHARED_TRAMPOLINE_ADDR 0x00810001
11+
#elif defined(TARGET_STAX)
12+
#define SHARED_TRAMPOLINE_ADDR 0x00818001
13+
#elif defined(TARGET_FLEX)
14+
#define SHARED_TRAMPOLINE_ADDR 0x00818001
15+
#endif

include/syscalls.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@
310310
#define SYSCALL_nbgl_wait_pipeline_ID 0x00fa0011
311311
#endif
312312

313-
#ifdef HAVE_DISPLAY_FAST_MODE
313+
#ifdef HAVE_STAX_DISPLAY_FAST_MODE
314314
#define SYSCALL_nbgl_screen_update_temperature_ID 0x01fa0011
315-
#endif // HAVE_DISPLAY_FAST_MODE
315+
#endif // HAVE_STAX_DISPLAY_FAST_MODE
316316

317-
#ifdef HAVE_CONFIGURABLE_DISPLAY_FAST_MODE
317+
#ifdef HAVE_STAX_CONFIG_DISPLAY_FAST_MODE
318318
#define SYSCALL_nbgl_screen_config_fast_mode_ID 0x00fa0012
319-
#endif // HAVE_CONFIGURABLE_DISPLAY_FAST_MODE
319+
#endif // HAVE_STAX_CONFIG_DISPLAY_FAST_MODE
320320
#endif // HAVE_NBGL
321321

322322
#ifdef HAVE_BACKGROUND_IMG

lib_cxng/cx.export

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file contains the functions exported by cxlib. It is used by cxsdk.py to
1+
# This file contains the functions exported by cxlib. It is used by shared_export.py to
22
# generate asm stubs for the SDK and the CX functions table in cxlib.
33
#
44
# Making changes to this file (ie. removal, addition, ordering) require apps to

0 commit comments

Comments
 (0)