Skip to content

Commit 79f26a9

Browse files
authored
cmake: Enhance target selection for ARM architectures with FPU (#4185)
Improve the target selection logic for ARM architectures in the NuttX platform configuration. * Added support for FPU detection in THUMB and ARM targets * Ensured correct target is set based on architecture and configuration options Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
1 parent 4e50d21 commit 79f26a9

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

product-mini/platforms/nuttx/CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ set(WAMR_BUILD_PLATFORM nuttx)
77
if(CONFIG_ARCH_ARMV6M)
88
set(WAMR_BUILD_TARGET THUMBV6M)
99
elseif(CONFIG_ARCH_ARMV7A)
10-
set(WAMR_BUILD_TARGET THUMBV7)
10+
if(CONFIG_ARM_THUMB)
11+
if(CONFIG_ARCH_FPU)
12+
set(WAMR_BUILD_TARGET THUMBV7_VFP)
13+
else()
14+
set(WAMR_BUILD_TARGET THUMBV7)
15+
endif()
16+
else()
17+
if(CONFIG_ARCH_FPU)
18+
set(WAMR_BUILD_TARGET ARMV7_VFP)
19+
else()
20+
set(WAMR_BUILD_TARGET ARMV7)
21+
endif()
22+
endif()
1123
elseif(CONFIG_ARCH_ARMV7M)
1224
set(WAMR_BUILD_TARGET THUMBV7EM)
1325
elseif(CONFIG_ARCH_ARMV8M)

0 commit comments

Comments
 (0)