Skip to content

Commit af9f8dd

Browse files
committed
Use same defines as C SDK build
1 parent df0282f commit af9f8dd

File tree

5 files changed

+52
-131
lines changed

5 files changed

+52
-131
lines changed

ledger_secure_sdk_sys/build.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,6 @@ impl SDKBuilder<'_> {
488488
.join("lib_nbgl/include/nbgl_use_case.h")
489489
.to_str()
490490
.unwrap(),
491-
)
492-
.header(
493-
self.device
494-
.c_sdk
495-
.join("lib_ux_nbgl/ux_nbgl.h")
496-
.to_str()
497-
.unwrap(),
498491
);
499492
}
500493

ledger_secure_sdk_sys/csdk_flex.h

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
1-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2-
// Makefile.standard_app
3-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4-
// BLUETOOTH
5-
#define HAVE_BLE
6-
#define HAVE_BLE_APDU
1+
#define HAVE_BLE
72
#define BLE_COMMAND_TIMEOUT_MS 2000
8-
#define BLE_SEGMENT_SIZE 32
9-
// NFC SUPPORT (feature dependent)
10-
//#define HAVE_NFC
11-
//#define HAVE_NFC_READER
12-
// APP STORAGE (feature dependent)
13-
//#define HAVE_APP_STORAGE
14-
// IO SEPROXY BUFFER SIZE
15-
#define OS_IO_SEPH_BUFFER_SIZE 272
16-
// NBGL QRCODE (feature dependent)
3+
#define HAVE_BLE_APDU
4+
#define HAVE_SWAP
175
#define NBGL_QRCODE
18-
// NBGL KEYBOARD (feature dependent)
19-
//#define NBGL_KEYBOARD
20-
// NBGL KEYPAD (feature dependent)
21-
//#define NBGL_KEYPAD
22-
// STANDARD DEFINES
6+
#define USE_OS_IO_STACK
237
#define IO_HID_EP_LENGTH 64
248
#define HAVE_SPRINTF
259
#define HAVE_SNPRINTF_FORMAT_U
@@ -29,15 +13,15 @@
2913
#define HAVE_USB_APDU
3014
#define USB_SEGMENT_SIZE 64
3115
#define HAVE_WEBUSB
32-
//#define WEBUSB_URL_SIZE_B
33-
//#define WEBUSB_URL
16+
#define WEBUSB_URL_SIZE_B 0
17+
#define WEBUSB_URL
3418
#define HAVE_IO_U2F
35-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
36-
// Makefile.defines
37-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19+
#define OS_IO_SEPROXYHAL
20+
#define STANDARD_APP_SYNC_RAPDU
21+
#define REVAMPED_IO
3822
#define gcc
3923
#define __IO volatile
40-
// Flex
24+
#define NDEBUG
4125
#define HAVE_BAGL_FONT_INTER_REGULAR_28PX
4226
#define HAVE_BAGL_FONT_INTER_SEMIBOLD_28PX
4327
#define HAVE_BAGL_FONT_INTER_MEDIUM_36PX
@@ -46,19 +30,13 @@
4630
#define HAVE_PIEZO_SOUND
4731
#define HAVE_SE_TOUCH
4832
#define HAVE_SE_EINK_DISPLAY
49-
//#define HAVE_HW_TOUCH_SWIPE
5033
#define NBGL_PAGE
5134
#define NBGL_USE_CASE
5235
#define SCREEN_SIZE_WALLET
5336
#define HAVE_FAST_HOLD_TO_APPROVE
54-
37+
#define OS_IO_SEPH_BUFFER_SIZE 272
5538
#define HAVE_LEDGER_PKI
5639

57-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
58-
// Misc
59-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
60-
//#define HAVE_LOCAL_APDU_BUFFER
61-
6240
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6341
// DEBUG C SDK
6442
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

