This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK V1.5.0 west build -b nrf9160_nrf52840 fails

In my quest to gain access to the nor memory on the nrf9160-dk I have found what happened to the WP and HOLD signals and now external_flash_pins_routing configuration setting. To me since the nrf52840 controls the external_flash_pins_routing signal that means I need to build nrf9160_nfr52840, taking baby steps I tried the example at nRF9160 DK - nRF52840 — Zephyr Project Documentation (nordicsemi.com)  hello world with -> west build -b nrf9160dk_nrf52840  worked but west build -b [email protected] fails

D:\ncs\v1.5.0\zephyr\samples\hello_world>west build -b nrf9160dk_nrf52840
-- west build: generating a build system
Including boilerplate (Zephyr base): D:/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/ncs/v1.5.0/zephyr/samples/hello_world
-- Using NCS Toolchain 1.5.0 for building. (D:/ncs/v1.5.0/toolchain/cmake)
-- Zephyr version: 2.4.99 (D:/ncs/v1.5.0/zephyr)
-- Found Python3: D:/ncs/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf52840, Revision: 0.7.0
-- Cache files will be written to: D:/ncs/v1.5.0/zephyr/.cache
-- Found dtc: D:/ncs/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (D:/ncs/v1.5.0/toolchain/opt)
-- Found BOARD.dts: D:/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840.dts
-- Generated zephyr.dts: D:/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/include/generated/device_extern.h
Parsing D:/ncs/v1.5.0/zephyr/Kconfig
Loaded configuration 'D:/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_defconfig'
Merged configuration 'D:/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_7_0.conf'
Merged configuration 'D:/ncs/v1.5.0/zephyr/samples/hello_world/prj.conf'
Configuration saved to 'D:/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/.config'
Kconfig header saved to 'D:/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/ncs/v1.5.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: D:/ncs/v1.5.0/zephyr/samples/hello_world/build
-- west build: building application
[138/143] Linking C executable zephyr\zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       19968 B         1 MB      1.90%
            SRAM:        5824 B       256 KB      2.22%
        IDT_LIST:          72 B         2 KB      3.52%
[143/143] Linking C executable zephyr\zephyr.elf


D:\ncs\v1.5.0\zephyr\samples\hello_world>west build -b [email protected] --pristine
-- west build: making build dir D:\ncs\v1.5.0\zephyr\samples\hello_world\build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): D:/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/ncs/v1.5.0/zephyr/samples/hello_world
-- Using NCS Toolchain 1.5.0 for building. (D:/ncs/v1.5.0/toolchain/cmake)
-- Zephyr version: 2.4.99 (D:/ncs/v1.5.0/zephyr)
-- Found Python3: D:/ncs/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf52840, Revision: 0.15.0 (Active: 0.14.0)
-- Cache files will be written to: D:/ncs/v1.5.0/zephyr/.cache
-- Found dtc: D:/ncs/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (D:/ncs/v1.5.0/toolchain/opt)
-- Found BOARD.dts: D:/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840.dts
-- Found devicetree overlay: D:/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
Error: nrf9160dk_nrf52840.dts.pre.tmp:544.9-10 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at D:/ncs/v1.5.0/zephyr/cmake/dts.cmake:205 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  D:/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake:533 (include)
  D:/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  D:/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'D:\ncs\v1.5.0\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=D:\ncs\v1.5.0\toolchain\opt\bin\python.exe' '-BD:\ncs\v1.5.0\zephyr\samples\hello_world\build' '-SD:\ncs\v1.5.0\zephyr\samples\hello_world' -GNinja [email protected]

D:\ncs\v1.5.0\zephyr\samples\hello_world>

Next was blinky, complete failure with or without version.

At any rate, since I can't use version I can't get nrf9160dk_nrf52840_0_14_0.overlay to be used and I can't get

        external_flash_pins_routing: switch-ext-mem-ctrl {
            compatible = "nordic,nrf9160dk-optional-routing";
            control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
            status = "ok";

I would love to use nrf9160dk_nrf52840_defconfig to set external_flash_pins_routing but I've no idea what it is called in deconfig

Parents
  • I'm not able to reproduce your error. I did the following:

    • Installed NCS v1.5.0 through the Toolchain Manager
    • Set the external_flash_pins_routing status to "ok" (I also tried with "okay", which is the correct way of setting it)
    • I built it successfully (it worked both when using "ok" as well as "okay"):

    C:\Users\Simon\ncs\v1.5.0\zephyr\samples\hello_world>west build -b [email protected] --pristine
    -- west build: generating a build system
    Including boilerplate (Zephyr base): C:/Users/Simon/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world
    -- Using NCS Toolchain 1.5.0 for building. (C:/Users/Simon/ncs/v1.5.0/toolchain/cmake)
    -- Zephyr version: 2.4.99 (C:/Users/Simon/ncs/v1.5.0/zephyr)
    -- Found Python3: C:/Users/Simon/ncs/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf52840, Revision: 0.15.0 (Active: 0.14.0)
    -- Cache files will be written to: C:/Users/Simon/ncs/v1.5.0/zephyr/.cache
    -- Found dtc: C:/Users/Simon/ncs/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Users/Simon/ncs/v1.5.0/toolchain/opt)
    -- Found BOARD.dts: C:/Users/Simon/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840.dts
    -- Found devicetree overlay: C:/Users/Simon/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
    -- Generated zephyr.dts: C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/include/generated/device_extern.h
    Parsing C:/Users/Simon/ncs/v1.5.0/zephyr/Kconfig
    Loaded configuration 'C:/Users/Simon/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_defconfig'
    Merged configuration 'C:/Users/Simon/ncs/v1.5.0/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.conf'
    Merged configuration 'C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world/prj.conf'
    Configuration saved to 'C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/.config'
    Kconfig header saved to 'C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/Users/Simon/ncs/v1.5.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/Simon/ncs/v1.5.0/zephyr/samples/hello_world/build
    -- west build: building application
    [138/143] Linking C executable zephyr\zephyr_prebuilt.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       20016 B         1 MB      1.91%
                SRAM:        5824 B       256 KB      2.22%
            IDT_LIST:          72 B         2 KB      3.52%
    [143/143] Linking C executable zephyr\zephyr.elf

    Could you provide some steps on how to reproduce this?

    Could you do the following:

    • cd ..\ncs\v1.5.0\zephyr
    • git checkout -b modify_nrf9160dk_nrf52840
    • git add .
    • git commit -m "set the external_flash_pins_routing status to 'ok'"
    • git diff v2.4.99-ncs1...modify_nrf9160dk_nrf52840

    If you have anything different than this, please tell me:

    diff --git a/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
    index ddd73df4c1..97e84e94f7 100644
    --- a/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
    +++ b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
    @@ -21,7 +21,7 @@
                    external_flash_pins_routing: switch-ext-mem-ctrl {
                            compatible = "nordic,nrf9160dk-optional-routing";
                            control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
    -                       status = "disabled";
    +                       status = "ok";
                    };
            };
     };
    diff --git a/share/zephyr-package/cmake/current_path.txt b/share/zephyr-package/cmake/current_path.txt
    new file mode 100644
    index 0000000000..da7f3c6cac
    --- /dev/null
    +++ b/share/zephyr-package/cmake/current_path.txt
    @@ -0,0 +1 @@
    +C:/Users/Simon/ncs/v1.5.0/zephyr/share/zephyr-package/cmake
    \ No newline at end of file

    Best regards,

    Simon

  • I followed your directions but when I tired to 'MARK' the text I hit close... Did the Diff:  but the status 'ok' was not applied.

    My environment: is Windows 10 Build 21322

    Python3_ROOT=D:\ncs\v1.5.0\toolchain\opt\bin

    PYTHONPATH=D:\ncs\v1.5.0\toolchain\opt\bin;D:\ncs\v1.5.0\toolchain\opt\bin\Lib;D:\ncs\v1.5.0\toolchain\opt\bin\Lib\site-packages
    tcdir=D:\ncs\v1.5.0\toolchain
    ZEPHYR_BASE=D:\ncs\v1.5.0\zephyr
    ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

    D:\ncs\v1.5.0\zephyr>git diff v2.4.99-ncs1...modify_nrf9160dk_nrf52840
    diff --git a/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
    index ddd73df4c1..9ce5255e25 100644
    --- a/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
    +++ b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay
    @@ -22,7 +22,7 @@
                            compatible = "nordic,nrf9160dk-optional-routing";
                            control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
                            status = "disabled";
    -               };
    +        );
            };
     };
    
    diff --git a/samples/drivers/spi_flash/boards/nrf9160dk_nrf9160.conf b/samples/drivers/spi_flash/boards/nrf9160dk_nrf9160.conf
    new file mode 100644
    index 0000000000..c483efdb82
    --- /dev/null
    +++ b/samples/drivers/spi_flash/boards/nrf9160dk_nrf9160.conf
    @@ -0,0 +1,8 @@

  • Based on the diff, it seems like you have removed a "};" and replaced it with a ");", which leads to a dts syntax error. If you correct that, it should work fine.

    Best regards,

    Simon

Reply Children
No Data
Related