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

unable to get the build working with Eclipse

Hello,

I am supposed to get to learn the nRF52840 DK, so I can start programming with it. I managed to build an executable for the blinky example using make in the Terminal. My next task was to get Eclipse working for building and debugging, which I could not manage. Hence this ticket. I tried to access an original article "Development with GCC and Eclipse" which I saw has been cited by several posts on the net, but the resource seems to be not accessible any more @ this link:

https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/development-with-gcc-and-eclipse

Hence I tried to manage with the posts I found, one of them being the following one:

https://gustavovelascoh.wordpress.com/2018/02/13/starting-development-with-nordic-nrf5x-and-gcc-on-linux-eclipse-part-2/

I followed the instructions, but still cannot manage to get Eclipse building the same blinky example that I used to test the tools via the Terminal.

The output I get is:

make all

../../../../../../components/toolchain/gcc/Makefile.common:130: *** Cannot continue. Stop.

Cannot find: # '/home/koko/Desktop/nRF52840/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux/gcc-arm-none-eabi-10.3-2021.07/bin/arm-none-eabi-gcc'

/home/koko/Desktop/nRF52840/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux/gcc-arm-none-eabi-10.3-2021.07/bin/arm-none-eabi-gcc.

Please set values in: "/home/koko/Desktop/nRF52840/nRF5_SDK_17.0.2_d674dde/components/toolchain/gcc/Makefile.posix" according to the actual configuration of your system.

"make all" terminated with exit code 2. Build might be incomplete

I work on Ubuntu 20.04 LTS, downloaded the Eclipse for Embedded from the following link:

https://www.eclipse.org/downloads/packages/release/2021-06/r/eclipse-ide-embedded-cc-developers

My settings (paths) under "Project --> Properties --> MCU" are the same I used for testing the tools via the Terminal, e.g.

    - Arm Toolchains Path --> Toolchain Folder

    - SEGGER J-Link Path --> Executable / Folder

I error above happens when I use the default build command. It I change it to "make VERBOSE=1", I get a different error:

"make VERBOSE=1" all

Cannot run program "make VERBOSE=1": Unknown reason

Error: Program "make VERBOSE=1" not found in PATH

PATH=[/home/koko/Desktop/nRF52840/nRF5_SDK_17.0.2_d674dde/examples/peripheral/blinky/pca10056/blank/armgcc:/home/koko/Desktop/nRF52840/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux/gcc-arm-none-eabi-10.3-2021.07/bin:/home/koko/.local/bin:/home/koko/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin]

So, I started to get more confused than instructed, and wanted to ask if somebody could direct me to another step-by-step resource describing how exactly Eclipse is to bet set up ?

