Skip to content

arch/tricore: support C preprocessing for tasking asm - #21510

Closed
zhangyu981027 wants to merge 1 commit into
apache:masterfrom
zhangyu981027:tricore_tasking_asm_cpp_1106
Closed

zhangyu981027 wants to merge 1 commit into
apache:masterfrom
zhangyu981027:tricore_tasking_asm_cpp_1106

Conversation

@zhangyu981027

Copy link
Copy Markdown
Contributor

Summary

Preprocess TriCore TASKING .asm sources with ctc -E before invoking the assembler, allowing them to include nuttx/config.h and use #if on CONFIG_* symbols. Apply the same two-stage assembly flow to both CMake and Makefile builds and make the affected headers safe for assembly inclusion.

Impact

TASKING assembly sources can now use C preprocessor directives consistently with GNU assembly sources. This changes only the TriCore TASKING build path; other toolchains and runtime behavior are unaffected.

@github-actions github-actions Bot added Arch: tricore Issues related to the TriCore architecture from Infineon Area: OS Components OS Components issues Size: S The size of the change in this PR is small labels Nov 6, 2026
xiaoxiang781216
xiaoxiang781216 previously approved these changes Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@ssekar15 ssekar15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already agree that PR split will be done by us.

@xiaoxiang781216

xiaoxiang781216 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

we already agree that PR split will be done by us.

why? it isn't related to iLLD drop. it's open-source project, anyone could improve it as needed.

@ssekar15

ssekar15 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

we already agree that PR split will be done by us.

why? it isn't related to iLLD drop. it's open-source project, anyone could improve it as needed.

changes in this PR are already covered in initial PR, we mutually agreed to a point avoid duplication of work and we continue split of initial PR from our end.
d42669c

d42669c#diff-62b8ccb716fcc4c072da138049123478c3bff92308c22384152389fc28542f5fR82

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

we already agree that PR split will be done by us.

why? it isn't related to iLLD drop. it's open-source project, anyone could improve it as needed.

changes in this PR are already covered in initial PR, we mutually agreed to a point avoid duplication of work and we continue split of initial PR from our end. d42669c

d42669c#diff-62b8ccb716fcc4c072da138049123478c3bff92308c22384152389fc28542f5fR82

I don't see your code change Makefile like:
https://github.com/apache/nuttx/pull/21510/changes#diff-1c370c487a863b9b6a62a181e9816f1f2a5a8799e93392efba09818b972fee3aR171

@ssekar15 ssekar15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend to please wait until we complete the split of our initial PR and merge smoothly, perhaps I will announce the point when we reached there. This will completely avoid our duplication of effort (which we already completed).

Comment thread arch/tricore/src/cmake/tasking.cmake Resolved
@ssekar15

ssekar15 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

@zhangyu-duck avoid duplication.

@zhangyu981027

Copy link
Copy Markdown
Contributor Author

@zhangyu-duck avoid duplication.

small function i need this pr merge

Support including nuttx/config.h and #if on CONFIG_* in tasking .asm
sources by preprocessing them with ctc -E before assembly.

1. ctc -E runs as a pre-pass since the astc assembler has no C
   preprocessor of its own.
2. Comments in asm must not contain lone apostrophes since ctc -E
   reads them as unterminated C character constants.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@zhangyu-duck avoid duplication.

small function i need this pr merge

@ssekar15 could you remove the request change mark? it's a small change.

@ssekar15

Copy link
Copy Markdown
Contributor

this changes would directly conflicts with #21546. @zhangyu-duck I don't understand why this PR has to go before #21546?

@zhangyu981027
zhangyu981027 force-pushed the tricore_tasking_asm_cpp_1106 branch from 99229b4 to a20d88c Compare November 10, 2026 07:55
@ssekar15

Copy link
Copy Markdown
Contributor

@zhangyu-duck avoid duplication.

small function i need this pr merge

@ssekar15 could you remove the request change mark? it's a small change.

if there is good reason for this PR first before #21546, I'm ready to remove my change request.

@xiaoxiang781216

xiaoxiang781216 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

@zhangyu-duck avoid duplication.

small function i need this pr merge

@ssekar15 could you remove the request change mark? it's a small change.

if there is good reason for this PR first before #21546, I'm ready to remove my change request.

thanks, could you remove the request change? @ssekar15

@ssekar15

Copy link
Copy Markdown
Contributor

this changes would directly conflicts with #21546. @zhangyu-duck I don't understand why this PR has to go before #21546?

any updates !

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

the similar function included in #21546

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 Area: OS Components OS Components issues Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants