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

Parents Reply Children
  • Hi, Nguyen, thanks for your reply. I took a look at the link you provided, it seems to explain quite a lot step-by-step-wise and I will try it out. However, as it is a guide on a proprietary website, which is different from Nordic, I have another question: is the described guide (using IOSonata) actually officially recognized or recommended by Nordic as the way to build using Eclipse or it's just a work-around by a 3rd party, e.g. i-syst ? Or put another way, is there an official document by Nordic which states that this is the recommended way to build using Eclipse ? I guess there should be some official documenation / recommendation by the manufacturer ? Do you know of any as I struggled finding such by doing simple online search ? Otherwise, thanks for the link :-)

  • Nordic don't have any official support for Eclipse or any other IDE except for SES.  It is left to third party.  I-SYST however is an official third party Nordic based module provider. The IOsonata is a wrapper over the SDK to simply the development of BLE firmware, the SDK is still required.  You can bypass it to use the SDK directly.  The Eclipse setup is still the same way.  

    https://www.nordicsemi.com/News/2020/11/ISYST-modules-employ-nRF52840-and-nRF52832

  • Wow, I am impressed by your lightning-fast reply, Nguyen. Thanks for it, for the further explanations, and for the provided link. In the meantime, before your reply arrived, I found the following post from 4 years ago:

    https://devzone.nordicsemi.com/f/nordic-q-a/19707/is-there-a-free-ide-which-is-official-recommended-and-multi-platform

    where I came across another link, posted by you, namely:

    http://embeddedsoftdev.blogspot.com/p/ehal-nrf51.html

    I just looked quickly over it to try to compare the informations, and I guess it is the outdated version of the instructions to use Eclipse w/ GCC ? Is that right ? I mean, the link you provided me in your 1st reply (the i-Syst webpage) is the currently actual version of the instructions to use Eclipse and GCC for nRF programming and debugging ?

  • That is correct.  The BlogSpot is a bit outdated but still have good informations. Eclipse has changed over the year and became much easier to install as well. For the Windows built tools don't follow the xPack stuffs. It complicates things for no reason.  Just download the .zip for manual install.  Then set the Path to the unzipped binary in Eclipse preferences settings. Instructions are in the new Blog. 

    IOsonata has superior low level drivers (i2c, spa, art...) than those provided by the SDK.  Many products have been developed with it.  The UART driver for example is 20% faster than the nrfx.  The SPI has supports for 3 wire directly, which is not possible with nrfx. Many devices (sensors, flash,...) that don't work with nerf driver all worked with IOsonata driver.  Above all, there are no sdk_config defines junk. 

  • 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 ?

Related