ledger_secure_sdk_sys/csdk_nanos2.h

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2-
// Makefile.standard_app
3-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4-
// APP STORAGE (feature dependent)
5-
//#define HAVE_APP_STORAGE
6-
// IO SEPROXY BUFFER SIZE
7-
#define OS_IO_SEPH_BUFFER_SIZE 272
8-
// NBGL KEYBOARD (feature dependent)
9-
//#define NBGL_KEYBOARD
10-
// NBGL KEYPAD (feature dependent)
11-
//#define NBGL_KEYPAD
12-
// STANDARD DEFINES
1+
#define HAVE_SWAP
2+
#define USE_OS_IO_STACK
133
#define IO_HID_EP_LENGTH 64
144
#define HAVE_SPRINTF
155
#define HAVE_SNPRINTF_FORMAT_U
@@ -19,37 +9,33 @@
199
#define HAVE_USB_APDU
2010
#define USB_SEGMENT_SIZE 64
2111
#define HAVE_WEBUSB
22-
//#define WEBUSB_URL_SIZE_B
23-
//#define WEBUSB_URL
24-
#define HAVE_IO_U2F
25-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
26-
// Makefile.defines
27-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
12+
#define WEBUSB_URL_SIZE_B 0
13+
#define WEBUSB_URL
14+
#define OS_IO_SEPROXYHAL
15+
#define STANDARD_APP_SYNC_RAPDU
16+
#define API_LEVEL 24
17+
#define REVAMPED_IO
2818
#define gcc
2919
#define __IO volatile
30-
20+
#define NDEBUG
3121
#define BAGL_HEIGHT 64
3222
#define BAGL_WIDTH 128
3323
#define HAVE_BAGL_ELLIPSIS
3424
#define HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX
3525
#define HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX
3626
#define HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX
3727
#define SCREEN_SIZE_NANO
38-
#define HAVE_UX_FLOW
39-
40-
#define HAVE_SE_BUTTON
28+
#define HAVE_NBGL
29+
#define NBGL_STEP
30+
#define NBGL_USE_CASE
31+
#define OS_IO_SEPH_BUFFER_SIZE 272
4132
#define HAVE_SE_SCREEN
33+
#define HAVE_SE_BUTTON
4234
#define HAVE_FONTS
4335
#define HAVE_INAPP_BLE_PAIRING
4436
#define HAVE_BATTERY
45-
4637
#define HAVE_LEDGER_PKI
4738

48-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
49-
// Misc
50-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
51-
//#define HAVE_LOCAL_APDU_BUFFER
52-
5339
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5440
// DEBUG C SDK
5541
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

ledger_secure_sdk_sys/csdk_nanox.h

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2-
// Makefile.standard_app
3-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4-
// BLUETOOTH
51
#define HAVE_BLE
6-
#define HAVE_BLE_APDU
72
#define BLE_COMMAND_TIMEOUT_MS 2000
8-
#define BLE_SEGMENT_SIZE 32
9-
// APP STORAGE (feature dependent)
10-
//#define HAVE_APP_STORAGE
11-
// IO SEPROXY BUFFER SIZE
12-
#define OS_IO_SEPH_BUFFER_SIZE 272
13-
// NBGL KEYBOARD (feature dependent)
14-
//#define NBGL_KEYBOARD
15-
// NBGL KEYPAD (feature dependent)
16-
//#define NBGL_KEYPAD
17-
// STANDARD DEFINES
3+
#define HAVE_BLE_APDU
4+
#define HAVE_SWAP
5+
#define USE_OS_IO_STACK
186
#define IO_HID_EP_LENGTH 64
197
#define HAVE_SPRINTF
208
#define HAVE_SNPRINTF_FORMAT_U
@@ -24,39 +12,33 @@
2412
#define HAVE_USB_APDU
2513
#define USB_SEGMENT_SIZE 64
2614
#define HAVE_WEBUSB
27-
//#define WEBUSB_URL_SIZE_B
28-
//#define WEBUSB_URL
15+
#define WEBUSB_URL_SIZE_B 0
16+
#define WEBUSB_URL
2917
#define HAVE_IO_U2F
30-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
31-
// Makefile.defines
32-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
18+
#define OS_IO_SEPROXYHAL
19+
#define STANDARD_APP_SYNC_RAPDU
20+
#define REVAMPED_IO
3321
#define gcc
3422
#define __IO volatile
35-
23+
#define NDEBUG
3624
#define BAGL_HEIGHT 64
3725
#define BAGL_WIDTH 128
3826
#define HAVE_BAGL_ELLIPSIS
3927
#define HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX
4028
#define HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX
4129
#define HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX
4230
#define SCREEN_SIZE_NANO
43-
#define HAVE_UX_FLOW
44-
45-
#define HAVE_SE_BUTTON
31+
#define HAVE_NBGL
32+
#define NBGL_STEP
33+
#define NBGL_USE_CASE
34+
#define OS_IO_SEPH_BUFFER_SIZE 272
4635
#define HAVE_SE_SCREEN
36+
#define HAVE_SE_BUTTON
4737
#define HAVE_FONTS
4838
#define HAVE_INAPP_BLE_PAIRING
4939
#define HAVE_BATTERY
50-
5140
#define HAVE_LEDGER_PKI
5241

