mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
CMake: arm/armv8-r: init armv8-r cmake build
Test cmake build on aarch32 fvp: $ cmake -B build -DBOARD_CONFIG=fvp-armv8r-aarch32/nsh -GNinja $ cmake --build build Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
+8
-1
@@ -83,7 +83,7 @@ config ARCH_CHIP_AM335X
|
||||
|
||||
config ARCH_CHIP_FVP_ARMV8R_AARCH32
|
||||
bool "ARM FVP virt platform (ARMv8r AARCH32)"
|
||||
select ARCH_ARMV8R
|
||||
select ARCH_CORTEXR52
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
select ARCH_HAVE_FETCHADD
|
||||
select ARMV8R_HAVE_DECODEFIQ
|
||||
@@ -926,6 +926,13 @@ config ARCH_CORTEXR7
|
||||
select ARCH_HAVE_MPU
|
||||
select ARCH_HAVE_TESTSET
|
||||
|
||||
config ARCH_CORTEXR52
|
||||
bool
|
||||
default n
|
||||
select ARCH_ARMV8R
|
||||
select ARCH_HAVE_MPU
|
||||
select ARCH_HAVE_TESTSET
|
||||
|
||||
config ARCH_ARMV8M
|
||||
bool
|
||||
default n
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# ##############################################################################
|
||||
# arch/arm/src/armv8-r/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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
# The vector table
|
||||
|
||||
set(SRCS arm_vectortab.S)
|
||||
|
||||
# Common assembly language files
|
||||
|
||||
list(APPEND SRCS arm_head.S arm_vectors.S arm_saveusercontext.S)
|
||||
|
||||
# Common C source files
|
||||
|
||||
list(
|
||||
APPEND
|
||||
SRCS
|
||||
arm_arch_timer.c
|
||||
arm_cache.c
|
||||
arm_cpuinfo.c
|
||||
arm_dataabort.c
|
||||
arm_doirq.c
|
||||
arm_gicv3.c
|
||||
arm_initialstate.c
|
||||
arm_prefetchabort.c
|
||||
arm_schedulesigaction.c
|
||||
arm_sigdeliver.c
|
||||
arm_syscall.c
|
||||
arm_tcbinfo.c
|
||||
arm_undefinedinsn.c
|
||||
arm_perf.c
|
||||
cp15_cacheops.c)
|
||||
|
||||
if(CONFIG_ARCH_FPU)
|
||||
list(APPEND SRCS arm_fpucmp.c arm_fpuconfig.S)
|
||||
endif()
|
||||
|
||||
target_sources(arch PRIVATE ${SRCS})
|
||||
@@ -29,6 +29,8 @@ if(CONFIG_ARCH_ARMV7A) # ARMv7-A
|
||||
set(ARCH_SUBDIR armv7-a)
|
||||
elseif(CONFIG_ARCH_ARMV7R) # ARMv7-R
|
||||
set(ARCH_SUBDIR armv7-r)
|
||||
elseif(CONFIG_ARCH_ARMV8R) # ARMv8-R
|
||||
set(ARCH_SUBDIR armv8-r)
|
||||
elseif(CONFIG_ARCH_ARMV7M) # ARMv7-M
|
||||
set(ARCH_SUBDIR armv7-m)
|
||||
elseif(CONFIG_ARCH_ARMV8M) # ARMv8-M
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# ##############################################################################
|
||||
# arch/arm/src/cmake/armv8-r.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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(PLATFORM_FLAGS)
|
||||
|
||||
if(CONFIG_ARCH_CORTEXR52)
|
||||
list(APPEND PLATFORM_FLAGS -mcpu=cortex-r52)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_FPU)
|
||||
list(APPEND PLATFORM_FLAGS -mfpu=vfpv3-d16)
|
||||
if(CONFIG_ARM_FPU_ABI_SOFT)
|
||||
list(APPEND PLATFORM_FLAGS -mfloat-abi=softfp)
|
||||
else()
|
||||
list(APPEND PLATFORM_FLAGS -mfloat-abi=hard)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND PLATFORM_FLAGS -mfloat-abi=soft)
|
||||
endif()
|
||||
|
||||
add_compile_options(${PLATFORM_FLAGS})
|
||||
@@ -50,6 +50,8 @@ elseif(CONFIG_ARCH_CORTEXR5)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-r5)
|
||||
elseif(CONFIG_ARCH_CORTEXR7)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-r7)
|
||||
elseif(CONFIG_ARCH_CORTEXR52)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-r8)
|
||||
else()
|
||||
message(FATAL_ERROR "CMAKE_SYSTEM_PROCESSOR not set")
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# ##############################################################################
|
||||
# arch/arm/src/fvp-v8r-aarch32/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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS fvp_boot.c fvp_serial.c)
|
||||
|
||||
target_sources(arch PRIVATE ${SRCS})
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
@@ -0,0 +1,29 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS fvp_boardinit.c fvp_bringup.c)
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS fvp_appinit.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/dramboot.ld")
|
||||
Reference in New Issue
Block a user