Skip to content

Commit 2820600

Browse files
wangchdoxiaoxiang781216
authored andcommitted
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
1 parent 9b8c8bd commit 2820600

File tree

29 files changed

+360
-188
lines changed

29 files changed

+360
-188
lines changed

Documentation/platforms/tricore/tc397/boards/kit_a2g_tc397_tft/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
=================
2-
KIT_A2G_TC397_TFT
2+
A2G_TC397_5V_TFT
33
=================
44

55
This page file describes the contents of the build configurations available
66
for the NuttX TriCore port.
77

8-
Infineon’s AURIX™- TC3xx `KIT_A2G_TC397_TFT <https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc397_5v_tft>`__ Board
8+
Infineon’s AURIX™- TC3xx `A2G_TC397_5V_TFT <https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc397_5v_tft>`__ Board
99
=====================================================================================================================================
1010

11-
This port should work on KIT_A2G_TC397_TFT with a proper CPU.
11+
This port should work on A2G_TC397_5V_TFT with a proper CPU.
1212
The mandatory CPU features are:
1313

1414
* System Timer (STM)
@@ -26,17 +26,17 @@ Configurations
2626
Common Configuration Notes
2727
--------------------------
2828

29-
1. Each Tricore TC397 configuration is maintained in a sub-directory
29+
1. Each A2G_TC397_5V_TFT configuration is maintained in a sub-directory
3030
and can be selected as follow::
3131

32-
tools/configure.sh tc397:<subdir>
32+
tools/configure.sh a2g-tc397-5v-tft:<subdir>
3333

3434
Where ``<subdir>`` is one of the configuration sub-directories described in
3535
the following paragraph.
3636

3737
NuttX Shell::
3838

39-
tools/configure.sh tc397:nsh
39+
tools/configure.sh a2g-tc397-5v-tft:nsh
4040

4141
2. These configurations use the mconf-based configuration tool. To
4242
change a configurations using that tool, you should:

arch/tricore/Kconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ config ARCH_FAMILY
3434

3535
config ARCH_CHIP
3636
string
37-
default "tc3xx" if ARCH_CHIP_TC397
37+
default "tc397" if ARCH_CHIP_TC397
3838

3939
config ARCH_CHIP_TC397
4040
bool "AURIX Family TC397"
@@ -47,4 +47,7 @@ config ARCH_CHIP_TC397
4747
if ARCH_TC3XX
4848
source "arch/tricore/src/tc3xx/Kconfig"
4949
endif
50+
if ARCH_TC397
51+
source "arch/tricore/src/tc397/Kconfig"
52+
endif
5053
endif # ARCH_TRICORE

arch/tricore/include/irq.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444

4545
#include <arch/chip/irq.h>
4646

47+
#if defined(CONFIG_ARCH_TC3XX)
48+
# include <arch/tc3xx/irq.h>
49+
#endif
50+
4751
/****************************************************************************
4852
* Pre-processor Prototypes
4953
****************************************************************************/

arch/tricore/include/tc397/chip.h

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/****************************************************************************
2+
* arch/tricore/include/tc397/chip.h
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed to the Apache Software Foundation (ASF) under one or more
7+
* contributor license agreements. See the NOTICE file distributed with
8+
* this work for additional information regarding copyright ownership. The
9+
* ASF licenses this file to you under the Apache License, Version 2.0 (the
10+
* "License"); you may not use this file except in compliance with the
11+
* License. You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
* License for the specific language governing permissions and limitations
19+
* under the License.
20+
*
21+
****************************************************************************/
22+
23+
#ifndef __ARCH_TRICORE_INCLUDE_TC397_CHIP_H
24+
#define __ARCH_TRICORE_INCLUDE_TC397_CHIP_H
25+
26+
/****************************************************************************
27+
* Included Files
28+
****************************************************************************/
29+
30+
#include <nuttx/config.h>
31+
32+
/****************************************************************************
33+
* Pre-processor Prototypes
34+
****************************************************************************/
35+
36+
/****************************************************************************
37+
* Public Types
38+
****************************************************************************/
39+
40+
/****************************************************************************
41+
* Public Data
42+
****************************************************************************/
43+
44+
/****************************************************************************
45+
* Public Functions Prototypes
46+
****************************************************************************/
47+
48+
#endif /* __ARCH_TRICORE_INCLUDE_TC397_CHIP_H */

