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

Segger overlay corrupted?

I have to folders with different versions of the nrf library installed (1.0.0 and 1.1.0-rcsomething) The dts and overlay files are identical in the 2 folders (nrf9160_pca10090ns.dts, common.dts and my project overlay file). In one project the overlaying prodess goes well: 

-- Loading <version1.0>/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
-- Overlaying <version1.0>/ncs/zephyr/dts/common/common.dts
-- Overlaying <version1-project>/nrf9160_pca10090ns.overlay
Device tree configuration written to <version-1-project>/build_02/zephyr/include/generated/generated_dts_board.conf

Ie, the loading of the project goes well

When I do loading of the <1.1-folder>-version, things crash: 

Error: nrf9160_pca10090ns.dts.pre.tmp:551.3-4 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at <version-1.1>/ncs/zephyr/cmake/dts.cmake:162 (message):
command failed with return code: 1
Call Stack (most recent call first):
<version-1.1>/ncs/zephyr/cmake/app/boilerplate.cmake:566 (include)
CMakeLists.txt:9 (include)


-- Configuring incomplete, errors occurred!
Project load failed
Reported error: solution load command failed (1)

I've changed the Zephyr base and board direcory in Segger as well

Any ideas where to look?

Parents
  • In the project where it fails, what tag/commit of the nrf repository are you using? You mentioned "1.1.0-rcsomething", could you try the latest stable tag v1.1.0 (which was just released) and see if you get the error then.

    Best regards,

    Simon

  • I still get the gcc compiler error when opening the GPS project in the samples/nrf9160 folder when checking out the v1.1.0 tag

    CMake Error at C:/nrfTest-1.1/ncs/zephyr/cmake/compiler/gcc/generic.cmake:24 (message):
    Executing the below command failed. Are permissions set correctly?

    'C:/Program
    Files/segger/arm_segger_embedded_studio_v420a_win_x64_nordic/bin/cc.exe
    --version'

    Call Stack (most recent call first):
    C:/nrfTest-1.1/ncs/zephyr/cmake/generic_toolchain.cmake:68 (include)
    C:/nrfTest-1.1/ncs/zephyr/cmake/app/boilerplate.cmake:507 (include)
    CMakeLists.txt:10 (include)

  • I can see that the following line fails for you, and I can see that CMAKE_C_COMPILER is set to C:/Program
    Files/segger/arm_segger_embedded_studio_v420a_win_x64_nordic/bin/cc.exe.

    I tried to build an example and print out CMAKE_C_COMPILER and I noticed that it was equal to C:/gnuarmemb/bin/arm-none-eabi-gcc.exe in my case.  I also tried to run the command, and it gave the following output:

    C:\gnuarmemb\bin>arm-none-eabi-gcc.exe --version
    arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
    Copyright (C) 2017 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Have you set the GNU ARM Embedded Toolchain Directory in SES? Check out this link for instructions on how to do it. I think that might solve your issues.

    Best regards,

    Simon

  • I did

    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe --version

    , and got the same response as you did. No big surprise there. My toolchain in segger is also identical to yours: 

    I read your article with great interest, though, and found it very useful in order to make me understand the entire build process and the tool chain. 

    Building the gps project with west build gave me a totally different result than the one I got in segger, though. It passed the compiler test, but complained about a non-exixtent include file (do make sure your samples compile before you release!)

    I'm still at loss on how to proceed.

  • I manage to build the GPS sample with NCS v1.1.0 and v1.0.0. What version of NCS are you using? Did you remember the ns extension when building the project? 

    west build -b nrf9160_pca10090ns

    If that doesn't solve your issues, try running these commands:

    cd <sourcecode_root>\ncs\nrf
    git checkout master
    git pull
    git checkout v1.0.0
    west update
    
    cd <sourcecode_root>\ncs
    pip3 install -r zephyr\scripts\requirements.txt
    pip3 install -r nrf\scripts\requirements.txt
    pip3 install -r mcuboot\scripts\requirements.txt

    Then try to build the GPS project

    Could you provide the error log you got?

    Best regards,

    Simon

  • It works using cli, and then I'm able to open the project in Segger. Thanks a lot. Your article help me understand the toolchain much better. 

    A bit of critisism, though. The dts and overlay files are hardware specific, and very few will use the DK for developing, other than for demo and educational purposes. Modifying the overlay files in the ncs folders to suit custom hardware makes the whole thing very brittle. 

Reply
  • It works using cli, and then I'm able to open the project in Segger. Thanks a lot. Your article help me understand the toolchain much better. 

    A bit of critisism, though. The dts and overlay files are hardware specific, and very few will use the DK for developing, other than for demo and educational purposes. Modifying the overlay files in the ncs folders to suit custom hardware makes the whole thing very brittle. 

Children
Related