debug: separate DEBUG and QEMU build configs, add DEBUG linker script - #102
Merged
Conversation
dehanj
reviewed
Jul 10, 2026
| TARGET_ASFLAGS += -O0 | ||
| TARGET_ASFLAGS += -g3 | ||
| else ifdef DEBUG | ||
| TARGET_ASFLAGS += -mrelax |
Member
There was a problem hiding this comment.
Maybe make comment that tkey-libs also should be built with -mrelax
dehanj
approved these changes
Jul 10, 2026
- Split QEMU and DEBUG into distinct build modes for tkey_app and tkey_uecc: QEMU keeps -O0/-g3/-mno-relax for debugging under QEMU, while DEBUG now builds with -Oz/-mrelax/-flto and lld's --icf=safe/--relax-gp for a smaller, relaxed release-like debug build (was previously sharing QEMU's unoptimized flags) - Add tkey_debug.ld linker script (128 KB RAM) for the new DEBUG target, separate from tkey_qemu.ld (1 MB) and the default tkey.ld - Add tkey_uecc_qemu.mk / tkey_uecc_qemu.a as its own uECC build target for QEMU, decoupled from tkey_uecc_debug.mk - Rename tkey_uecc_debug.mk's define from QEMU_DEBUG to TKEY_DEBUG to match its new DEBUG-only role - Minor cleanup: drop stale commented-out flags, fix indentation in tkey_qemu.ld and tkey_uecc.mk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
Please tick any that are relevant to this PR and remove any that aren't.
Submission checklist