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

nRF5 SDK Example build error

I've installed the Segger Embedded Studio and Nordic SDK (C:\Nordic\nRF5_SDK_15.1.0) following the tutorial video on the nRF5 webpage.

Right out of the box, trying to Build/Run the example: C:\Nordic\nRF5_SDK_15.1.0\examples\ble_peripheral\ble_app_hrs\pca10040\s132\ses\ble_app_hrs_pca10040_s132.emProject

I get the following error: Linking ble_app_hrs_pca10040_s132.elf 1 Error:

cannot find ../../../../../../external/micro-ecc/nrf52hf_armgcc/armgcc/micro_ecc_lib_nrf52.a: No such file or directory

I'm suspecting that I've missed configuring something, but retracing my steps I don't see what.

Any thoughts?

Jim

Parents
  • Hi 

    The micro-ECC library is an external library that can be downloaded from Github here. It is detailed in our DFU guide how you should clone the library into the SDK: https://devzone.nordicsemi.com/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader

    Cheers

    Jared 

  • Hi Jared,

       Following the ...secure-dfu-bootloader doc that you referenced, it mentions:SDKFolder\external\micro-ecc\nrf52_keil\armgcc but since I'm not using Keil, but MinGW gcc.exe (which I had to rename to be "arm-none-eabi-gcc.exe, to get "make" command to work)... I see there are apparently two choices:

    C:\Nordic\nRF5_SDK_15.1.0\external\micro-ecc\nrf52hf_armgcc or .\nrf52nf_armgcc.  Neither of these builds correctly.

    I see the following results:

    C:\Nordic\nRF5_SDK_15.1.0\external\micro-ecc\nrf52hf_armgcc\armgcc>make
    mkdir _build
    cd _build && mkdir micro_ecc_lib
    Compiling file: uECC.c
    arm-none-eabi-gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
    arm-none-eabi-gcc: error: unrecognized argument in option '-mabi=aapcs'
    arm-none-eabi-gcc: note: valid arguments to '-mabi=' are: ms sysv
    arm-none-eabi-gcc: error: unrecognized command line option '-mthumb'; did you mean '-mtbm'?
    arm-none-eabi-gcc: error: unrecognized command line option '-mfloat-abi=hard'
    arm-none-eabi-gcc: error: unrecognized command line option '-mfpu=fpv4-sp-d16'
    ../../../../components/toolchain/gcc/Makefile.common:272: recipe for target '_build/micro_ecc_lib/uECC.c.o' failed
    make: *** [_build/micro_ecc_lib/uECC.c.o] Error 1

    Isn't there some way to do all this in the Segger IDE instead of all this low-level gronking around with command line tools?

    All this is great when things "just work", but when something goes wrong it's very frustrating!

    Thanks for your patience and help! It's appreciated!

    Jim

  • Hi 

    The µECC library is not included  as a part of our SDK due to license requirements, you must therefore install it manually. The problem you are facing is due to your installation of the Make command and is not related to the SDK itself. I installed the library with MinGW make but copied and renamed the  mingw32-make command to make . Can you try this procedure? The difference in nRF52hf and nRF52nf is that hf is for hard float units and the other for soft float. You should use the nrf52hf. 

    Jared

Reply
  • Hi 

    The µECC library is not included  as a part of our SDK due to license requirements, you must therefore install it manually. The problem you are facing is due to your installation of the Make command and is not related to the SDK itself. I installed the library with MinGW make but copied and renamed the  mingw32-make command to make . Can you try this procedure? The difference in nRF52hf and nRF52nf is that hf is for hard float units and the other for soft float. You should use the nrf52hf. 

    Jared

Children
  • Hi Jared,

       I found the problem... first, I got rid of the MinGW GCC and installed gcc-arm-none-eabi-7-2018-q2-update.  I had already renamed mingw32-make.exe to be "make.exe" and all paths were "correct"... Except for the fact that in the ..toolchain\gcc\makefile.windows file, I had done a cut/paste of 

    GNU_INSTALL_ROOT := C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/
    GNU_VERSION := 7.3.1
    GNU_PREFIX := arm-none-eabi

    which put "\" characters in the path, rather than "/"!!!!!!!!!  Unbelievable we're still stuck with tools that don't conform to the conventions of the OS that they are running on!

    Anyway, I'm now able to build/flash/run examples on the nRF52-DK board.

    Thanks for your generous and responsive help!

    Jim

  • BTW, I didn't intend that as a critique of Nordic's tools... just the GNU legacy that everyone seems to fight with! :)

Related