AnsweredAssumed Answered

STM32F091RC and STM32 Cryptographic library link error (RCC_AHBPeriphClockCmd undefined)

Question asked by KevinHu on Mar 2, 2016
Latest reply on Mar 14, 2016 by KevinHu
Hi,

I know there's not such easy think than helping someone describing its issue with prose, but here I try.
In a current STM32F091RC building, linking and running project (gcc makefile), I wish I could basically cut-and-paste the SHA256 example provided in the STM32 Cryptographic library. I found compelling sample code in /Project/STM32_Cryptographic_Examples/HASH/SHA256/main.c.

In my makefile, I added the usual -I to the cryptographic library, and added the linker directive so that it links M0_CryptoFW_2_0_6.a.

The build is successfull, but at link time, the following is output :
..//crypto/lib/M0_CryptoFW_2_0_6.a(crypto.o): In function `Crypto_DeInit':
C:\SVN\MCD_STM32_Cryptographic_V2_0_6\LibraryCreation\Cortex_M0\Crypto_Sources_Files\crypto.c:(.text+0xfc90): undefined reference to `RCC_AHBPeriphClockCmd'
collect2: error: ld returned 1 exit status

I "grep"ed for RCC_AHBPeriphClockCmd in all the include files of my project (so that I could find the missing library), but the grep didn't yield anything.

I wish someone could shed some light on this. From my Google research, I found people managing to use the crypto lib with STM32F4, but couldn't find relevant information for STM32F0 (although  understant this low end MCU is not ideal).

Thank you !

Outcomes