Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ledger_device_sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ledger_device_sdk"
version = "1.27.1"
version = "1.27.2"
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
edition = "2021"
license.workspace = true
Expand All @@ -20,7 +20,7 @@ rand_core = { version = "0.6.3", default-features = false }
zeroize = { version = "1.6.0", default-features = false }
numtoa = "0.2.4"
const-zero = "0.1.1"
ledger_secure_sdk_sys = { path = "../ledger_secure_sdk_sys", version = "1.11.3" }
ledger_secure_sdk_sys = { path = "../ledger_secure_sdk_sys", version = "1.11.4" }

[features]
debug = []
Expand All @@ -33,5 +33,5 @@ io_new = [] # switch to new 'io' module
default = [ "heap" ]

[lints.rust.unexpected_cfgs]
level = "warn"
level = "warn"
check-cfg = ['cfg(target_os, values("apex_p", "stax", "flex", "nanox", "nanosplus"))']
2 changes: 1 addition & 1 deletion ledger_secure_sdk_sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ledger_secure_sdk_sys"
version = "1.11.3"
version = "1.11.4"
authors = ["yhql", "agrojean-ledger", "yogh333"]
edition = "2021"
license.workspace = true
Expand Down
27 changes: 0 additions & 27 deletions ledger_secure_sdk_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ struct Device<'a> {
pub defines: Vec<(String, Option<String>)>,
pub cflags: Vec<String>,
pub glyphs_folders: Vec<PathBuf>,
pub arm_libs: String,
pub linker_script: String,
}

Expand Down Expand Up @@ -174,7 +173,6 @@ impl SDKBuilder<'_> {
.collect::<Vec<String>>()
},
glyphs_folders: Vec::new(),
arm_libs: Default::default(),
linker_script: format!(
"{}/devices/nanosplus/nanosplus_layout.ld",
env!("CARGO_MANIFEST_DIR")
Expand Down Expand Up @@ -222,7 +220,6 @@ impl SDKBuilder<'_> {
.collect::<Vec<String>>()
},
glyphs_folders: Vec::new(),
arm_libs: Default::default(),
linker_script: format!(
"{}/devices/nanox/nanox_layout.ld",
env!("CARGO_MANIFEST_DIR")
Expand Down Expand Up @@ -256,7 +253,6 @@ impl SDKBuilder<'_> {
.collect::<Vec<String>>()
},
glyphs_folders: Vec::new(),
arm_libs: Default::default(),
linker_script: format!(
"{}/devices/stax/stax_layout.ld",
env!("CARGO_MANIFEST_DIR")
Expand Down Expand Up @@ -290,7 +286,6 @@ impl SDKBuilder<'_> {
.collect::<Vec<String>>()
},
glyphs_folders: Vec::new(),
arm_libs: Default::default(),
linker_script: format!(
"{}/devices/flex/flex_layout.ld",
env!("CARGO_MANIFEST_DIR")
Expand Down Expand Up @@ -324,7 +319,6 @@ impl SDKBuilder<'_> {
.collect::<Vec<String>>()
},
glyphs_folders: Vec::new(),
arm_libs: Default::default(),
linker_script: format!(
"{}/devices/apex_p/apex_p_layout.ld",
env!("CARGO_MANIFEST_DIR")
Expand Down Expand Up @@ -383,20 +377,6 @@ impl SDKBuilder<'_> {
}
}

// Set ARM pre-compiled libraries path
self.device.arm_libs = match self.device.name {
DeviceName::NanoX => {
let mut path = self.device.c_sdk.display().to_string();
path.push_str("/arch/st33/lib");
path
}
DeviceName::NanoSPlus | DeviceName::Flex | DeviceName::Stax | DeviceName::ApexP => {
let mut path = self.device.c_sdk.display().to_string();
path.push_str("/arch/st33k1/lib");
path
}
};

// export TARGET into env for 'infos.rs'
println!("cargo:rustc-env=TARGET={}", self.device.name);
println!("cargo:warning=Device is {:?}", self.device.name);
Expand Down Expand Up @@ -557,13 +537,6 @@ impl SDKBuilder<'_> {
/* Compile the SDK */
command.compile("ledger-secure-sdk");

/* Link with libc, libm and libgcc */
let path = self.device.arm_libs.clone();
println!("cargo:rustc-link-lib=c");
println!("cargo:rustc-link-lib=m");
println!("cargo:rustc-link-lib=gcc");

println!("cargo:rustc-link-search={path}");
Ok(())
}

Expand Down
3 changes: 0 additions & 3 deletions ledger_secure_sdk_sys/link.ld
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ SECTIONS

/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
*(.debug_info)
}
Expand Down