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

Got build error when built 'zephyr/zephyr.elf'

Hi,

I just pulled the source code of 'nrf' from the git server (SHA1 ID: 383da27cc232bd7baa353e965b7fe8fa08b56d77).

After performed 'west update' to sync other repos, I built 'zephyr/zephyr.elf' on SES.

I got build error:

[Errno 2] No such file or directory: '/home/terrychan/projects/nRfConnectSdk/nrf/applications/asset_tracker/build/zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj'

WHOLE LOG WITH THE BELOW LINK

/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-81c1405eb959456da2c2fcc4fc1d3d29/BuildError.txt

Please help. Thanks!

Parents Reply Children
  • Hi Martin,

    Thanks for your help.

    After referencing your suggested link, I still got error when I tried to complie.

    export GNUARMEMB_TOOLCHAIN_PATH=/home/terrychan/gcc-arm/eabi-7-2018-q2-update/
    export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

    cd zephyr
    source zephyr-env.sh
    cd ..

    cd $NCS_BASE/nrf/applications/asset_tracker/
    mkdir build && cd build

    cmake -GNinja -DBOARD=nrf9160_pca10090ns ..

    ninja

    The error I got as below:

    zephyr/misc/generated/configs.c: In function '_ConfigAbsSyms':
    zephyr/misc/generated/configs.c:18:136: error: expected expression before ')' token
    GEN_ABSOLUTE_SYM(CONFIG_FLIP_INPUT, );
    ^
    zephyr/misc/generated/configs.c:25:151: error: expected expression before ')' token
    GEN_ABSOLUTE_SYM(CONFIG_TEMP_SIM_BUTTON, );
    ^
    [28/162] Building C object CMakeFiles/app.dir/src/main.c.obj
    ../src/main.c: In function 'button_handler':
    ../src/main.c:809:61: warning: left shift count is negative [-Wshift-count-negative]
    if (IS_ENABLED(CONFIG_ACCEL_USE_SIM) && (has_changed & FLIP_INPUT)) {
    ^~
    ninja: build stopped: subcommand failed.

    Do you have any suggestion? Thanks!

  • HI Terry,
    I have a suspicion that there may be some instability when it comes to the different versions of the repositories?

    Please make sure that everything is in master:

    cd <sourcecode_root>\ncs\zephyr ; git checkout master ; git pull
    cd <sourcecode_root>\ncs\mcuboot ; git checkout master ; git pull
    cd <sourcecode_root>\ncs\nrf ; git checkout master ; git pull
    cd <sourcecode_root>\ncs\nrfxlib ; git checkout master ; git pull


    Or you can get West which is a tool that helps you out with the correct version as well making it easier (in my opinion) to build and flash samples.

Related