arch/tricore/include/tc397/irq.h

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/****************************************************************************
2+
* arch/tricore/include/tc397/irq.h
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed to the Apache Software Foundation (ASF) under one or more
7+
* contributor license agreements. See the NOTICE file distributed with
8+
* this work for additional information regarding copyright ownership. The
9+
* ASF licenses this file to you under the Apache License, Version 2.0 (the
10+
* "License"); you may not use this file except in compliance with the
11+
* License. You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
* License for the specific language governing permissions and limitations
19+
* under the License.
20+
*
21+
****************************************************************************/
22+
23+
/* This file should never be included directly but, rather,
24+
* only indirectly through nuttx/irq.h
25+
*/
26+
27+
#ifndef __ARCH_TRICORE_INCLUDE_TC397_IRQ_H
28+
#define __ARCH_TRICORE_INCLUDE_TC397_IRQ_H
29+
30+
/****************************************************************************
31+
* Included Files
32+
****************************************************************************/
33+
34+
/****************************************************************************
35+
* Pre-processor Prototypes
36+
****************************************************************************/
37+
38+
/****************************************************************************
39+
* Public Types
40+
****************************************************************************/
41+
42+
/****************************************************************************
43+
* Inline functions
44+
****************************************************************************/
45+
46+
/****************************************************************************
47+
* Public Data
48+
****************************************************************************/
49+
50+
/****************************************************************************
51+
* Public Function Prototypes
52+
****************************************************************************/
53+
54+
#ifndef __ASSEMBLY__
55+
#ifdef __cplusplus
56+
#define EXTERN extern "C"
57+
extern "C"
58+
{
59+
#else
60+
#define EXTERN extern
61+
#endif
62+
63+
#undef EXTERN
64+
#ifdef __cplusplus
65+
}
66+
#endif
67+
#endif
68+
69+
#endif /* __ARCH_TRICORE_INCLUDE_TC397_IRQ_H */

arch/tricore/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# the License.
2020
#
2121
# ##############################################################################
22-
22+
add_subdirectory(${ARCH_SUBDIR})
2323
add_subdirectory(${NUTTX_CHIP_ABS_DIR} EXCLUDE_FROM_ALL exclude_chip)
2424
add_subdirectory(common)
2525

arch/tricore/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ include chip/Make.defs
2525

2626
ifeq ($(CONFIG_ARCH_TC3XX),y)
2727
ARCH_SUBDIR = tc3xx
28+
include $(ARCH_SUBDIR)/Make.defs
2829
endif
2930

3031
ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src

arch/tricore/src/tc397/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*_unpack
2+
/tc397
3+
/*tar.gz
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# ##############################################################################
2+
# arch/tricore/src/tc3xx/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
if(CONFIG_ARCH_CHIP_TC397)
24+
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/tc397)
25+
FetchContent_Declare(
26+
tc397
27+
URL https://github.com/wangchdo/tc397_sdk/archive/refs/heads/master.tar.gz
28+
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/tc397 BINARY_DIR
29+
${CMAKE_BINARY_DIR}/arch/${CONFIG_ARCH}/src/${CONFIG_ARCH_CHIP}/tc397)
30+
FetchContent_GetProperties(tc397)
31+
if(NOT tc397_POPULATED)
32+
FetchContent_Populate(tc397)
33+
endif()
34+
endif()
35+
36+
add_subdirectory(tc397)
37+
endif()
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@
33
# see the file kconfig-language.txt in the NuttX tools repository.
44
#
55

6-
if ARCH_BOARD_TC397
7-
endif

0 commit comments

Comments
 (0)