Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riscv/cmake: protected mode issue #12019

Open
yf13 opened this issue Mar 28, 2024 · 3 comments · May be fixed by #12022
Open

riscv/cmake: protected mode issue #12019

yf13 opened this issue Mar 28, 2024 · 3 comments · May be fixed by #12022

Comments

@yf13
Copy link
Contributor

yf13 commented Mar 28, 2024

Here are issues encountered with PROTECTED mode risc-v device after commit 741de4b45055a7faec0d applied:

$ 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
CMake Error at cmake/nuttx_add_library.cmake:97 (add_library):
  Cannot find source file:

    /home/yf/Projects/Nuttx/nuttx/libs/libc/spawn/lib_task_spawn.c
Call Stack (most recent call first):
  cmake/nuttx_add_library.cmake:129 (nuttx_add_system_library)
  libs/libc/CMakeLists.txt:20 (nuttx_add_kernel_library)


CMake Error at CMakeLists.txt:422 (add_executable):
  No SOURCES given to target: nuttx_user


CMake Error at cmake/nuttx_add_library.cmake:135 (add_library):
  No SOURCES given to target: kc
Call Stack (most recent call first):
  libs/libc/CMakeLists.txt:20 (nuttx_add_kernel_library)


CMake Generate step failed.  Build files cannot be regenerated correctly.
@xiaoxiang781216
Copy link
Contributor

@xuxin930 could you take a look?

@xuxin930
Copy link
Contributor

hi @yf13
try this patch #12022

to use protected mode, you need to add the userspace source file of the kernel directory.

@acassis
Copy link
Contributor

acassis commented Mar 29, 2024

@yf13 if it worked, please submit a documentation similar to this one: https://nuttx.apache.org/docs/latest/platforms/arm/stm32f4/index.html#protected-mode-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants