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

a Problem when compiling in Seeger Embedded studio

Hi
I made some changes in the chat project that is found in NRF Connect SDK
and when I build the change project this error occurs


kobj-types-enum.h: No such file or directory
Build failed

this is the full building output:
Building ‘C:/Users/OMAR/ncs/v1.5.1/zephyr/misc/empty_file.c’ from solution ‘build’ in configuration ‘Common’
Building ‘C:/Users/OMAR/ncs/v1.5.1/zephyr/include/dt-bindings/gpio/gpio.h’ from solution ‘build’ in configuration ‘Common’
Building ‘C:/Users/OMAR/ncs/v1.5.1/zephyr/include/dt-bindings/i2c/i2c.h’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/misc/generated/syscalls.json’ from solution ‘build’ in configuration ‘Common’
Combining ‘zephyr/misc/generated/syscalls.json’
Building ‘zephyr/misc/generated/struct_tags.json’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/CMakeFiles/parse_syscalls_target’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/parse_syscalls_target’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/include/generated/driver-validation.h’ from solution ‘build’ in configuration ‘Common’
Combining ‘zephyr/include/generated/driver-validation.h’
Building ‘zephyr/CMakeFiles/driver_validation_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/driver_validation_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/include/generated/kobj-types-enum.h’ from solution ‘build’ in configuration ‘Common’
Combining ‘zephyr/include/generated/kobj-types-enum.h’
Building ‘zephyr/include/generated/otype-to-str.h’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/CMakeFiles/kobj_types_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/kobj_types_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/include/generated/syscall_list.h’ from solution ‘build’ in configuration ‘Common’
Combining ‘zephyr/include/generated/syscall_list.h’
Building ‘zephyr/CMakeFiles/syscall_list_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/include/generated/syscall_dispatch.c’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/syscall_list_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_offsets’ from solution ‘build’ in configuration ‘Common’
Building ‘zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj’ from solution ‘build’ in configuration ‘Common’
Compiling ‘offsets.c’
kernel_includes.h
kernel.h
offsets_aarch32.c
offsets.c
kobj-types-enum.h: No such file or directory
Build failed


thanks

Parents Reply Children
  • I did the following:

    • Used NCS v1.5.1
    • Placed project in ncs/nrf&samples/chat2
    • Built it using west build -b nrf52840dk_nrf52840 -d build_52840 -p
      • Got the following error

    ../src/Keepalive.c:187:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
      187 | a

    • Removed the 'a' from the bottom of keepalive.c
    • Built it again using west build -b nrf52840dk_nrf52840 -d build_52840 -p
      • Got the following errror:

    ../src/Keepalive.c:175:32: error: 'BT_MESH_KEEPALIVE_OP_PRIVATE_MESSAGE' undeclared (first use in this function); did you mean 'BT_MESH_KEEPALIVE_OP_MESSAGE'?
      175 |  BT_MESH_MODEL_BUF_DEFINE(buf, BT_MESH_KEEPALIVE_OP_PRIVATE_MESSAGE,
          |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    • Then I added the following in keepalive.h to make it compile

    /** Presence message opcode. */
    #define BT_MESH_KEEPALIVE_OP_PRESENCE BT_MESH_MODEL_OP_3(0x0D, \
    				       BT_MESH_KEEPALIVE_VENDOR_COMPANY_ID)
    
    /** I added this below, to make it compile*/
    #define BT_MESH_KEEPALIVE_OP_PRIVATE_MESSAGE BT_MESH_MODEL_OP_3(0x0D, \
    				       BT_MESH_KEEPALIVE_VENDOR_COMPANY_ID)

    • Built again
      • It worked!

    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/simon/ncs/nrf/samples/chat2/build_52840
    -- west build: building application
    [1/270] Preparing syscall dependency handling
    
    [148/270] Building C object CMakeFiles/app.dir/src/model_handler.c.obj
    ../src/model_handler.c:97:1: warning: "/*" within comment [-Wcomment]
       97 | /**
          |  
    ../src/model_handler.c:187:2: warning: "/*" within comment [-Wcomment]
      187 |  /* Don't print own messages. * /
          |   
    [265/270] Linking C executable zephyr/zephyr_prebuilt.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      225200 B         1 MB     21.48%
                SRAM:       42524 B       256 KB     16.22%
            IDT_LIST:         152 B         2 KB      7.42%
    [270/270] Linking C executable zephyr/zephyr.elf

    It is strange that it didn't work for you. I built on both Windows and Linux and it built successfully. I tried with both 'build' and 'build_nrf52840dk_nrf52840', as well as 'build_nrf52840dk_nrf52840_123456789123456789' to test the Windows path length issue, but it still worked.

    Can you test on a different computer? Try to uninstall and install NCS and see if it works then.

Related