Skip to content

Commit c080e06

Browse files
committed
arch/tricore: support tc4evb board
add new chip named tc4xx and board tc4evb Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
1 parent 39a9f2f commit c080e06

67 files changed

Lines changed: 7334 additions & 4523 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/platforms/tricore/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ The core Chip implementation is based on Infineon Low Level Drivers (iLLDs).
3131
The unified API is more friendly to developers familiar with Infineon SDK/HAL.
3232
We can get more code examples on Infineon's official Github: `AURIX_code_examples <https://github.com/Infineon/AURIX_code_examples>`__
3333

34-
``TC3xx``
35-
This is the implementation of NuttX on the Infineon’s AURIX™- TC3xx microcontroller family.
34+
``TC3xx/TC4xx``
35+
This is the implementation of NuttX on the Infineon’s AURIX™- TC3xx/TC4xx microcontroller family.
3636

3737
.. toctree::
3838
:maxdepth: 1
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
==================
2+
TRIBOARD_TC4X9_COM
3+
==================
4+
5+
This port should work on TRIBOARD_TC4X9_COM with a proper CPU.
6+
The mandatory CPU features are:
7+
8+
* System Timer (STM)
9+
* Asynchronous Serial Interface(ASCLIN) UART
10+
* IRQs are managed by Interrupt Router(INT), IR Service Request Control Registers(SRC).
11+
12+
Toolchains
13+
==========
14+
15+
Currently, only the Infineon’s AURIX™ GCC toolchain is tested.
16+
17+
Configurations
18+
==============
19+
20+
Common Configuration Notes
21+
--------------------------
22+
23+
1. Each TRIBOARD_TC4X9_COM configuration is maintained in a sub-directory
24+
and can be selected as follow::
25+
26+
tools/configure.sh triboard_tc4x9_com:<subdir>
27+
28+
Where ``<subdir>`` is one of the configuration sub-directories described in
29+
the following paragraph.
30+
31+
NuttX Shell::
32+
33+
tools/configure.sh triboard_tc4x9_com:nsh
34+
35+
2. These configurations use the mconf-based configuration tool. To
36+
change a configurations using that tool, you should:
37+
38+
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
39+
see additional README.txt files in the NuttX tools repository.
40+
41+
b. Execute ``make menuconfig`` in nuttx/ in order to start the
42+
reconfiguration process.
43+
44+
3. By default, all configurations assume the Linux. This is easily
45+
reconfigured::
46+
47+
CONFIG_HOST_LINUX=y
48+
49+
Configuration Sub-Directories
50+
-----------------------------
51+
52+
ostest
53+
------
54+
55+
The "standard" NuttX examples/ostest configuration.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
=============
2+
TriCore/TC4DA
3+
=============
4+
5+
**TriCore/TC4DA** An TriCore flat address port was ported in NuttX-12.0. It
6+
consists of the following features:
7+
8+
- Runs in Supervisor Mode.
9+
- IRQs are managed by Interrupt Router (INT), IR Service Request Control Registers (SRC).
10+
- Used System timer (STM) for systick.
11+
12+
This kernel with ostest have been tested with
13+
14+
- Infineon's AURIX™ TC4DA Evaluation Board: TRIBOARD_TC4X9_COM
15+
16+
Supported Boards
17+
================
18+
19+
.. toctree::
20+
:glob:
21+
:maxdepth: 1
22+
23+
boards/*/*

arch/tricore/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ config HAVE_SECURITY_CORE
126126
if ARCH_CHIP_TC3XX
127127
source "arch/tricore/src/tc3xx/Kconfig"
128128
endif
129+
if ARCH_CHIP_TC4XX
130+
source "arch/tricore/src/tc4xx/Kconfig"
131+
endif
129132
if ARCH_CHIP_TC397
130133
source "arch/tricore/src/tc397/Kconfig"
131134
endif
135+
if ARCH_CHIP_TC4DA
136+
source "arch/tricore/src/tc4da/Kconfig"
137+
endif
132138
endif # ARCH_TRICORE

arch/tricore/include/irq.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extern "C"
157157
/****************************************************************************
158158
* Public Types
159159
****************************************************************************/
160+
160161
struct xcptcontext
161162
{
162163
#ifdef CONFIG_ENABLE_ALL_SIGNALS

arch/tricore/include/tc4da/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/tc4da/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_TC4DA_CHIP_H
24+
#define __ARCH_TRICORE_INCLUDE_TC4DA_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_TC4DA_CHIP_H */

arch/tricore/include/tc4da/irq.h

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/****************************************************************************
2+
* arch/tricore/include/tc4da/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_TC4DA_IRQ_H
28+
#define __ARCH_TRICORE_INCLUDE_TC4DA_IRQ_H
29+
30+
/****************************************************************************
31+
* Included Files
32+
****************************************************************************/
33+
34+
/****************************************************************************
35+
* Pre-processor Prototypes
36+
****************************************************************************/
37+
38+
#define TRICORE_UART_RX_IRQ 173
39+
40+
/****************************************************************************
41+
* Public Types
42+
****************************************************************************/
43+
44+
/****************************************************************************
45+
* Inline functions
46+
****************************************************************************/
47+
48+
/****************************************************************************
49+
* Public Data
50+
****************************************************************************/
51+
52+
/****************************************************************************
53+
* Public Function Prototypes
54+
****************************************************************************/
55+
56+
#ifndef __ASSEMBLY__
57+
#ifdef __cplusplus
58+
#define EXTERN extern "C"
59+
extern "C"
60+
{
61+
#else
62+
#define EXTERN extern
63+
#endif
64+
65+
#undef EXTERN
66+
#ifdef __cplusplus
67+
}
68+
#endif
69+
#endif
70+
71+
#endif /* __ARCH_TRICORE_INCLUDE_TC4DA_IRQ_H */

arch/tricore/src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# the License.
2020
#
2121
# ##############################################################################
22+
2223
add_subdirectory(${ARCH_SUBDIR})
2324
add_subdirectory(${NUTTX_CHIP_ABS_DIR} EXCLUDE_FROM_ALL exclude_chip)
2425
add_subdirectory(common)

arch/tricore/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
include $(TOPDIR)/Make.defs
2424
include chip/Make.defs
25+
include common/Make.defs
2526

2627
ifeq ($(CONFIG_ARCH_CHIP_TC3XX),y)
2728
ARCH_SUBDIR = tc3xx

arch/tricore/src/cmake/ToolchainGnuc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ elseif(CONFIG_ARCH_CHIP_TC4XX)
3131
set(ARCH_SUBDIR tc4xx)
3232
endif()
3333

34-
include(chip.cmake)
34+
include(${CMAKE_CURRENT_LIST_DIR}/chip.cmake)
3535

3636
set(TOOLCHAIN_PREFIX tricore-elf)
3737
set(CMAKE_LIBRARY_ARCHITECTURE ${TOOLCHAIN_PREFIX})

0 commit comments

Comments
 (0)