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

Eclipse/gcc error: _built/nrf52832.o No such file or directory

Hello.

Due to expanding code size because of the peer manager i m forced to move to gcc and Eclipse. So far according to the tutorial i`m proceeding fine.

But, after importing my project into eclipse it turned out that my project compiles, but the target is not built because it does not generate the nrf52832_xxaa.o

Linking target: _build/nrf52832_xxaa.out "C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q1-update/bin/arm-none-eabi-gcc" -Wl,-Map=_build/nrf52832_xxaa.map -mthumb -mabi=aapcs -L ../../../../../../components/toolchain/gcc -Tble_app_uart_gcc_nrf52.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys @_build/nrf52832_xxaa.in -lm -o _build/nrf52832_xxaa.out arm-none-eabi-gcc: error: build/nrf52832_xxaa.o: No such file or directory ../../../../../../components/toolchain/gcc/Makefile.common:153: recipe for target '_build/nrf52832_xxaa.out' failed make: *** [_build/nrf52832_xxaa.out] Error 1

when i "make" via command line, it returns the same, so i think it is not related to eclipse. However untouched examples all built fine, so i guess it is something related to my project.

I started from the peripheral uart example. I added a new service which i put in /components/sources. This i included in the makefile, and also removedthe -Werror option because i have left some unused variables. The rest is according to the tutorial. How come nrf52832_xxaa.o is not generated but all others?

  • Okay, i solved it by myself.

    My mistake was that i inserted under source files in the makefile just the path to my new service instead of adding the file name too.

    Before:

     $(SDK_ROOT)/components/sources/ \
    

    and after:

     $(SDK_ROOT)/components/sources/ble_aio.c \
    

    Its a trivial mistake but maybe others will experience too when setting up the project in ecplise or using gcc as compiler.

    Now everything runs.

  • Hey Vehring,

    I'm using gcc and eclipse as well for the same reasons but I'm getting the error in eclipse that certain variable names cannot be resolved. I know that its not being able to get the variable names from other source files but I have linked every source file as shown in the tutorial . Any idea of what im doing wrong.

    Click on CDT GCC Build Output Parser and change the compiler command pattern from (gcc)|([gc]++)|(clang) to (.gcc)|(.[gc]++) then apply changes. Click on CDT Built-in Compiler Settings Cross ARM and replace ${COMMAND} with arm-none-eabi-gcc and click Apply.

    I have followed those steps but still it gives me error

  • Hi Haaris,

    Be aware that to be able to use certain libraries you need to enable the libraries in the sdk_config.h file. This is because the #ifdef macro will exclude the part needed if the library is not enabled in sdk_config.h

  • Hey Hung,

    I don't think it has to do with sdk_config.h file because If I run the same code in keil it runs properly. And because you have said so i checked my sdk_config.h . Also im using the default example of ble, no change in it

  • I'm don't have much experience with Eclipse, but can you compile with make and gcc directly ?

    Note that now (from SDK v14.1) we have official support for Segger Embedded Studio, which is free IDE (for using with Nordic chip) that can replace the need for Eclipse.

Related