I would be thankful for any feedback

  • Hi,

     

    The output I get is:

    make all

    ../../../../../../components/toolchain/gcc/Makefile.common:130: *** Cannot continue. Stop.

    Cannot find: # '/home/koko/Desktop/nRF52840/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux/gcc-arm-none-eabi-10.3-2021.07/bin/arm-none-eabi-gcc'

    /home/koko/Desktop/nRF52840/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux/gcc-arm-none-eabi-10.3-2021.07/bin/arm-none-eabi-gcc.

    Please set values in: "/home/koko/Desktop/nRF52840/nRF5_SDK_17.0.2_d674dde/components/toolchain/gcc/Makefile.posix" according to the actual configuration of your system.

    "make all" terminated with exit code 2. Build might be incomplete

    this indicates that the path to arm-none-eabi-gcc is not correct, or that your operating system is 32 bit (while the compiler is 64 bit).

    Can you call "arm-none-eabi-gcc --version" successfully from your terminal?

     

    Kind regrads,

    Håkon

  • Hi, Hakon, thanks for your reply,

    "arm-none-eabi-gcc --version" works from the Terminal, I get the expected output.

    The path to arm-none-eabi-gcc should be correct, because the building process works from the Terminal (tested with the blinky project), it just does not work with Eclipse :-(

    my laptop is 64-bit, and the Ubuntu too, so I guess here is not the issue either.

    it might be that the instructions in the guide I followed were not complete or were outdated, but I could not spot the problem, hence the ticket :-)

    I'll try the newer link from @Nguyen and give feedback :-)

  • I just followed the instructions in the new Blog. I get an error at the following step: "Select & right-click on the ‘IOsonata_nRF52832’ project. Then select ‘Build Configuration/Build All’ to build all variants of the IOsonata library for the nRF52832." I used the nRF52840 folder instead of the nRF52832 folder. The error is :

    15:55:14 **** Build of configuration Debug_NoReset for project IOsonata_nRF52840 ****
    make all
    Building file: /home/koko/Desktop/devFolder/IOsonata/src/sensors/accel_adxl362.cpp
    Invoking: GNU ARM Cross C++ Compiler

    ...

    Building file: /home/koko/Desktop/devFolder/IOsonata/src/sensors/agm_invn_icm20948.cpp
    Invoking: GNU ARM Cross C++ Compiler
    arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -D__PROGRAM_START -DGATT_PROXY -DSVC_INTERFACE_CALL_AS_NORMAL_FUNCTION -DNRF_DFU_TRANSPORT_BLE -DNRF_DFU_SETTINGS_VERSION=1 -DNRF_SD_BLE_API_VERSION=7 -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQD -DS140 -DNRF52840_XXAA -DNRF52840 -DNRF52_SERIES -DSPRT_BUFFER_SIZE=256 -I"../src" -I"../include" -I"../../include" -I"../../../../include" -I"../../../../../include" -I"../../../../../../include" -I"../../../../../../../include" -I"../../../../../../CMSIS/Core/Include" -I"../../../../../../../micro-ecc" -I"../../../../../../../../external/Invn" -I"../../../../../../../../external/nrf5_SDK_Mesh/examples/common/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/examples/light_switch/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/friend/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/friend/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/prov/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/prov/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/foundation/health/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/foundation/config/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/model_spec/generic_dtt/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/model_spec/generic_level/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/model_spec/generic_ponoff/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/model_spec/generic_onoff/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/model_spec/common/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/health/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/models/config/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/gatt/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/gatt/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/stack/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/dfu/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/dfu/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/bearer/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/bearer/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/access/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/access/include" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/core/api" -I"../../../../../../../../external/nrf5_SDK_Mesh/mesh/core/include" -I"../../../../../../../../external/nRF5_SDK/components/nfc/t4t_lib" -I"../../../../../../../../external/nRF5_SDK/components/nfc/t2t_lib" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/generic/message" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/generic/record" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/ble_oob_advdata" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/ac_rec" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/hs_rec" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/ep_oob_rec" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/le_oob_rec" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/ble_pair_msg" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/ble_pair_lib" -I"../../../../../../../../external/nRF5_SDK/components/nfc/ndef/connection_handover/common" -I"../../../../../../../../external/nRF5_SDK/components/libraries/stack_info" -I"../../../../../../../../external/nRF5_SDK/components/libraries/atomic" -I"../../../../../../../../external/nRF5_SDK/components/libraries/atomic_flags" -I"../../../../../../../../external/nRF5_SDK/components/libraries/balloc" -I"../../../../../../../../external/nRF5_SDK/components/libraries/block_dev" -I"../../../../../../../../external/nRF5_SDK/components/libraries/queue" -I"../../../../../../../../external/nRF5_SDK/components/libraries/sha256" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/cifra" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/optiga" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/oberon" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/mbedtls" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/micro_ecc" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/cc310" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/cc310_bl" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/nrf_hw" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crypto/backend/nrf_sw" -I"../../../../../../../../external/nRF5_SDK/components/libraries/memobj" -I"../../../../../../../../external/nRF5_SDK/components/libraries/cli" -I"../../../../../../../../external/nRF5_SDK/components/libraries/log" -I"../../../../../../../../external/nRF5_SDK/components/libraries/log/src" -I"../../../../../../../../external/nRF5_SDK/components/libraries/scheduler" -I"../../../../../../../../external/nRF5_SDK/components/libraries/mutex" -I"../../../../../../../../external/nRF5_SDK/components/libraries/timer" -I"../../../../../../../../external/nRF5_SDK/components/libraries/fstorage" -I"../../../../../../../../external/nRF5_SDK/components/libraries/fds" -I"../../../../../../../../external/nRF5_SDK/components/libraries/atomic_fifo" -I"../../../../../../../../external/nRF5_SDK/components/libraries/strerror" -I"../../../../../../../../external/nRF5_SDK/components/libraries/util" -I"../../../../../../../../external/nRF5_SDK/components/libraries/delay" -I"../../../../../../../../external/nRF5_SDK/components/libraries/pwr_mgmt" -I"../../../../../../../../external/nRF5_SDK/components/libraries/crc32" -I"../../../../../../../../external/nRF5_SDK/components/libraries/mem_manager" -I"../../../../../../../../external/nRF5_SDK/components/libraries/bootloader/ble_dfu" -I"../../../../../../../../external/nRF5_SDK/components/libraries/bootloader/dfu" -I"../../../../../../../../external/nRF5_SDK/components/libraries/bootloader" -I"../../../../../../../../external/nRF5_SDK/components/libraries/experimental_section_vars" -I"../../../../../../../../external/nRF5_SDK/components/libraries/svc" -I"../../../../../../../../external/nRF5_SDK/components/libraries/ringbuf" -I"../../../../../../../../external/nRF5_SDK/components/libraries/usbd" -I"../../../../../../../../external/nRF5_SDK/components/libraries/usbd/class/audio" -I"../../../../../../../../external/nRF5_SDK/components/libraries/usbd/class/cdc" -I"../../../../../../../../external/nRF5_SDK/components/libraries/usbd/class/hid" -I"../../../../../../../../external/nRF5_SDK/components/libraries/usbd/class/msc" -I"../../../../../../../../external/nRF5_SDK/components/ble/nrf_ble_gatt" -I"../../../../../../../../external/nRF5_SDK/components/ble/peer_manager" -I"../../../../../../../../external/nRF5_SDK/components/ble/ble_advertising" -I"../../../../../../../../external/nRF5_SDK/components/ble/nrf_ble_scan" -I"../../../../../../../../external/nRF5_SDK/components/ble/common" -I"../../../../../../../../external/nRF5_SDK/components/ble/ble_services/ble_dis" -I"../../../../../../../../external/nRF5_SDK/components/proprietary_rf/esb" -I"../../../../../../../../external/nRF5_SDK/components/softdevice/common" -I"../../../../../../../../external/nRF5_SDK/components/softdevice/mbr/headers" -I"../../../../../../../../external/nRF5_SDK/components/softdevice/s140/headers" -I"../../../../../../../../external/nRF5_SDK/external/fprintf" -I"../../../../../../../../external/nRF5_SDK/external/mbedtls/include" -I"../../../../../../../../external/nRF5_SDK/external/utf_converter" -I"../../../../../../../../external/nRF5_SDK/external/nrf_cc310/include" -I"../../../../../../../../external/nRF5_SDK/integration/nrfx" -I"../../../../../../../../external/nRF5_SDK/integration/nrfx/legacy" -I"../../../../../../../../external/nRF5_SDK/modules/nrfx/hal" -I"../../../../../../../../external/nRF5_SDK/modules/nrfx" -I"../../../../../../../../external/nRF5_SDK/modules/nrfx/drivers/include" -std=gnu++11 -fabi-version=0 -fno-exceptions -fno-rtti -MMD -MP -MF"src/sensors/agm_invn_icm20948.d" -MT"src/sensors/agm_invn_icm20948.o" -c -o "src/sensors/agm_invn_icm20948.o" "/home/koko/Desktop/devFolder/IOsonata/src/sensors/agm_invn_icm20948.cpp"
    /home/koko/Desktop/devFolder/IOsonata/src/sensors/agm_invn_icm20948.cpp:36:10: fatal error: Devices/Drivers/Icm20948/Icm20948.h: No such file or directory
       36 | #include "Devices/Drivers/Icm20948/Icm20948.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [src/sensors/subdir.mk:116: src/sensors/agm_invn_icm20948.o] Error 1
    "make all" terminated with exit code 2. Build might be incomplete.

    15:55:16 Build Failed. 2 errors, 0 warnings. (took 1s.326ms)

    Trying to compile the blinky project, yields an error too, but I guess this is expected when the previous step with building the IOSonata library fails.

    16:22:42 **** Incremental Build of configuration Debug for project Blinky ****
    make all
    Building target: Blinky.elf
    Invoking: Cross ARM C Linker
    arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "../../../../ldscript/gcc_nrf52840_xxaa.ld" -Xlinker --gc-sections -L"../../../../lib/Eclipse/Debug" -Wl,-Map,"Blinky.map" --specs=nano.specs -Wl,--start-group -lgcc -lc -lc -lm -Wl,--end-group -o "Blinky.elf"  ./src/blinky.o   -lIOsonata_nRF52840
    /home/koko/Desktop/nRF52840/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux/gcc-arm-none-eabi-10.3-2021.07/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: cannot find -lIOsonata_nRF52840
    collect2: error: ld returned 1 exit status
    make: *** [makefile:58: Blinky.elf] Error 1
    "make all" terminated with exit code 2. Build might be incomplete.

    16:22:42 Build Failed. 2 errors, 0 warnings. (took 185ms)

    Do you have any clues what could be the issue in this case, Nguyen ?

  • There are a few dependencies for some drivers.  The one you are missing is the Invensense motion sensor.  There is a link to download and instructions to put in the folder locations.  See README.md  

  • OK, Nguyen, that might be indeed as I didn't download all the stuff like Bosch, ..., because I wanted to only build the simple blinky example. I'll download them and give it another try. Thanks !

Related