# Copyright (c) 2026 Eclipse ThreadX contributors # SPDX-License-Identifier: MIT # Portions of this file were generated with AI assistance. # # Toolchain file for Arm Cortex-R52 (Armv8-R, AArch32) using GNU tools. # Name of the target set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_PROCESSOR cortex-r52) set(THREADX_ARCH "cortex_r52") set(THREADX_TOOLCHAIN "gnu") # Floating-point ABI. Cortex-R52 always implements at least a single-precision # FPU -- GCC rejects "+nofp" for this core and offers only "+nofp.dp" (drop # double precision). There is therefore no FPU-less R52, so the soft-float # baseline selects the soft *ABI* rather than removing the FPU. The hard-float # variant with lazy VFP context save arrives with AR1 milestone M5. if(NOT DEFINED TX_R52_FLOAT_ABI) set(TX_R52_FLOAT_ABI "soft" CACHE STRING "R52 float ABI: soft | hard") endif() set(MCPU_FLAGS "-marm -mcpu=cortex-r52") if(TX_R52_FLOAT_ABI STREQUAL "hard") set(VFP_FLAGS "-mfpu=fpv5-d16 -mfloat-abi=hard") else() set(VFP_FLAGS "-mfloat-abi=soft") endif() set(SPEC_FLAGS "--specs=nosys.specs") include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake) # Pin the project's reference cross toolchain, GCC 14 for Arm. An absolute # path is used deliberately, so that a build on a machine which has it does not # depend on PATH ordering. Override with -DARM_TOOLCHAIN_PATH=