board/tricore: rename tc397 chip board name

"tc397" is a chip name which is not appropriate to act as a board name.
 the board supported here is actually "a2g-tc397-5v-tft".
 The correct definition is : tricore is arch name, tc3xx is arch family
 name, tc397 is chip name and the borad name is a2g-tc397-5v-tft
This commit is contained in:
wangchengdong
2025-08-25 13:35:13 +08:00
committed by Xiang Xiao
parent 9b8c8bdd7b
commit 28206007e0
29 changed files with 360 additions and 188 deletions

View File

@@ -1,14 +1,14 @@
=================
KIT_A2G_TC397_TFT
A2G_TC397_5V_TFT
=================
This page file describes the contents of the build configurations available
for the NuttX TriCore port.
Infineons AURIX™- TC3xx `KIT_A2G_TC397_TFT <https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc397_5v_tft>`__ Board
Infineons AURIX™- TC3xx `A2G_TC397_5V_TFT <https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc397_5v_tft>`__ Board
=====================================================================================================================================
This port should work on KIT_A2G_TC397_TFT with a proper CPU.
This port should work on A2G_TC397_5V_TFT with a proper CPU.
The mandatory CPU features are:
* System Timer (STM)
@@ -26,17 +26,17 @@ Configurations
Common Configuration Notes
--------------------------
1. Each Tricore TC397 configuration is maintained in a sub-directory
1. Each A2G_TC397_5V_TFT configuration is maintained in a sub-directory
and can be selected as follow::
tools/configure.sh tc397:<subdir>
tools/configure.sh a2g-tc397-5v-tft:<subdir>
Where ``<subdir>`` is one of the configuration sub-directories described in
the following paragraph.
NuttX Shell::
tools/configure.sh tc397:nsh
tools/configure.sh a2g-tc397-5v-tft:nsh
2. These configurations use the mconf-based configuration tool. To
change a configurations using that tool, you should:

View File

@@ -34,7 +34,7 @@ config ARCH_FAMILY
config ARCH_CHIP
string
default "tc3xx" if ARCH_CHIP_TC397
default "tc397" if ARCH_CHIP_TC397
config ARCH_CHIP_TC397
bool "AURIX Family TC397"
@@ -47,4 +47,7 @@ config ARCH_CHIP_TC397
if ARCH_TC3XX
source "arch/tricore/src/tc3xx/Kconfig"
endif
if ARCH_TC397
source "arch/tricore/src/tc397/Kconfig"
endif
endif # ARCH_TRICORE

View File

@@ -44,6 +44,10 @@
#include <arch/chip/irq.h>
#if defined(CONFIG_ARCH_TC3XX)
# include <arch/tc3xx/irq.h>
#endif
/****************************************************************************
* Pre-processor Prototypes
****************************************************************************/

View File

@@ -0,0 +1,48 @@
/****************************************************************************
* arch/tricore/include/tc397/chip.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_TRICORE_INCLUDE_TC397_CHIP_H
#define __ARCH_TRICORE_INCLUDE_TC397_CHIP_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Pre-processor Prototypes
****************************************************************************/
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_TRICORE_INCLUDE_TC397_CHIP_H */

View File

@@ -0,0 +1,69 @@
/****************************************************************************
* arch/tricore/include/tc397/irq.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/* This file should never be included directly but, rather,
* only indirectly through nuttx/irq.h
*/
#ifndef __ARCH_TRICORE_INCLUDE_TC397_IRQ_H
#define __ARCH_TRICORE_INCLUDE_TC397_IRQ_H
/****************************************************************************
* Included Files
****************************************************************************/
/****************************************************************************
* Pre-processor Prototypes
****************************************************************************/
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Inline functions
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif
#endif /* __ARCH_TRICORE_INCLUDE_TC397_IRQ_H */

View File

@@ -19,7 +19,7 @@
# the License.
#
# ##############################################################################
add_subdirectory(${ARCH_SUBDIR})
add_subdirectory(${NUTTX_CHIP_ABS_DIR} EXCLUDE_FROM_ALL exclude_chip)
add_subdirectory(common)

View File

