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

SEGGER EMBEDDED STUDIO, ERROR offsets.c.obj

Hi!

I'm currently setting up the nRF9160 dev kit for development and are having some trouble with "building" the asset tracking application.

Building ‘zephyr/include/generated/driver-validation.h’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘zephyr/include/generated/driver-validation.h’
Building ‘zephyr/include/generated/kobj-types-enum.h’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘zephyr/include/generated/kobj-types-enum.h’
Building ‘zephyr/include/generated/otype-to-str.h’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/misc/generated/syscalls.json’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘zephyr/misc/generated/syscalls.json’
Building ‘zephyr/include/generated/syscall_list.h’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘zephyr/include/generated/syscall_list.h’
Building ‘zephyr/include/generated/syscall_dispatch.c’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/include/generated/syscall_macros.h’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘zephyr/include/generated/syscall_macros.h’
Building ‘zephyr/include/generated/offsets.h’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘zephyr/include/generated/offsets.h’
1> Traceback (most recent call last):
1> File "C:/programvare/nrfsemi/ncs/zephyr/scripts/gen_offset_header.py", line 72, in <module>
1> input_file = open(args.input, 'rb')
1> FileNotFoundError: [Errno 2] No such file or directory: 'C:/programvare/nrfsemi/ncs/nrf/applications/asset_tracker/build/zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj'
Build failed

Any clues on what can cause this error message?

I'm using master branch.

Regards,

