cmake:fix protected build link option break,init canmv230 protected build
Summary
this should resolve https://github.com/apache/nuttx/issues/12019#issuecomment-2024806454
the link_option of nuttx_user target should be allowed to be set freely
Impact
protected mode
Testing
cmake -B build -DBOARD_CONFIG=canmv230/pnsh
cmake --build build
@xuxin930 @xiaoxiang781216 any idea why the CI reported this issue many times:
Check failure on line 51 in include/nuttx/wdog.h GitHub Actions / macOS (macos)
missing binary operator before token "("
@acassis @xiaoxiang781216 The problem is here https://github.com/apache/nuttx/actions/runs/8479414330/job/23233475816?pr=12022#step:7:1313 Configuring... make: *** [olddefconfig] Error 1 Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI make: *** [olddefconfig] Error 1
I think clearing the cache solves the problem https://github.com/apache/nuttx/actions/caches
@acassis @xiaoxiang781216 The problem is here https://github.com/apache/nuttx/actions/runs/8479414330/job/23233475816?pr=12022#step:7:1313 Configuring... make: *** [olddefconfig] Error 1 Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI make: *** [olddefconfig] Error 1
I think clearing the cache solves the problem https://github.com/apache/nuttx/actions/caches
@acassis @simbit18 It seems that similar situations have happened before refer to: https://github.com/apache/nuttx/pull/10543
@xuxin930 exactly !!! cache must be cleared manually.
@xuxin930
I tried this and it works, the artifact runs on CanMV230 device as well:
ABC
NuttShell (NSH) NuttX-12.4.0
nsh> cat /proc/version
NuttX version 12.4.0 da63218c4d Apr 5 2024 08:03:09 canmv230/pnsh
nsh> free
total used free maxused maxfree nused nfree
Kmem: 1034232 5816 1028416 6408 1028368 16 2
Umem: 1045112 6040 1039072 6040 1039072 9 1
Only one minor issue met during CMake configuration process:
$ rm -rf * && cmake ~/Projects/Nuttx/nuttx -DBOARD_CONFIG=canmv230/pnsh -G Ninja
-- Initializing NuttX
-- Board: canmv230
-- Config: pnsh
-- Appdir: /home/yf/Projects/Nuttx/nuttx/../apps
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/riscv64-unknown-elf-gcc
riscv64-unknown-elf-gcc: error: -Wstrict-prototypes -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas: No such file or directory
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yf/tmp/bbb
@xuxin930,
Here I tried this again with GCC toolchain v10.2 got via apt install gcc-riscv64-unknown-elf on Ubuntu.
It seems that we can avoid the above cmake config time warning by dropping the CMAKE_C_FLAGS from the libgcc checking command in line 755.
@xuxin930 should we rebase the code
@xuxin930 should we rebase the code
Done, rebased
CI seems failed because fetch timeout try retrigger