53-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
54-
// Misc
55-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
56-
//#define HAVE_LOCAL_APDU_BUFFER
57-
#define HAVE_SEPROXYHAL_MCU
58-
#define HAVE_MCU_PROTECT
59-
6042
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6143
// DEBUG C SDK
6244
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

ledger_secure_sdk_sys/csdk_stax.h

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2-
// Makefile.standard_app
3-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4-
// BLUETOOTH
51
#define HAVE_BLE
6-
#define HAVE_BLE_APDU
72
#define BLE_COMMAND_TIMEOUT_MS 2000
8-
#define BLE_SEGMENT_SIZE 32
9-
// NFC SUPPORT (feature dependent)
10-
//#define HAVE_NFC
11-
//#define HAVE_NFC_READER
12-
// APP STORAGE (feature dependent)
13-
//#define HAVE_APP_STORAGE
14-
// IO SEPROXY BUFFER SIZE
15-
#define OS_IO_SEPH_BUFFER_SIZE 272
16-
// NBGL QRCODE (feature dependent)
3+
#define HAVE_BLE_APDU
4+
#define HAVE_SWAP
175
#define NBGL_QRCODE
18-
// NBGL KEYBOARD (feature dependent)
19-
//#define NBGL_KEYBOARD
20-
// NBGL KEYPAD (feature dependent)
21-
//#define NBGL_KEYPAD
22-
// STANDARD DEFINES
6+
#define USE_OS_IO_STACK
7+
#define MAJOR_VERSION 2
8+
#define MINOR_VERSION 2
9+
#define PATCH_VERSION 2
2310
#define IO_HID_EP_LENGTH 64
2411
#define HAVE_SPRINTF
2512
#define HAVE_SNPRINTF_FORMAT_U
@@ -29,15 +16,15 @@
2916
#define HAVE_USB_APDU
3017
#define USB_SEGMENT_SIZE 64
3118
#define HAVE_WEBUSB
32-
//#define WEBUSB_URL_SIZE_B
33-
//#define WEBUSB_URL
19+
#define WEBUSB_URL_SIZE_B 0
20+
#define WEBUSB_URL
3421
#define HAVE_IO_U2F
35-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
36-
// Makefile.defines
37-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
22+
#define OS_IO_SEPROXYHAL
23+
#define STANDARD_APP_SYNC_RAPDU
24+
#define REVAMPED_IO
3825
#define gcc
3926
#define __IO volatile
40-
// Stax
27+
#define NDEBUG
4128
#define HAVE_BAGL_FONT_INTER_REGULAR_24PX
4229
#define HAVE_BAGL_FONT_INTER_SEMIBOLD_24PX
4330
#define HAVE_BAGL_FONT_INTER_MEDIUM_32PX
@@ -49,14 +36,9 @@
4936
#define NBGL_PAGE
5037
#define NBGL_USE_CASE
5138
#define SCREEN_SIZE_WALLET
52-
39+
#define OS_IO_SEPH_BUFFER_SIZE 272
5340
#define HAVE_LEDGER_PKI
5441

55-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
56-
// Misc
57-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
58-
//#define HAVE_LOCAL_APDU_BUFFER
59-
6042
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6143
// DEBUG C SDK
6244
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)