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

CMake Support for The JH7110 Board #11870

Open
theoparis opened this issue Mar 8, 2024 · 3 comments
Open

CMake Support for The JH7110 Board #11870

theoparis opened this issue Mar 8, 2024 · 3 comments

Comments

@theoparis
Copy link

I need to add cmake support because Kconfig refuses to use LLVM/Clang for this board.

I am considering making a PR for this, however I ran into an issue with cmake as well. Removing this line https://github.com/apache/nuttx/blob/master/CMakeLists.txt#L401 let me use a custom clang executable for the toolchain. Without it, CMake tries to find riscv64-unknown-elf-gcc which I don't have. I'd rather not build gcc multiple times for different targets - that's why I'm using LLVM.

@theoparis
Copy link
Author

I just ran into this #11861

@theoparis
Copy link
Author

Update: I managed to compile using kconfig with clang after editing Makefile.defs to add the following:

CC = clang
CXX = clang++
ARCHCPUFLAGS = --target=riscv64-unknown-none -march=rv64gc_zifencei_zicsr -mabi=lp64d

I also added CONFIG_LIBM=y and unset the gnu toolchain options in .config.
image

It'd still be nice to have cmake support but that'll have to wait for the above issue to be solved.

@acassis
Copy link
Contributor

acassis commented Mar 11, 2024

@theoparis thank you for your effort trying to add support for CMakefile to compile this board.

As @anchao explained currently CMakefile has support only for building NuttX in FLAT mode (for MCUs without MPU), so PROTECTED mode (for MCUs with MPU) and KERNEL mode (processors with MMU) are not supported it.

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

No branches or pull requests

2 participants