cancel
Showing results for 
Search instead for 
Did you mean: 

How to include Crypto Library in System workbench project?

RP
Associate II

0690X000006CvjkQAC.bmpI have Downloaded STM32CubeExpansion_Crypto_V3.1.0 library. I am trying to use it for STM32L431RBTx Microcontroller. But I am getting error as shown in following images.

What am I missing to do?Please help.

Building target:

_V0.1.elf" @"objects.list" -llibSTM32CryptographicV3.0.0_CM4_GCC_ot -lm

c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.2.201705091103/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -llibSTM32CryptographicV3.0.0_CM4_GCC_ot

collect2.exe: error: ld returned 1 exit status

0690X000006CvcPQAS.bmp0690X000006CvcUQAS.bmp

I have also tried by removing the prefix 'lib' from library .a file name. Then I am getting following error.

Invoking: MCU GCC Linker

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L"D:\L4\STM32CubeExpansion_Crypto_V3.1.0\Fw_Crypto\STM32L4\Middlewares\ST\STM32_Cryptographic\Lib" -specs=nosys.specs -specs=nano.specs -T"../STM32L431RBTx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "Hotel_Lock_V0.1.elf" @"objects.list" -lSTM32CryptographicV3.0.0_CM4_GCC_ot

c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.2.201705091103/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: error: Hotel_Lock_V0.1.elf uses VFP register arguments, D:\L4\STM32CubeExpansion_Crypto_V3.1.0\Fw_Crypto\STM32L4\Middlewares\ST\STM32_Cryptographic\Lib\libSTM32CryptographicV3.0.0_CM4_GCC_ot.a(crypto.o) does not

c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.2.201705091103/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file D:\L4\STM32CubeExpansion_Crypto_V3.1.0\Fw_Crypto\STM32L4\Middlewares\ST\STM32_Cryptographic\Lib\libSTM32CryptographicV3.0.0_CM4_GCC_ot.a(crypto.o)

collect2.exe: error: ld returned 1 exit status

make: *** [Hotel_Lock_V0.1.elf] Error 1

1 ACCEPTED SOLUTION

Accepted Solutions
Amir NEIFAR
Associate III

​The new issue is related to the Floating point support.

You need to use another Library built with the support of FPU:

\STM32CubeExpansion_Crypto_V3.1.0\AccHw_Crypto\STM32L4\Middlewares\ST\STM32_Crypto\Lib\libSTM32CryptographicV3.0.0_CM4_GCC_FPU.a

View solution in original post

7 REPLIES 7
Amir NEIFAR
Associate III

Hi,

 This is a link issue, please try to use STM32CryptographicV3.0.0_CM3_GCC without "lib" in the Library name.

Regards,

Amir​

Thanks for your reply Amir. I tried that one also. but getting different error after that.0690X000006CvjuQAC.bmp

0690X000006CvjzQAC.bmp

Amir NEIFAR
Associate III

​The new issue is related to the Floating point support.

You need to use another Library built with the support of FPU:

\STM32CubeExpansion_Crypto_V3.1.0\AccHw_Crypto\STM32L4\Middlewares\ST\STM32_Crypto\Lib\libSTM32CryptographicV3.0.0_CM4_GCC_FPU.a

RP
Associate II

Thank you so much Amir for your instant reply. Support of FBU worked. Project built successfully.

Amir NEIFAR
Associate III

​You are welcome.

Good luck for your business.

Happy to support you.

Regards,

Amir NEIFAR

thanks Amir

That worked.

rutvas
Associate

Getting below error in "...\en.STM32CubeExpansion_Crypto\STM32CubeExpansion_Crypto_V4.1.0\Projects\NUCLEO-L476RG\Applications\Cipher\AES_CBC_EncryptDecrypt\STM32CubeIDE"

rutvas_0-1697112419261.png

Implementing main.c file of AEC_CBC in my existing projects main file, I've included STM32_Cryptographic folder in middlewares