@@ -25,6 +25,7 @@ include chip/Make.defs
ifeq ($(CONFIG_ARCH_TC3XX),y)
ARCH_SUBDIR = tc3xx
include $(ARCH_SUBDIR)/Make.defs
endif
ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src

3
arch/tricore/src/tc397/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
/*_unpack
/tc397
/*tar.gz

View File

@@ -0,0 +1,37 @@
# ##############################################################################
# arch/tricore/src/tc3xx/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################
if(CONFIG_ARCH_CHIP_TC397)
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/tc397)
FetchContent_Declare(
tc397
URL https://github.com/wangchdo/tc397_sdk/archive/refs/heads/master.tar.gz
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/tc397 BINARY_DIR
${CMAKE_BINARY_DIR}/arch/${CONFIG_ARCH}/src/${CONFIG_ARCH_CHIP}/tc397)
FetchContent_GetProperties(tc397)
if(NOT tc397_POPULATED)
FetchContent_Populate(tc397)
endif()
endif()
add_subdirectory(tc397)
endif()

View File

@@ -3,5 +3,3 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
if ARCH_BOARD_TC397
endif

View File

@@ -0,0 +1,49 @@
############################################################################
# arch/tricore/src/tc397/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
ifeq ($(CONFIG_ARCH_CHIP_TC397),y)
-include tc397/tc397/Make.defs
endif
TC397_UNPACK = tc397
TC397_COMMIT = master
TC397_URL = https://github.com/wangchdo/tc397_sdk/archive/refs/heads
TC397_TARBALL = tc397/$(TC397_UNPACK).tar.gz
TC397_DIR = tc397_sdk-master
$(TC397_TARBALL):
$(call DOWNLOAD,$(TC397_URL),$(TC397_COMMIT).tar.gz,$(TC397_TARBALL))
tc397/.tc397_unpack: $(TC397_TARBALL)
$(Q) echo "Unpacking: TC397"
$(Q) tar xzf $(TC397_TARBALL) -C tc397
$(Q) mv tc397/$(TC397_DIR) tc397/$(TC397_UNPACK)
$(Q) touch tc397/.tc397_unpack
ifeq ($(wildcard tc397/$(TC397_UNPACK)/.git),)
context:: tc397/.tc397_unpack
distclean::
$(call DELFILE, tc397/.tc397_unpack)
$(call DELFILE, $(TC397_TARBALL))
$(call DELDIR, tc397/$(TC397_UNPACK))
endif

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* arch/tricore/src/tc3xx/chip.h
* arch/tricore/src/tc397/chip.h
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -20,11 +20,11 @@
*
****************************************************************************/
#ifndef __ARCH_TRICORE_SRC_TC3XX_CHIP_H
#define __ARCH_TRICORE_SRC_TC3XX_CHIP_H
#ifndef __ARCH_TRICORE_SRC_TC397_CHIP_H
#define __ARCH_TRICORE_SRC_TC397_CHIP_H
/****************************************************************************
* Included Files
****************************************************************************/
#endif /* __ARCH_TRICORE_SRC_TC3XX_CHIP_H */
#endif /* __ARCH_TRICORE_SRC_TC397_CHIP_H */

View File

@@ -24,28 +24,10 @@ set(SRCS tc3xx_timerisr.c tc3xx_serial.c)
target_sources(arch PRIVATE ${SRCS})
if(CONFIG_ARCH_CHIP_TC397)
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/tc397)
FetchContent_Declare(
tc397
URL https://github.com/anchao/tc397_sdk/archive/refs/heads/master.tar.gz
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/tc397 BINARY_DIR
${CMAKE_BINARY_DIR}/arch/${CONFIG_ARCH}/src/${CONFIG_ARCH_CHIP}/tc397)
FetchContent_GetProperties(tc397)
if(NOT tc397_POPULATED)
FetchContent_Populate(tc397)
endif()
endif()
add_subdirectory(tc397)
if(CONFIG_TRICORE_TOOLCHAIN_TASKING)
nuttx_add_kernel_library(c_fpu)
target_sources(c_fpu PRIVATE tc3xx_libc.c)
target_link_options(
nuttx PRIVATE
--library-directory=${CMAKE_BINARY_DIR}/arch/tricore/src/exclude_chip)
endif()
if(CONFIG_TRICORE_TOOLCHAIN_TASKING)
nuttx_add_kernel_library(c_fpu)
target_sources(c_fpu PRIVATE tc3xx_libc.c)
target_link_options(
nuttx PRIVATE
--library-directory=${CMAKE_BINARY_DIR}/arch/tricore/src/exclude_chip)
endif()

