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

AES example in SDK version 17.0.0 does not compile out of the box

Hello.

Trying to compile the AES CBC MAC example out of the box, we get the ferror below.

Your help would be appreciated.

Many thanks,

Andrew

Building ‘nrf_crypto_aes_cbc_mac_pca10040’ from solution ‘nrf_crypto_aes_cbc_mac_pca10040’ in configuration ‘Release’

....

Linking nrf_crypto_aes_cbc_mac_pca10040.elf
    cannot find ../../../../../../../../external/micro-ecc/nrf52hf_armgcc/armgcc/micro_ecc_lib_nrf52.a: No such file or directory
Build failed

  • Hi,

     

    The default example requires micro-ecc:

    https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/lib_crypto_backend_micro_ecc.html#nrf_crypto_default_backends_micro_ecc

     

    The location is $(NRF5_SDK_PATH)/external/micro-ecc/, which holds helper scripts, build_all.sh (*nix or shell) and build_all.bat (windows), which will compile micro_ecc for all nRF-devices if make and arm-none-eabi-gcc is installed and located in your path.

     

    Kind regards,

    Håkon

  • Thanks.

    I am afraid make will conflict with another compiler we have and we don't have the gss arm compiler installed. Is it feasible just to obtain the missing library file  to drop into the relevant  folder ?

  • Hi Hakon.

    OK, so in desperation I avae take your advice:

    1, I loaded  the 2019 gcc ARM distribution to my Win7 development platform

    2. Also the the corresponding gcc make

    3. I made sure the binaries for both of the above are in the current path, with make having precedence over the path to any other installed make (designed to stop a clash with Embarcadero C++ Builder make)

    3. I went into the micor_ecc folder and edited build_al.bal to just make  rf52nf_armgcc

    4. I executed build_all.bat from the command line

    5. Make seems to start, but then gives the error below which I have been unable  resolve (full error report at the end of this missive  but the key report is :

    Process_begin: CreateProcess(NULL, mkdir _build, ...) failed.
    make (e=2): The system cannot find the file specified.

    Note that when I ran build_all the first time, git seemed to do its expected downloads.

    Any help would be gratefully received.

    Many thanks,

    Andrew

    C:\Projects\Bluetooth Communicator\Tools\Nordic\SDK\nRF5_SDK_17.0.0_9d13099\external\micro-ecc>build_all
    make: Entering directory `C:/Projects/Bluetooth Communicator/Tools/Nordic/SDK/nRF5_SDK_17.0.0_9d13099/external/micro-ecc/nrf52nf_armgcc/armgcc'
    mkdir _build
    process_begin: CreateProcess(NULL, mkdir _build, ...) failed.
    make (e=2): The system cannot find the file specified.
    make: *** [_build] Error 2
    make: Leaving directory `C:/Projects/Bluetooth Communicator/Tools/Nordic/SDK/nRF5_SDK_17.0.0_9d13099/external/micro-ecc/nrf52nf_armgcc/armgcc'
    C:\Projects\Bluetooth Communicator\Tools\Nordic\SDK\nRF5_SDK_17.0.0_9d13099\external\micro-ecc>

  • Hi,

     

    Andrew Waterhouse said:
    make (e=2): The system cannot find the file specified.

    It seems that "make" isn't in your PATH. 

    Here's the precompiled micro-ecc, which can be unzipped to the external folder:

    micro-ecc_2020_07_31.zip

    Could you try this and see if the example(s) compile properly?

     

    Kind regards,

    Håkon

      

  • Hi Hakon,

    I am 100% confident make is in the path  - I put it there and verified it  by make -h from the command line. That comes back (last 2 lines with 
    This program built for i386-pc-mingw32
    Report bugs to <[email protected]>

    I didn't have any gnu/gcc on my machine until we started trying to troubleshoot this.

    I did find, however, that if I removed OUTPUT_DIRECTORY := _build from the makefile, it got a bit further but suffered other problems then. I read somewhere that this probably means make is looking for mkdir as a program *(.exe) and not an implicit windows command line command, and thus cannot find it. But that is not my area of expertise. All I know is that the behaviour after the above amendment seemed to support that idea.

    Anyway, I'll load twhat you sent and report back - perhaps not until Monday now.

    Many thanks for your help !

    Andrew

Related