diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dea4e3904d7..b663dd3f49c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -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 diff --git a/arch/arm/src/armv8-r/CMakeLists.txt b/arch/arm/src/armv8-r/CMakeLists.txt new file mode 100644 index 00000000000..79a08e37f86 --- /dev/null +++ b/arch/arm/src/armv8-r/CMakeLists.txt @@ -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}) diff --git a/arch/arm/src/cmake/Toolchain.cmake b/arch/arm/src/cmake/Toolchain.cmake index 8039952d9d9..7f812dae8be 100644 --- a/arch/arm/src/cmake/Toolchain.cmake +++ b/arch/arm/src/cmake/Toolchain.cmake @@ -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 diff --git a/arch/arm/src/cmake/armv8-r.cmake b/arch/arm/src/cmake/armv8-r.cmake new file mode 100644 index 00000000000..9b026c72be4 --- /dev/null +++ b/arch/arm/src/cmake/armv8-r.cmake @@ -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}) diff --git a/arch/arm/src/cmake/platform.cmake b/arch/arm/src/cmake/platform.cmake index 5337cf994d0..a7c43d3659f 100644 --- a/arch/arm/src/cmake/platform.cmake +++ b/arch/arm/src/cmake/platform.cmake @@ -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() diff --git a/arch/arm/src/fvp-v8r-aarch32/CMakeLists.txt b/arch/arm/src/fvp-v8r-aarch32/CMakeLists.txt new file mode 100644 index 00000000000..51834e91095 --- /dev/null +++ b/arch/arm/src/fvp-v8r-aarch32/CMakeLists.txt @@ -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}) diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/CMakeLists.txt b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/CMakeLists.txt new file mode 100644 index 00000000000..5a331f2f473 --- /dev/null +++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/CMakeLists.txt @@ -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) diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt new file mode 100644 index 00000000000..8867f7f2c0a --- /dev/null +++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt @@ -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")