Skip to content

Merge develop into master - #398

Merged
yogh333 merged 23 commits into
masterfrom
develop
Jun 4, 2026
Merged

yogh333 merged 23 commits into
masterfrom
develop

Conversation

@yogh333

@yogh333 yogh333 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

mbrousset-ledger and others added 23 commits May 11, 2026 13:19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Only LEDGER_SDK_PATH and the two LEDGER_SDK_EXTRA_* env vars were tracked.
Changes to HEAP_SIZE, the per-device .defines/.cflags/.ld files, link.ld,
and the local src/c/ sources silently produced stale build artifacts.

Move the directives to the top of main() so they fire even if a later
phase panics, and add the missing entries.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The five match arms in device() were ~50 lines each of near-identical
boilerplate: looking up a per-device env var, reading the matching
.defines and .cflags files, computing the linker-script path, etc.
Add DeviceSpec/SPECS describing only what actually differs between
devices (target_os, target_triple, env_fallback, arch_lib_dir,
NBGL glyph subfolders), and rewrite device() and the duplicate match
in generate_bindings() to look up the spec. Add Device::spec() so
callers can reach the static config from a Device value.

No behavior change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The "is this an NBGL build?" decision lived inline in four call sites
(device(), build_c_sdk(), generate_bindings(), generate_glyphs()) and
C_SDK_GRAPHICS was emitted from two of them. Add Device::is_nbgl() and
emit C_SDK_GRAPHICS once after device().

SDKBuildError carried 7 variants that were all .unwrap()'d in main(),
so the typed enum added no value over a panic. Switch each SDKBuilder
method (and the retrieve_* helpers) to return () or its plain payload,
and panic with a message describing what went wrong.

Also drop 7 cargo:warning= prints that just echoed values already
exported via cargo:rustc-env= (API_LEVEL, TARGET_ID, etc., recoverable
from the generated ELF metadata sections), and gate the build-timing
print behind LEDGER_SDK_BUILD_TIMING=1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@yogh333
yogh333 merged commit 25ebfa3 into master Jun 4, 2026
189 of 190 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants