xiaoxiang781216 commented on code in PR #11707:
URL: https://github.com/apache/nuttx/pull/11707#discussion_r1497655022


##########
arch/tricore/include/inttypes.h:
##########
@@ -0,0 +1,126 @@
+/****************************************************************************
+ * arch/tricore/include/inttypes.h
+ *
+ * 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_INTTYPES_H
+#define __ARCH_TRICORE_INCLUDE_INTTYPES_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define _PRI32PREFIX "l"

Review Comment:
   why not directly use "l" or "ll"



##########
arch/tricore/Kconfig:
##########
@@ -0,0 +1,42 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_TRICORE
+comment "Tricore Options"
+
+choice
+       prompt "Tricore Toolchain Selection"
+       default TRICORE_TOOLCHAIN_TASKING
+
+config TRICORE_TOOLCHAIN_TASKING
+       bool "AURIX Tasking C/C++ toolchain"
+       select ARCH_TOOLCHAIN_TASKING
+
+endchoice # Tricore Toolchain Selection
+
+config ARCH_TC3XX
+       bool
+       default n
+
+config ARCH_FAMILY
+       string
+       default "tc3xx"         if ARCH_TC3XX
+
+config ARCH_CHIP
+       string
+       default "tc3xx"         if ARCH_CHIP_TC397

Review Comment:
   tc397



##########
arch/tricore/src/.gitignore:
##########
@@ -0,0 +1,4 @@
+/locked.r

Review Comment:
   why need this entry



##########
arch/tricore/src/common/Toolchain.defs:
##########
@@ -0,0 +1,127 @@
+############################################################################
+# arch/tricore/src/common/Toolchain.defs
+#
+# 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.
+#
+############################################################################
+
+#
+# Supported toolchains
+#
+# Each toolchain definition should set:
+#
+#  CROSSDEV         The GNU toolchain triple (command prefix)
+#  ARCHCPUFLAGS     CPU-specific flags selecting the instruction set
+#                   FPU options, etc.
+#  ARCHOPTIMIZATION The optimization level that results in
+#                   reliable code generation.
+#
+
+ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
+  ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
+else ifeq ($(CONFIG_DEBUG_FULLOPT),y)
+  ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
+    ARCHOPTIMIZATION += -Oz
+  else
+    ARCHOPTIMIZATION += -Os
+  endif
+endif
+
+# Tasking toolchain
+
+CC                = cctc
+CXX               = cctc
+CPP               = cctc $(ARCHOPTIMIZATION)
+LD                = cctc
+STRIP             = strip --strip-unneeded
+AR                = artc -r
+NM                = nm
+OBJCOPY           = echo
+OBJDUMP           = elfdump
+
+ARCHOPTIMIZATION += --lsl-core=vtc
+LDFLAGS          += --lsl-core=vtc
+ARCHOPTIMIZATION += --iso=99
+ARCHOPTIMIZATION += --language=+gcc,+volatile,-strings,-kanji
+
+# pragma align <4> (default: 0)
+
+ARCHOPTIMIZATION += --align=4
+
+# Always use 32-bit integers for enumeration
+
+ARCHOPTIMIZATION += --integer-enumeration
+
+# tradeoff between speed (-t0) and size (-t4) (default: 4)
+
+ARCHOPTIMIZATION += --tradeoff=2
+
+# enable symbolic debug information
+
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+  ARCHOPTIMIZATION += --debug-info=default
+  ARCHOPTIMIZATION += --keep-temporary-files
+  LDFLAGS          += -g
+endif
+
+# merge source code with assembly output
+
+ARCHOPTIMIZATION += --source
+
+# generate alignment depending on assume_if hints
+
+ARCHOPTIMIZATION += --branch-target-align
+
+
+# Since nuttx uses too many of GNU extensions in the implementation of
+# FPU-related library functions, which is not supported in tasking,
+# so currently we cannot use FPU-related configurations to manage it.
+#
+# Just set fp-model to Double Precision:
+# --fp-model[=<flag>,...]         floating-point model (default: cFlnrSTz)
+#   0                               alias for --fp-model=CFLNRStZ (strict)
+#   1                               alias for --fp-model=cFLNRSTZ (precise)
+#   2                               alias for --fp-model=cFlnrSTz (fast-dp)
+#   3                               alias for --fp-model=cflnrSTz (fast-sp)
+
+ARCHOPTIMIZATION += --fp-model=2
+LDFLAGS          += --fp-model=2
+LDFLAGS          += -lfp_fpu
+
+LDFLAGS          += --hex-format=s -Wl-OtxYcL -Wl-mcrfiklsmnoduq
+LDFLAGS          += -lrt
+
+# ctc W500: ["stdio/lib_libvsprintf.c" 884/29] expression without effect

Review Comment:
   should we fix these warning instead disabling them



##########
arch/tricore/src/tc3xx/Kconfig:
##########
@@ -0,0 +1,28 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+comment "TC3XX Configuration Options"
+
+menu "TC3XX Peripheral Support"
+
+# These "hidden" settings determine whether a peripheral option is available
+# for the selected MCU
+
+config TC3XX_HAVE_UART0
+       bool
+       default y

Review Comment:
   remove, should select by other option



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to