Skip to content

arch/tricore: drop iLLD dependency in hwdebug - #19836

Open
zyfeier wants to merge 1 commit into
apache:masterfrom
zyfeier:tricore/hwdebug-de-illd
Open

arch/tricore: drop iLLD dependency in hwdebug#19836
zyfeier wants to merge 1 commit into
apache:masterfrom
zyfeier:tricore/hwdebug-de-illd

Conversation

@zyfeier

@zyfeier zyfeier commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove the iLLD dependency from the TriCore hardware debug monitor
(tricore_hwdebug.c), continuing the de-iLLD effort for arch/tricore.

The debug CSFR numbers, trigger-event register (TR0..TR7) addresses,
TREVT bit-field offsets and the CBS_OEC register address are now defined
locally with a TC_ prefix, so the file no longer depends on the iLLD
SFR headers (IfxCpu_bf.h, IfxCbs_reg.h) nor the iLLD intrinsics
(__mfcr/__mtcr). Register accesses use the tricore_mfcr/
tricore_mtcr macros, and the DBGTCR/DBGCFG/DBGACT bit-field
unions are replaced with explicit shifts.

The TC_ prefix avoids a redefinition clash with the iLLD CPU_*
namespace, which is still pulled in transitively through arch/irq.h.

Impact

Behavior is unchanged; this is a pure de-iLLD refactor.

Testing

  • Build: triboard_tc4x9_com:nsh (TC1V8) and a2g-tc397-5v-tft:nsh
    (TC1V6) both compile with 0 errors and no redefinition warnings.
  • checkpatch.sh: pass.
  • EVB (TC4X7): boots to NuttShell; the debugpoint test app confirms
    breakpoints trigger identically before and after the change. Verified
    on real hardware that the watchpoint trigger itself fires at the
    correct faulting PC (any watchpoint-callback discrepancy in the test
    app is pre-existing and unrelated to this change).

Remove the dependency on the iLLD SFR headers (IfxCpu_bf.h and
IfxCbs_reg.h) and the iLLD intrinsics (__mfcr/__mtcr) from the
hardware debug monitor implementation.

The debug CSFR numbers, trigger-event register (TR0..TR7) addresses,
TREVT bit-field offsets and the CBS_OEC register address are now
defined locally with a TC_ prefix, so the file no longer leaks the
iLLD CPU_* namespace (which is still pulled in transitively through
arch/irq.h).  Register accesses use the tricore_mfcr/tricore_mtcr
macros, and the DBGTCR/DBGCFG/DBGACT bit-field unions are replaced
with explicit shifts.

This is a pure de-iLLD refactor with no behavior change, verified on
a TC4x7 EVB: the board boots to NuttShell and breakpoints trigger
identically before and after the change.

Change-Id: I11b9b8ca1f3d3b7b32907592f2b992b025035c5c
@github-actions github-actions Bot added Arch: tricore Issues related to the TriCore architecture from Infineon Size: M The size of the change in this PR is medium labels Aug 13, 2026
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@zyfeier please fix:

c9454dd45d Merge 2bb6ac2e4c1a05b223f700bfa2ca39a5f84f5514 into 3ac88f0f97663426dc699e5e28d5d9a3ec8b7e35
2bb6ac2e4c arch/tricore: drop iLLD dependency in hwdebug
../nuttx/tools/checkpatch.sh -c -u -m -g  3ac88f0f97663426dc699e5e28d5d9a3ec8b7e35..HEAD
❌ Remove Gerrit Change-ID's before submitting upstream
❌ Missing Signed-off-by
Used config files:
    1: .codespellrc
Some checks failed. For contributing guidelines, see:
  https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: tricore Issues related to the TriCore architecture from Infineon Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants