summaryrefslogtreecommitdiff
path: root/test/tx/cmake/module_qemu/arm-none-eabi-qemu.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'test/tx/cmake/module_qemu/arm-none-eabi-qemu.cmake')
-rw-r--r--test/tx/cmake/module_qemu/arm-none-eabi-qemu.cmake37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/tx/cmake/module_qemu/arm-none-eabi-qemu.cmake b/test/tx/cmake/module_qemu/arm-none-eabi-qemu.cmake
new file mode 100644
index 00000000..a543c9d4
--- /dev/null
+++ b/test/tx/cmake/module_qemu/arm-none-eabi-qemu.cmake
@@ -0,0 +1,37 @@
+# Copyright (c) 2026 Eclipse ThreadX contributors
+#
+# This program and the accompanying materials are made available under the
+# terms of the MIT License which is available at
+# https://opensource.org/licenses/MIT.
+#
+# AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5.5).
+# The AI-generated portions may be considered public domain (CC0-1.0)
+# and not subject to the project's licence. The human contributor has
+# reviewed and verified that the code is correct.
+#
+# SPDX-License-Identifier: MIT and CC0-1.0
+
+# Toolchain for the module execution harness.
+#
+# Deliberately not cmake/cortex_m3.cmake or cmake/cortex_m4.cmake. Those add
+# -mlong-calls to every C file, and under -fpic that routes every call in a
+# module through its GOT, including the shell entry's call to the function that
+# fills the GOT in; and they leave the floating-point unit off, which the
+# Cortex-M4 module port needs on to exercise its lazy-stacking paths. The CPU
+# and FPU flags are chosen per port in CMakeLists.txt instead.
+
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR arm)
+
+set(CMAKE_C_COMPILER arm-none-eabi-gcc)
+set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
+set(CMAKE_OBJCOPY arm-none-eabi-objcopy CACHE FILEPATH "objcopy")
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+# Compiler checks build a static library, so they need no startup code or
+# linker script.
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)