simbit18 opened a new pull request, #14892:
URL: https://github.com/apache/nuttx/pull/14892
## Summary
This issue is related to the Arm toolchain for Windows which is available
for x86 host architecture only (compatible with x86_64)
```
Windows (mingw-w64-i686) hosted cross toolchains
AArch32 bare-metal target (arm-none-eabi)
```
Issue
`/bin/sh: line 1:
/home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-ar: Argument
list too long`
On Windows, arm-none-eabi-ar can only accept strings up to a maximum length
of 32,768 characters.
We could suppress the 32K include string limitation by setting the CMake
variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON.
This is unfortunately not enough!!! ):
In the build phase this error comes out
```
$ cmake --build build
[2/1025] Building ASM object
arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj FAILED:
arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj
/home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-gcc.exe
@arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.rsp -MD -MT
arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -MF
arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.d -o
arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -c
/home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S
C:/msys64/home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S:42:10:
fatal error: nuttx/config.h: No such file or directory
42 | #include <nuttx/config.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
```
The Workround I found to solve this problem is to overwrite the responsible
file flag CMAKE_${lang}_RESPONSE_FILE_FLAG with $DEFINES $INCLUDES $FLAGS
workflows/build.yml
Enable CMake+Ninja for Msys2
#14014
https://github.com/apache/nuttx-apps/issues/2672
## Impact
Impact on user: No changes to user-facing functionality
Impact on build: Build process remains the same
## Testing
[Github linux and
msys2](https://github.com/simbit18/nuttx_test_pr/actions/runs/11954180521)
local msys2
```
$ cmake -B build -DBOARD_CONFIG=nucleo-l152re:nsh -GNinja
-- Initializing NuttX
Select HOST_WINDOWS=y
Select WINDOWS_MSYS=y
-- CMake: 3.28.1
-- Ninja: 1.11.1
-- Board: nucleo-l152re
-- Config: nsh
-- Appdir: /home/nuttx/nxninja/apps
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- The ASM compiler identification is GNU
-- Found assembler:
/home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-gcc.exe
-- Configuring done (16.9s)
-- Generating done (8.0s)
-- Build files have been written to: /home/nuttx/nxninja/nuttx/build
$ cmake --build build
[27/1025] Building C object
arch/CMakeFiles/arch.dir/arm/src/stm32/stm32_gpio.c.obj
C:/msys64/home/nuttx/nxninja/nuttx/arch/arm/src/stm32/stm32_gpio.c:41:11:
note: '#pragma message: CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated
migrate board.h see tools/stm32_pinmap_tool.py'
41 | # pragma message "CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated
migrate board.h see tools/stm32_pinmap_tool.py"
| ^~~~~~~
[1022/1025] Linking C executable nuttx
Memory region Used Size Region Size %age Used
flash: 55500 B 512 KB 10.59%
sram: 3700 B 80 KB 4.52%
[1025/1025] Generating System.map
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]