Manually Building Without West And Mis-Named "sdk-nrf" Repository.

The issue lies in the "Kconfig" for the "sdk-*" repositories.

When you clone them, the folder name is "sdk-*" (eg. "sdk-nrf").

But the Kconfig contains 'source "${ZEPHYR_BASE}/../nrf/subsys/fw_info/Kconfig.template.fw_info_ext_api"'. Note the "/nrf/" path != "sdk-nrf".

So if I:

$ git clone https://github.com/nrfconnect/sdk-zephyr.git
$ git clone https://github.com/nrfconnect/sdk-nrf.git
$ cd ./sdk-zephyr
$ cmake -B build -DCROSS_COMPILE=/usr/bin/arm-none-eabi- -DBOARD=nrf52840dongle_nrf52840 -DCMAKE_PREFIX_PATH=<pathTo>/sdk-zephyr -DZEPHYR_MODULES="<pathTo>/sdk-nrf/" samples/hello_world/

I get:

...

-- Including generated dts.cmake file: <pathTo>/sdk-zephyr/build/zephyr/dts.cmake
warning: HAS_NORDIC_DRIVERS (defined at modules/hal_nordic/Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
- SOC_SERIES_NRF52X (defined at soc/arm/nordic_nrf/nrf52/Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)
...


When I rename that "sdk-nrf" folder to "nrf", I get past that issue, and on to another one:

...
-- Including generated dts.cmake file: <pathTo>/sdk-zephyr/build/zephyr/dts.cmake
warning: the hex symbol NRF_MODEM_LIB_SHMEM_CTRL_SIZE (defined at <pathTo>/nrf/lib/nrf_modem_lib/Kconfig:109) has a non-hex default NRF_MODEM_SHMEM_CTRL_SIZE (undefined)
...

Since I see that value exists in sdk-nrfxlib, I rename that folder and at it to DZEPHYR_MODULES which then results in:

-- Zephyr version: 2.6.99 (<pathTo>/sdk-zephyr), build: e0448d102b8e
CMake Error at <pathTo>/sdk-zephyr/cmake/zephyr_module.cmake:61 (message):
 Unmet or cyclic dependencies in modules:                                                                           
                                                                                                                    
 <pathTo>/nrfxlib/ depends on: ['hal_nordic']
...

So, before, "NRF_MODEM_SHMEM_CTRL_SIZE" was "undefined". And then when I add the module that defines it, it then complains about circle-dependency?

That does not appear to be related to https://devzone.nordicsemi.com/f/nordic-q-a/77751/sdk-v-1-6-project-creation-issue/321288#321288, as I had tested it by putting it all in /wtf/.

I guess as another heads-up (not yet an issue?):

Including boilerplate (Zephyr base (cached)): <pathTo>/sdk-zephyr/cmake/app/boilerplate.cmake 
CMake Deprecation Warning at <pathTo>/sdk-zephyr/cmake/app/boilerplate.cmake:37
(cmake_policy):
 The OLD behavior for policy CMP0079 will be removed from a future version of CMake.

 The cmake-policies(7) manual explains that the OLD behaviors of all
 policies are deprecated and that a policy should be set to OLD only under
 specific short-term circumstances.  Projects should be ported to the NEW
 behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
<pathTo>/sdk-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
<pathTo>/sdk-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
 CMakeLists.txt:5 (find_package)


Parents
  • Hi,

     

    When installing manually, please follow this guide:

    http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/gs_installing.html

     

    The reason why you're seeing errors is because you do not have depending repositories (nrfxlib, hal_nordic etc)

     

    Kind regards,

    Håkon

  • Yeah, I know about that link.

    In my previous post, I had mentioned about how I wanted to do things manually, particularly without "west".

    I'm coming from having started with my ST as my first device, where the build/debug process is quite different. I've also got an espressif device coming and taking a look at their docs, nordic and espressif seem to have a very similar build process.

    With ST, I've got the build down in vscode to manually selecting required code files to boot, compiling with arm-none-eabi-* which archlinux provides and using the cortex-debug vscode extension to flash/debug. Very few requirements compared to nordic and espressif.

    I did have sdk-nrfxlib mentioned added in my OP, but you were right about sdk-hal_nordic and "memfault-firmware-sdk", which I added after encountering that new "memfault" warning.

    But now with: sdk-zephyr, nrf (originally named sdk-nrf), nrfxlib, hal_nordic, memfault-firmware-sdk, I'm somehow back to my original warning:

    warning: HAS_NORDIC_DRIVERS (defined at modules/hal_nordic/Kconfig:7) has direct dependencies 0 with value n, but is
    currently being y-selected by the following symbols:
    - SOC_SERIES_NRF52X (defined at soc/arm/nordic_nrf/nrf52/Kconfig.series:6), with value y, direct dependencies <choi
    ce> (value: y), and select condition <choice> (value: y)

    which came from my updated command:

    cmake -B build -DCMAKE_PREFIX_PATH=/wtf/sdk-zephyr -DCROSS_COMPILE=/usr/bin/arm-none-eabi- -DBOARD=nrf52840dongle_nrf52840 -DZEPHYR_MODULES="/wtf/nrf/;/wtf/nrfxlib/;/wtf/hal_nordic/;/wtf/memfault-firmware-sdk/" samples/hello_world/

    I also neglected to mention the actual Kconfig file in the non sdk-nrf path: sdk-nrf/subsys/bootloader/bl_crypto/Kconfig:129 'source "${ZEPHYR_BASE}/../nrf/subsys/fw_info/Kconfig.template.fw_info_ext_api"'. That was only one of them.

    I'm going to assume that if "west" works, it must be doing something to account for the cloned names where the "sdk-" prefix is removed.

    EDIT0:

    I forgot to add something new I saw, but not sure if it was also there in previous build attempts:

    -- Found BOARD.dts: /wtf/sdk-zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
    nrf52840dongle_nrf52840.dts.pre.tmp:15.39-20.5: Warning (interrupt_provider): /soc/interrupt-controller@e000e100: Missing #address-cells in interrupt provider
    also defined at nrf52840dongle_nrf52840.dts.pre.tmp:370.7-372.3
  • Hi,

     

    vindicator said:
    I'm going to assume that if "west" works, it must be doing something to account for the cloned names where the "sdk-" prefix is removed.

    We only support using west to fix these dependencies.

    Is there a reason why you cannot use west to initialize and clone the depending repositories?

     

    Kind regards,

    Håkon

Reply Children
Related