Skip to content

arch/tricore: add support for tc4xx series chips and boards#18391

Open
zhangyu-duck wants to merge 7 commits intoapache:masterfrom
zhangyu-duck:tricore_tc4_board
Open

arch/tricore: add support for tc4xx series chips and boards#18391
zhangyu-duck wants to merge 7 commits intoapache:masterfrom
zhangyu-duck:tricore_tc4_board

Conversation

@zhangyu-duck
Copy link

Note: Please adhere to Contributing Guidelines.

Summary

Two main updates:

  1. Uses the official Infineon ILLD repository instead of a private repository.
  2. Adds support for tc4xx series chips and boards

Impact

support tc4xx chip

Testing

  1. Both cmake and makefile methods can compile tc3xx/tc4xx.
  2. pass ostest, basic functions are normal

nsh> hello
Hello, World!! tc4 ostest
nsh>

i give tc4 ostest.log in attach files
tc4_ostest.log

@github-actions github-actions bot added Arch: tricore Issues related to the TriCore architecture from Infineon Board: tricore Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Feb 13, 2026
@zhangyu-duck zhangyu-duck force-pushed the tricore_tc4_board branch 2 times, most recently from 745ed4d to 4edecbe Compare February 13, 2026 08:49
@jerpelea jerpelea changed the title Tricore tc4 board arch/tricore: add support for tc4xx series chips and boards Feb 13, 2026
Copy link
Contributor

@jerpelea jerpelea left a comment

Choose a reason for hiding this comment

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

please document all non Apache license file to
https://github.com/apache/nuttx/blob/master/LICENSE

Copy link
Contributor

@jerpelea jerpelea left a comment

Choose a reason for hiding this comment

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

please add SPDX license identifiers to all files not only Apache licensed ones

@zhangyu-duck
Copy link
Author

please add SPDX license identifiers to all files not only Apache licensed ones

ok,thanks, i have updata code

@zhangyu-duck
Copy link
Author

please add SPDX license identifiers to all files not only Apache licensed ones

get it, thanks

Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

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

@zhangyu-duck please update the Documentation https://nuttx.apache.org/docs/latest/platforms/tricore/index.html to include these new chips.

Unfortunately our Documentation is very non-standardized, some Documentation arch are very good, others are very primitive (let say not helpful). So, I suggest you to use https://nuttx.apache.org/docs/latest/platforms/arm/imxrt/index.html as a good reference.

Copy link
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

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

I guess since this modifies the TC3xx logic as well, could you please include an OSTest log from a tc3 board? The tc4 log looks good.

@linguini1
Copy link
Contributor

Also I won't block the PR about this since I have pretty much no familiarity with the tricore architecture, but is it necessary to use the SDK? It seems like this PR needs to include a lot of workarounds for quirks with the SDK (like the libc stubs and patch files). Is it at all possible to avoid using the SDK directly? I know a few other archs in NuttX use this approach (hence why I don't think it's a dealbreaker or anything), but I also know the preferred method is to avoid using vendor SDKs/HALs entirely if possible.

@github-actions github-actions bot added the Area: Documentation Improvements or additions to documentation label Feb 14, 2026
@acassis
Copy link
Contributor

acassis commented Feb 14, 2026

@simbit18 do you know if LVGL v9.2 files were removed from their site?

