Skip to content

fix(dap): support builds without JTAG - #86

Merged
sakumisu merged 1 commit into
cherry-embedded:masterfrom
ybisland:fix/dap-jtag-disabled-build
Oct 6, 2026
Merged

sakumisu merged 1 commit into
cherry-embedded:masterfrom
ybisland:fix/dap-jtag-disabled-build

Conversation

@ybisland

@ybisland ybisland commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

With DAP_JTAG=0, DAP.c still compiled JTAG-specific code, causing SWD-only builds to fail. This change conditionally compiles the JTAG code and handles the unused request parameter when JTAG is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • JTAG ID code requests now return an error when JTAG support is unavailable. When JTAG is enabled, requests continue to be checked against the active debug port.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fd3aebd5-928a-4b19-a46d-5c37057d7e16
📥 Commits

Reviewing files that changed from the base of the PR and between d95619b and 89eddad.

📒 Files selected for processing (1)
  • DAP/Source/DAP.c

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The JTAG compile-time guard now covers the ID-code declaration and port validation. When JTAG is disabled, the function ignores the request and returns DAP_ERROR.

Changes

JTAG ID-code handling

Layer / File(s) Summary
Guard the ID-code path
DAP/Source/DAP.c
The DAP_JTAG guard covers the ID-code declaration and active-port validation. The disabled-JTAG branch ignores the request and returns DAP_ERROR.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: sakumisu

Merge Risk: ⚪ Minimal · up to 89edd

With JTAG disabled, the handler avoids JTAG-only state and returns DAP_ERROR. No concrete defect was found; validate the SWD-only build in the project’s target environment.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: supporting builds without JTAG.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sakumisu
sakumisu merged commit 43d2b4c into cherry-embedded:master Oct 6, 2026
1 check passed
@ybisland
ybisland deleted the fix/dap-jtag-disabled-build branch October 18, 2026 11:29
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