View File

@@ -20,10 +20,6 @@
#
############################################################################
ifeq ($(CONFIG_ARCH_CHIP_TC397),y)
-include tc3xx/tc397/Make.defs
endif
CHIP_CSRCS += tc3xx_timerisr.c
CHIP_CSRCS += tc3xx_serial.c
@@ -52,28 +48,3 @@ EXTRA_LIBS += libos$(LIBEXT)
endif
LIBPATHS += $(CURDIR)
TC397_UNPACK = tc397
TC397_COMMIT = master
TC397_URL = https://github.com/anchao/tc397_sdk/archive/refs/heads
TC397_TARBALL = tc3xx/$(TC397_UNPACK).tar.gz
TC397_DIR = tc397_sdk-master
$(TC397_TARBALL):
$(call DOWNLOAD,$(TC397_URL),$(TC397_COMMIT).tar.gz,$(TC397_TARBALL))
tc3xx/.tc397_unpack: $(TC397_TARBALL)
$(Q) echo "Unpacking: TC397"
$(Q) tar xzf $(TC397_TARBALL) -C tc3xx
$(Q) mv tc3xx/$(TC397_DIR) tc3xx/$(TC397_UNPACK)
$(Q) touch tc3xx/.tc397_unpack
ifeq ($(wildcard tc3xx/$(TC397_UNPACK)/.git),)
context:: .tc397_unpack
distclean::
$(call DELFILE, tc3xx/.tc397_unpack)
$(call DELFILE, $(TC397_TARBALL))
$(call DELDIR, tc3xx/$(TC397_UNPACK))
endif

View File

@@ -2331,7 +2331,7 @@ config ARCH_BOARD_SABRE_6QUAD
This options selects support for NuttX on the NXP/Freescale Sabre
board featuring the iMX 6Quad CPU.
config ARCH_BOARD_TC397
config ARCH_BOARD_A2G_TC397_5V_TFT
bool "Infineon's AURIX TC397 board: KIT_A2G_TC397_5V_TFT"
depends on ARCH_CHIP_TC397
---help---
@@ -3724,7 +3724,7 @@ config ARCH_BOARD
default "milkv_duos" if ARCH_BOARD_SG2000_MILKV_DUOS
default "starpro64" if ARCH_BOARD_EIC7700X_STARPRO64
default "sabre-6quad" if ARCH_BOARD_SABRE_6QUAD
default "tc397" if ARCH_BOARD_TC397
default "a2g-tc397-5v-tft" if ARCH_BOARD_A2G_TC397_5V_TFT
default "qemu-armv7a" if ARCH_BOARD_QEMU_ARMV7A
default "qemu-armv7r" if ARCH_BOARD_QEMU_ARMV7R
default "qemu-armv8a" if ARCH_BOARD_QEMU_ARMV8A
@@ -3939,8 +3939,8 @@ endif
if ARCH_BOARD_SABRE_6QUAD
source "boards/arm/imx6/sabre-6quad/Kconfig"
endif
if ARCH_BOARD_TC397
source "boards/tricore/tc3xx/tc397/Kconfig"
if ARCH_BOARD_A2G_TC397_5V_TFT
source "boards/tricore/tc397/a2g-tc397-5v-tft/Kconfig"
endif
if ARCH_BOARD_MPS2_AN500
source "boards/arm/mps/mps2-an500/Kconfig"

View File

@@ -1,5 +1,5 @@
# ##############################################################################
# boards/tricore/tc3xx/tc397/CMakeLists.txt
# boards/tricore/tc397/a2g-tc397-5v-tft/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#

View File

@@ -0,0 +1,7 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
if ARCH_BOARD_A2G_TC397_5V_TFT
endif

View File