====================================================================================
Configuration/Tool: raspberrypi-4b/lvgl
2026-02-14 04:31:13
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
[v9.2.1.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of v9.2.1.zip or
        v9.2.1.zip.zip, and cannot find v9.2.1.zip.ZIP, period.
make[3]: *** [Makefile:77: lvgl] Error 9
make[3]: Target 'context' not remade because of errors.
make[2]: *** [Makefile:57: /github/workspace/sources/apps/graphics/lvgl_context] Error 2
make[2]: Target 'context_all' not remade because of errors.
make[1]: *** [Makefile:187: context] Error 2
make: *** [tools/Unix.mk:458: /github/workspace/sources/apps/.context] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
  [1/1] Normalize raspberrypi-4b/lvgl

We need to create our own mirror at github.com/nuttx/

@parthitce
Copy link

Also I won't block the PR about this since I have pretty much no familiarity with the tricore architecture, but is it necessary to use the SDK? It seems like this PR needs to include a lot of workarounds for quirks with the SDK (like the libc stubs and patch files). Is it at all possible to avoid using the SDK directly? I know a few other archs in NuttX use this approach (hence why I don't think it's a dealbreaker or anything), but I also know the preferred method is to avoid using vendor SDKs/HALs entirely if possible.

On this note, we are already in the phase of developing iLLD independent Tricore support. Although this isn't mature yet, plans are tracked here 1. Also you can find development tree with various branches 2 named dev/infineon/tricore-xxyy, for example working variant of UART 3. Our main goal is get to upstream NuttX during the course of this year.

@linguini1
Copy link
Contributor

On this note, we are already in the phase of developing iLLD independent Tricore support. Although this isn't mature yet, plans are tracked here 1. Also you can find development tree with various branches 2 named dev/infineon/tricore-xxyy, for example working variant of UART 3. Our main goal is get to upstream NuttX during the course of this year.

Woah awesome news! Thanks!

@simbit18
Copy link
Contributor

@simbit18 do you know if LVGL v9.2 files were removed from their site?

Hi @acassis There were temporary issues downloading the package.

@acassis
Copy link
Contributor

acassis commented Feb 15, 2026

@simbit18 do you know if LVGL v9.2 files were removed from their site?

Hi @acassis There were temporary issues downloading the package.

Thank you @simbit18

jerpelea
jerpelea previously approved these changes Feb 17, 2026
acassis
acassis previously approved these changes Feb 17, 2026
@parthitce
Copy link

@zhangyu-duck are these changes tested with Tasking only or OSS GCC can also be used?

@zhangyu-duck
Copy link
Author

@zhangyu-duck are these changes tested with Tasking only or OSS GCC can also be used?
only gcc now, and for tasking we will pull up in subsequent work later.

--help--
In addition to the 6 cores, tc4xx also has one more security core.

config CPU_COREID
Copy link
Contributor

Choose a reason for hiding this comment

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

why need this option

Copy link
Author

Choose a reason for hiding this comment

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

chip’s code and linker script needs to be distinguished for different cores. Originally, this was under vendor, and I placed it in the kconfig under the chip for tc4xx/tc3xx in the community, but someone suggested extracting it to the common section. so i place it in arch/tricore/Kconfig

Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer remove it from Kconifg, since:

  1. you can get the coreid at runtime directly
  2. different core has the different defconfig, you can select the different link script directly.

@@ -0,0 +1,86 @@
/****************************************************************************
* arch/tricore/src/tc4xx/tc4xx_libc.c
Copy link
Contributor

Choose a reason for hiding this comment

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

should we move to libc/machine/tricore instead

Copy link
Author

Choose a reason for hiding this comment

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

i think noneed.

/* The implementation of libc is introduced by default in the Tricore

  • toolchain, in nuttx we made a fake libc_fpu.a library to bypass
  • this issue, but the linker will still generate markup code,
  • add a few definitions to fool the linker.
    */

Copy link
Contributor

Choose a reason for hiding this comment

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

how about protected mode, the code in arch can't be used by nuttx_user.bin

#endif

#if (IFX_CFG_SSW_ENABLE_LBIST == 1)
void Ifx_Ssw_Lbist(void)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use illd version directly?

Copy link
Author

Choose a reason for hiding this comment

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

This involves copyright issues, so I extracted the key and necessary parts and rewrote them so that they can be used with the SPDX license.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean using the code from illd package directly, and patch the origin file is real need

for (i = 0; i < 6; i++)
{
#ifdef CONFIG_ARCH_TC3XX
#ifdef CONFIG_ARCH_CHIP_TC3XX
Copy link
Contributor

Choose a reason for hiding this comment

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

why change CONFIG_ARCH_TC3XX to CONFIG_ARCH_CHIP_TC3XX?

TC3XX is not chip name, It should be like ARMV8R: ARCH_ARMV8R

Copy link
Author

Choose a reason for hiding this comment

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

i think current name is ok, because arch's name is tc1v8

Copy link
Author

Choose a reason for hiding this comment

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

tc3xx arch's name is tc1V6, tc4xx's is tc1v8

Copy link
Contributor

@wangchdo wangchdo Feb 26, 2026

Choose a reason for hiding this comment

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

I think the arch name here should be TRICORE, so we have ARCH_TRICORE.

On upon of ARCH_TRICORE we can have more ARCH_XXX to refer to different cpu series.

But for CHIP, there should be only one chip, So we can only have one CHIP_TC397 or CHIP_TC499.

/* Cpucs gpsr init */

#ifndef CONFIG_ARCH_TC3XX
#ifndef CONFIG_ARCH_CHIP_TC3XX
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Author

Choose a reason for hiding this comment

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

i think current name is ok, because arch's name is tc1v8

volatile Ifx_SRC_SRCR *src = &SRC_CPU_CPU0_SB + irq;

#ifdef CONFIG_ARCH_TC3XX
#ifdef CONFIG_ARCH_CHIP_TC3XX
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Author

Choose a reason for hiding this comment

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

i think current name is ok, because arch's name is tc1v8

* so routing to the first cpu in cpuset.
*/

#ifdef CONFIG_ARCH_CHIP_TC3XX
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Author

Choose a reason for hiding this comment

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

i think current name is ok, because arch's name is tc1v8

#include "IfxCpu.h"
#include "IfxScuWdt.h"

#ifdef CONFIG_ARCH_CHIP_TC4XX
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use CONFIG_ARCH_TC4XX

Copy link
Author

Choose a reason for hiding this comment

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

i think current name is ok, because arch's name is tc1v8

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the arch name here should be TRICORE, so we have ARCH_TRICORE.

On upon of ARCH_TRICORE we can have more ARCH_XXX.

But for CHIP, there should be one chip, you can use TC397, TC499 etc... So we can only have one CHIP_TC397 or CHIP_TC499.

@@ -0,0 +1,21 @@
############################################################################
# arch/tricore/src/tc4da/Make.defs
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need empty make files?

Copy link
Author

Choose a reason for hiding this comment

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

i follow original tc397, tc397 also has empty cmake and make。If any content needs to be added later, then these two files will not need to be created again.

@@ -1,5 +1,5 @@
# ##############################################################################
# boards/arm/samd5e5/metro-m4/CMakeLists.txt
# arch/tricore/src/tc4da/CMakeLists.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need empty Cmake files?

Copy link
Author

Choose a reason for hiding this comment

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

i follow original tc397, tc397 also has empty cmake and make。If any content needs to be added later, then these two files will not need to be created again.

@wangchdo
Copy link
Contributor

Hi zhangyu-duck,

Great job!

My suggestion is to leave the iLLD unchanged and only configure it using the IFX_XXX macros.

For your reference, I have already ported NuttX to TC4xN based on iLLD in our internal project, and this port does not modify the iLLD itself.

@zhangyu-duck
Copy link
Author

Hi zhangyu-duck,

Great job!

My suggestion is to leave the iLLD unchanged and only configure it using the IFX_XXX macros.

For your reference, I have already ported NuttX to TC4xN based on iLLD in our internal project, and this port does not modify the iLLD itself.

Since infineon have open-source plans, I recommend using the ILD library they provide on GitHub.

add new chip named tc4xx and board tc4evb

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
@linguini1
Copy link
Contributor

Can you please perform a test on a TV3 device as well since both are modified?

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: Documentation Improvements or additions to documentation Board: tricore Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.