Building llext-edk with NCS 2.9 and 3.0 failing due to unknown target "llext-edk"

I am currently trying to get LLEXTs to work on the nRF5340 Audio DK. I was able to compile an llext and load it successfully, using the cmake features, However, I would like to build the extension separately and therefore need the llext-edk to work. I tried building my app as well as the edk example with both NCS 2.9 and the NCS 3.0 preview. Both are building the app just fine, but when I call west build -t llext-edk, I get the following error:

-- west build: running target llext-edk
ninja: error: unknown target 'llext-edk'
FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake --build /EmbeddedApps/EmbeddedAppsPoC/build --target llext-edk
 

I also tried to build for the qemu_cortex_r5 board just like in the example, but that didn't change anything. In my app I enabled LLEXT like this in the prj.conf:

CONFIG_LLEXT=y
CONFIG_LLEXT_HEAP_SIZE=256
CONFIG_LLEXT_TYPE_ELF_OBJECT=y

Is the llext-edk even supported at this moment as the documentation and the example suggest? Any help is greatly appreciated. Thanks in advance

Parents
  • Hi,

    This feature is very much Zephyr and very little Nordic so I don't know how much support there is for using it with Nordic devices other than it existing in the downstream fork of Zephyr that we have in the SDK.

    Could you try to see if you're able to compile and run the steps using standalone Zephyr upstream?

    You might also want to investigate the Zephyr discord forums and see if there's any other users who's been testing LLEXT with Nordic and Non-nordic devices. Searches on the Devzone forums results in very few hits at least. 

    Kind regards,
    Andreas

  • I did a fresh install of West in a Python venv and tried building the example with plain Zephyr. I tried it with Zephyr 4.1 and Zephyr 4.0. Building the Zephyr llext/edk/app example worked fine for both versions, even with the llext-edk target, but building the NCS example results in this error for the application build:

    File "/opt/nordic/ncs/v3.0.0-preview1/zephyr/scripts/build/gen_kobject_list.py", line 62, in <module>
        import elftools
    ModuleNotFoundError: No module named 'elftools'

    I seem to only have problems with llext-edk on NCS, that's why I am asking here. Is the llext-edk supposed to work in NCS? The documentation indicates so. I also can't imagine what NCS might be doing differently than the upstream in order to not find the target at all.

    In terms of building with the standalone Zephyr upstream, is this supposed to work on NCS projects? I suppose there are quite a few changes that a NCS project expects from Zephyr in order to build correctly, especially when building an LE audio firmware.

Reply
  • I did a fresh install of West in a Python venv and tried building the example with plain Zephyr. I tried it with Zephyr 4.1 and Zephyr 4.0. Building the Zephyr llext/edk/app example worked fine for both versions, even with the llext-edk target, but building the NCS example results in this error for the application build:

    File "/opt/nordic/ncs/v3.0.0-preview1/zephyr/scripts/build/gen_kobject_list.py", line 62, in <module>
        import elftools
    ModuleNotFoundError: No module named 'elftools'

    I seem to only have problems with llext-edk on NCS, that's why I am asking here. Is the llext-edk supposed to work in NCS? The documentation indicates so. I also can't imagine what NCS might be doing differently than the upstream in order to not find the target at all.

    In terms of building with the standalone Zephyr upstream, is this supposed to work on NCS projects? I suppose there are quite a few changes that a NCS project expects from Zephyr in order to build correctly, especially when building an LE audio firmware.

Children
No Data
Related