libcsp / libcsp-zephyr

Apache License 2.0
0 stars 3 forks source link

Please elaborate the usage #4

Open jganser opened 1 month ago

jganser commented 1 month ago

Hi, I am new to Zephyr and would like to build the libcsp test from this repository.

I tried using the Getting Started approach by creating a zephyrproject workspace. And then using west init and west update. With this I am able to build samples like blinky just fine. So next I started with this:

cd <path/to/zephyrproject>
git clone git@github.com:libcsp/libcsp-zephyr.git
west build -p always -b qemu_cortex_m3 libcsp-zephyr

But as result I get:

/home/johannes/zarm/zephyrproject/libcsp-zephyr/prj.conf:2: warning: attempt to assign the value 'y' to the undefined symbol LIBCSP
Parsing /home/johannes/zarm/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/johannes/zarm/zephyrproject/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3_defconfig'
Merged configuration '/home/johannes/zarm/zephyrproject/libcsp-zephyr/prj.conf'

error: Aborting due to Kconfig warnings

CMake Error at /home/johannes/zarm/zephyrproject/zephyr/cmake/modules/kconfig.cmake:389 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/johannes/zarm/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:132 (include)
  /home/johannes/zarm/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/johannes/zarm/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)
...

So my guess is that I don't understand the module usage correctly yet. Sadly the official Zephyr documentation was more confusing than helpful, at the current moment.

Therefore, I would like to ask for some direct insides from you :)

Sincerely, jganser

jganser commented 1 month ago

Okay, I found out that I can build the project by using a separate workspace that gets generated in the parent directory of the libcsp-zephyr repository, by using west init -l. Though I am happy that I was able to build it, it still recloned zephyrproject-rtos... Is there another way to get it to include the libcsp module other than creating a separate workspace?

yashi commented 1 month ago

Just added build instruction to README. Hope it helps.

yashi commented 1 month ago

BTW, the following repos are mirrors.