You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/27 10:12:15 UTC

[GitHub] [incubator-nuttx] davids5 commented on a diff in pull request #6718: add CMake build system support (Enhance #3704)

davids5 commented on code in PR #6718:
URL: https://github.com/apache/incubator-nuttx/pull/6718#discussion_r930874658


##########
arch/arm/cmake/Platform.cmake:
##########
@@ -0,0 +1,97 @@
+############################################################################
+# arch/arm/cmake/Platform.cmake
+#
+# 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.
+#
+############################################################################
+
+# configure target processor
+
+if (CONFIG_ARCH_CORTEXM0)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m0)
+elseif (CONFIG_ARCH_CORTEXM3)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m3)
+elseif (CONFIG_ARCH_CORTEXM4)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m4)
+elseif (CONFIG_ARCH_CORTEXM7)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m7)
+elseif (CONFIG_ARCH_CORTEXM23)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m23)
+elseif (CONFIG_ARCH_CORTEXM33)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m33)
+elseif (CONFIG_ARCH_CORTEXM35P)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m35p)
+elseif (CONFIG_ARCH_CORTEXM55)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-m55)
+elseif (CONFIG_ARCH_CORTEXA5)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-a5)
+elseif (CONFIG_ARCH_CORTEXA7)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-a7)
+elseif (CONFIG_ARCH_CORTEXA8)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-a8)
+elseif (CONFIG_ARCH_CORTEXA9)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-a9)
+elseif (CONFIG_ARCH_CORTEXR4)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-r4)
+elseif (CONFIG_ARCH_CORTEXR5)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-r5)
+elseif (CONFIG_ARCH_CORTEXR7)
+  set(CMAKE_SYSTEM_PROCESSOR cortex-r7)
+else()
+  message(FATAL_ERROR "processor not set")

Review Comment:
   ```suggestion
     message(FATAL_ERROR "CMAKE_SYSTEM_PROCESSOR not set")
   ```



##########
arch/arm/src/armv7-m/CMakeLists.txt:
##########
@@ -0,0 +1,51 @@
+############################################################################
+# arch/arm/src/armv7-m/CMakeLists.txt
+#
+# 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.
+#
+############################################################################
+
+# TODO: do not use config to detect this
+
+set(SRCS
+  arm_exception.S arm_busfault.c arm_cache.c arm_doirq.c

Review Comment:
   Lets do 1 per line



-- 
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-unsubscribe@nuttx.apache.org

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