David

  • When I use the command : west build -b nrf9160_pca10090ns

    with "ns", I get a'little bit further, but still having a error.

    You know the difference bethween typing nrf9160_pca10090ns/nrf9160_pca10090 ?


    Running Partition Manager...
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/programvare/nrfsemi/ncs/nrf/applications/asset_tracker/build
    -- west build: building application
    [99/344] Building C object spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj
    FAILED: spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj
    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v1.14.99-ncs3-snapshot2-1276-g4493a423a645 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DNRF9160_XXAA -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -IC:/programvare/nrfsemi/ncs/zephyr/kernel/include -IC:/programvare/nrfsemi/ncs/zephyr/arch/arm/include -IC:/programvare/nrfsemi/ncs/zephyr/include -IC:/programvare/nrfsemi/ncs/zephyr/include/drivers -Ispm/zephyr/include/generated -IC:/programvare/nrfsemi/ncs/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/programvare/nrfsemi/ncs/zephyr/soc/arm/nordic_nrf/include -IC:/programvare/nrfsemi/ncs/zephyr/lib/libc/minimal/include -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/cmsis/Include -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx/drivers/include -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx/hal -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx/mdk -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/. -IC:/programvare/nrfsemi/ncs/nrf/include -IC:/programvare/nrfsemi/ncs/nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls -Ispm/zephyr/modules/nrfxlib/nrf_security/include -IC:/programvare/nrfsemi/ncs/mbedtls/include -IC:/programvare/nrfsemi/ncs/mbedtls/include/mbedtls -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/include-fixed -Os -nostdinc -imacrosC:/programvare/nrfsemi/ncs/nrf/applications/asset_tracker/build/spm/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -imacrosC:/programvare/nrfsemi/ncs/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/programvare/nrfsemi/ncs/nrf/applications/asset_tracker=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/programvare/nrfsemi/ncs/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -mcmse -std=c99 -MD -MT spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj -MF spm\zephyr\CMakeFiles\spm_zephyr.dir\C_\programvare\nrfsemi\ncs\nrf\subsys\spm\spm.c.obj.d -o spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj -c C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c
    In file included from C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c:20:
    C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c: In function 'spm_jump':
    C:/programvare/nrfsemi/ncs/zephyr/arch/arm/include/cortex_m/tz.h:319:22: error: called object is not a function or function pointer
    ((tz_ns_func_ptr_t)(cmse_nsfptr_create(fptr)))
    ^~~~~~~~~~~~~~~~~~
    C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c:429:13: note: in expansion of macro 'TZ_NONSECURE_FUNC_PTR_CREATE'
    reset_ns = TZ_NONSECURE_FUNC_PTR_CREATE(vtor_ns[1]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [104/344] Building C object spm/zephyr/arch/arm/core/CMakeFiles/spm_arch__arm__core.dir/irq_manage.c.obj
    ninja: build stopped: subcommand failed.
    ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\programvare\nrfsemi\ncs\nrf\applications\asset_tracker\build'

    C:\programvare\nrfsemi\ncs\nrf\applications\asset_tracker>

    -David

  • Hmm.

    nrf9160_pca10090ns targets the build for the "non secure partition" of the chip, nrf9160_pca10090 targets the secure part. I don't know the exact significance of this, but from what I know the asset_tracker is meant to be build with nrf9160_pca10090ns as you've already done.

    Did you delete the build folder between each time you ran west build now?

  • Ok, yes I did.

    Running Partition Manager...
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/programvare/nrfsemi/ncs/nrf/applications/asset_tracker/build
    -- west build: building application
    [92/344] Building C object spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj
    FAILED: spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj
    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v1.14.99-ncs3-snapshot2-1276-g4493a423a645 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DNRF9160_XXAA -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -IC:/programvare/nrfsemi/ncs/zephyr/kernel/include -IC:/programvare/nrfsemi/ncs/zephyr/arch/arm/include -IC:/programvare/nrfsemi/ncs/zephyr/include -IC:/programvare/nrfsemi/ncs/zephyr/include/drivers -Ispm/zephyr/include/generated -IC:/programvare/nrfsemi/ncs/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/programvare/nrfsemi/ncs/zephyr/soc/arm/nordic_nrf/include -IC:/programvare/nrfsemi/ncs/zephyr/lib/libc/minimal/include -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/cmsis/Include -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx/drivers/include -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx/hal -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/nrfx/mdk -IC:/programvare/nrfsemi/ncs/zephyr/ext/hal/nordic/. -IC:/programvare/nrfsemi/ncs/nrf/include -IC:/programvare/nrfsemi/ncs/nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls -Ispm/zephyr/modules/nrfxlib/nrf_security/include -IC:/programvare/nrfsemi/ncs/mbedtls/include -IC:/programvare/nrfsemi/ncs/mbedtls/include/mbedtls -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/include-fixed -Os -nostdinc -imacrosC:/programvare/nrfsemi/ncs/nrf/applications/asset_tracker/build/spm/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -imacrosC:/programvare/nrfsemi/ncs/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/programvare/nrfsemi/ncs/nrf/applications/asset_tracker=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/programvare/nrfsemi/ncs/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -mcmse -std=c99 -MD -MT spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj -MF spm\zephyr\CMakeFiles\spm_zephyr.dir\C_\programvare\nrfsemi\ncs\nrf\subsys\spm\spm.c.obj.d -o spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c.obj -c C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c
    In file included from C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c:20:
    C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c: In function 'spm_jump':
    C:/programvare/nrfsemi/ncs/zephyr/arch/arm/include/cortex_m/tz.h:319:22: error: called object is not a function or function pointer
    ((tz_ns_func_ptr_t)(cmse_nsfptr_create(fptr)))
    ^~~~~~~~~~~~~~~~~~
    C:/programvare/nrfsemi/ncs/nrf/subsys/spm/spm.c:429:13: note: in expansion of macro 'TZ_NONSECURE_FUNC_PTR_CREATE'
    reset_ns = TZ_NONSECURE_FUNC_PTR_CREATE(vtor_ns[1]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [97/344] Building C object spm/zephyr/CMakeFiles/spm_zephyr.dir/drivers/timer/nrf_rtc_timer.c.obj
    ninja: build stopped: subcommand failed.
    ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\programvare\nrfsemi\ncs\nrf\applications\asset_tracker\build'

    -David

  • Hi.

    Which GCC version are you using?

    You should be using the version listed in the Getting Started Assistant, 7-2018-q2-update.

    Best regards,

    Didrik

  • Hey Didrik,

    I can confirm that when I change the GCC  version to 7-2018-q2-update, it works.

    But .. It only works with using cmd, with the following commands.

    1. SET ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

    2. SET GNUARMEMB_TOOLCHAIN_PATH="C:\gnuarmemb"

    3. west build -b nrf9160_pca10090ns

    An additional note to mention here is that men building with "ns" non-secure it says the following:

    "Changed board to secure nrf9160_pca10090 (NOT NS)"

    Why is that?, what is the difference between these two?

    ########################################

    When I use SEGGER Embedded Studio to "Build" the application I get following response.


    I believe it has to do with my missing "Directory" options, see picture below.

    Tools -> Options -> nRF Connect

    How do I add the directory here?

    GCC -> gnuarmemb

    Zephyr

    - David

Related