@@ -7,9 +7,9 @@
#
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_ARCH="tricore"
CONFIG_ARCH_BOARD="tc397"
CONFIG_ARCH_BOARD_TC397=y
CONFIG_ARCH_CHIP="tc3xx"
CONFIG_ARCH_BOARD="a2g-tc397-5v-tft"
CONFIG_ARCH_BOARD_A2G_TC397_5V_TFT=y
CONFIG_ARCH_CHIP="tc397"
CONFIG_ARCH_CHIP_TC397=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_STACKDUMP=y

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/tricore/tc3xx/tc397/include/board.h
* boards/tricore/tc397/a2g-tc397-5v-tft/include/board.h
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -20,8 +20,8 @@
*
****************************************************************************/
#ifndef __BOARDS_TRICORE_TC3XX_TC397_INCLUDE_BOARD_H
#define __BOARDS_TRICORE_TC3XX_TC397_INCLUDE_BOARD_H
#ifndef __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_INCLUDE_BOARD_H
#define __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_INCLUDE_BOARD_H
/****************************************************************************
* Included Files
@@ -37,4 +37,4 @@
* Public Functions Definitions
****************************************************************************/
#endif /* __BOARDS_TRICORE_TC3XX_TC397_INCLUDE_BOARD_H */
#endif /* __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_INCLUDE_BOARD_H */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/tricore/tc3xx/tc397/include/board_memorymap.h
* boards/tricore/tc397/a2g-tc397-5v-tft/include/board_memorymap.h
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -20,8 +20,8 @@
*
****************************************************************************/
#ifndef __BOARDS_TRICORE_TC3XX_TC397_INCLUDE_BOARD_MEMORYMAP_H
#define __BOARDS_TRICORE_TC3XX_TC397_INCLUDE_BOARD_MEMORYMAP_H
#ifndef __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_INCLUDE_BOARD_MEMORYMAP_H
#define __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_INCLUDE_BOARD_MEMORYMAP_H
/****************************************************************************
* Included Files
@@ -58,4 +58,4 @@ extern "C"
#endif
#endif /* __ASSEMBLY__ */
#endif /* __BOARDS_TRICORE_TC3XX_TC397_INCLUDE_BOARD_MEMORYMAP_H */
#endif /* __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_INCLUDE_BOARD_MEMORYMAP_H */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/tricore/tc3xx/tc397/scripts/Lcf_Tasking_Tricore_Tc.lsl
* boards/tricore/tc397/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl
*
* SPDX-License-Identifier: Apache-2.0
*

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/tricore/tc3xx/tc397/scripts/Make.defs
# boards/tricore/tc397/a2g-tc397-5v-tft/scripts/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#

View File

@@ -1,5 +1,5 @@
# ##############################################################################
# boards/tricore/tc3xx/tc397/src/CMakeLists.txt
# boards/tricore/tc397/a2g-tc397-5v-tft/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/tricore/tc3xx/tc397/src/Makefile
# boards/tricore/tc397/a2g-tc397-5v-tft/src/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/tricore/tc3xx/tc397/src/tc397.h
* boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397.h
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -20,8 +20,8 @@
*
****************************************************************************/
#ifndef __BOARDS_TRICORE_TC3XX_TC397_SRC_TC397_H
#define __BOARDS_TRICORE_TC3XX_TC397_SRC_TC397_H
#ifndef __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_SRC_TC397_H
#define __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_SRC_TC397_H
/****************************************************************************
* Included Files
@@ -62,4 +62,4 @@ int tc397_bringup(void);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __BOARDS_TRICORE_TC3XX_TC397_SRC_TC397_H */
#endif /* __BOARDS_TRICORE_TC397_A2G_TC397_5V_TFT_SRC_TC397_H */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/tricore/tc3xx/tc397/src/tc397_appinit.c
* boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/tricore/tc3xx/tc397/src/tc397_boardinit.c
* boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_boardinit.c
*
* SPDX-License-Identifier: Apache-2.0
*

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/tricore/tc3xx/tc397/src/tc397_bringup.c
* boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_bringup.c
*
* SPDX-License-Identifier: Apache-2.0
*