Zephyr/nordicnrf52 build fails when using CONFIG_USERSPACE

We set CONFIG_USERSPACE=y in our Zephyr/Nordic NRF52 builds. When building Zephyr for nordicnrf52 (nrf52840_dk) under PlatformIO (any version, we’ve tried them all) with this, the build fails because the underlying Zephyr CMakeLists.txt boilerplate does not create the generated file linker-kobject-prebuilt-rodata.h, which it does when we build natively under Zephyr/NRFConnect. If we set CONFIG_USERSPACE=n then the build completes fine.

Is there anyone in here who knows Zephyr-under-PlatformIO and can tell us what we’re doing wrong?

S’OK, fixed: our mistake was that we were specifying a version for platformio/framework-zephyr and expecting the Nordic platform stuff to match that. If, instead, we find a version of nordicnrf52 which includes the desired version of Zephyr and specify the version number at the platform level, it all flows down nicely and our compilation error goes away.

Another noob problem sorted :-).

No, I fooled myself, I had disabled CONFIG_USERSPACE while debugging something else and had forgotten to switch it back on again.

The problem remains, have tried it on Linux and Windows and a few different versions of Python.

I will raise an issue over in Issues · platformio/platform-nordicnrf52 · GitHub.

1 Like