Skip to content

Commit 47b71d0

Browse files
authored
Merge pull request #284 from LedgerHQ/y333/c_sdk_printf
Weak function management
2 parents 52b20ab + 22b2d1c commit 47b71d0

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ledger_device_sdk/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_device_sdk"
3-
version = "1.24.3"
3+
version = "1.24.4"
44
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
55
edition = "2021"
66
license.workspace = true
@@ -21,7 +21,7 @@ rand_core = { version = "0.6.3", default-features = false }
2121
zeroize = { version = "1.6.0", default-features = false }
2222
numtoa = "0.2.4"
2323
const-zero = "0.1.1"
24-
ledger_secure_sdk_sys = { path = "../ledger_secure_sdk_sys", version = "1.11.0" }
24+
ledger_secure_sdk_sys = { path = "../ledger_secure_sdk_sys", version = "1.11.1" }
2525

2626
[features]
2727
debug = []

ledger_secure_sdk_sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_secure_sdk_sys"
3-
version = "1.11.0"
3+
version = "1.11.1"
44
authors = ["yhql", "agrojean-ledger", "yogh333"]
55
edition = "2021"
66
license.workspace = true

ledger_secure_sdk_sys/build.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const SDK_C_FILES: [&str; 13] = [
1515
"src/os.c",
1616
"src/svc_call.s",
1717
"src/svc_cx_call.s",
18-
"src/syscalls.c",
1918
"src/os_printf.c",
2019
"protocol/src/ledger_protocol.c",
2120
"io/src/os_io.c",
2221
"io/src/os_io_default_apdu.c",
2322
"io/src/os_io_seph_cmd.c",
2423
"io/src/os_io_seph_ux.c",
24+
"src/syscalls.c",
2525
];
2626

2727
#[derive(Debug, Default, PartialEq)]
@@ -504,7 +504,7 @@ impl SDKBuilder<'_> {
504504
.join(format!("target/{}/include", self.device.name)),
505505
);
506506

507-
// Configure BLE and NBGL
507+
// Configure BLE, NBGL, U2F
508508
for s in self.device.defines.iter() {
509509
if s.0 == "HAVE_IO_USB" {
510510
configure_lib_usb(&mut command, &self.device.c_sdk);
@@ -521,6 +521,9 @@ impl SDKBuilder<'_> {
521521
.include(&glyphs_path)
522522
.file(glyphs_path.join("glyphs.c"));
523523
}
524+
if s.0 == "HAVE_IO_U2F" {
525+
configure_lib_u2f(&mut command, &self.device.c_sdk);
526+
}
524527
}
525528

526529
// Add the defines found in the Makefile.conf.cx to our build command.
@@ -726,6 +729,11 @@ fn main() {
726729
// Helper functions
727730
// --------------------------------------------------
728731

732+
fn configure_lib_u2f(command: &mut cc::Build, c_sdk: &Path) {
733+
command.file(c_sdk.join("lib_u2f/src/u2f_transport.c"));
734+
command.include(c_sdk.join("lib_u2f/include"));
735+
}
736+
729737
fn configure_lib_usb(command: &mut cc::Build, c_sdk: &Path) {
730738
command
731739
.file(c_sdk.join("lib_stusb/src/usbd_conf.c"))

0 commit comments

Comments
 (0)