Skip to main content
RP_it
Associate II
Dec 28, 2018 7:14 AM UTC
Solved

How to include Crypto Library in System workbench project?

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

This topic has been closed for replies.
Amir NEIFAR
Amir NEIFARBest answer
Visitor II
Dec 28, 2018 11:01 AM UTC

​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

7 replies

Amir NEIFAR
Visitor II
Dec 28, 2018 10:36 AM UTC

Hi,

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

Regards,

Amir​

RP_it
RP_itAuthor
Associate II
Dec 28, 2018 10:40 AM UTC

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

0690X000006CvjzQAC.bmp

Amir NEIFAR
Amir NEIFARBest answer
Visitor II
Dec 28, 2018 11:01 AM UTC

​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_it
RP_itAuthor
Associate II
Dec 28, 2018 11:09 AM UTC

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

Amir NEIFAR
Visitor II
Dec 28, 2018 11:12 AM UTC

​You are welcome.

Good luck for your business.

Happy to support you.

Regards,

Amir NEIFAR

GKush.1
Visitor II
Dec 11, 2019 12:04 AM UTC

thanks Amir

That worked.

Visitor II
Oct 12, 2023 12:12 PM UTC

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