Topic: Type 'asm' operand has impossible c in WOLFSSL example with STM32CuIDE

Hi all,
I tried to run one example from I-CUBE-wolfSSL example.
My compiler is STM32CubeIDE. 
I have three errors:

1- 'asm' operand has impossible constraints    sp_cortexm.c    /STM32L475/Middlewares/wolfSSL/wolfSSL/wolfCrypt/Core    line 15344    C/C++ Problem

2- make: *** [Middlewares/wolfSSL/wolfSSL/wolfCrypt/Core/subdir.mk:403: Middlewares/wolfSSL/wolfSSL/wolfCrypt/Core/sp_cortexm.o] Error 1    STM32L475             C/C++ Problem

3- make: *** Waiting for unfinished jobs....    STM32L475             C/C++ Problem

how can i solve these errors?

Regards

Share

Re: Type 'asm' operand has impossible c in WOLFSSL example with STM32CuIDE

Hi lili,

This happens only in debug mode. In release mode this goes away. This is due to the use of R7 I believe. There is a cflag that can be used to workaround this like -frame-omit-pointer, but I cannot find my note on that right now.

Another option is to use math option 3 in debug and math option 4 (asm) in release. The asm does increase math performance multiple x.

Thanks,
David Garske, wolfSSL

Share

Re: Type 'asm' operand has impossible c in WOLFSSL example with STM32CuIDE

Hi lili,

It is "-fomit-frame-pointer" added to the CFLAGS that you can use in debug mode to resolve this.

Thanks,
David Garske, wolfSSL

Share

Re: Type 'asm' operand has impossible c in WOLFSSL example with STM32CuIDE

Thanks for you help.

this problem is solved.  but I confront with these errors now:

./Middlewares/wolfSSL/wolfSSL/wolfSSL/Core/tls.o: in function `BuildTlsFinished':    STM32L4A6             C/C++ Problem
./Middlewares/wolfSSL/wolfSSL/wolfSSL/Core/tls.o: in function `DeriveTlsKeys':    STM32L4A6             C/C++ Problem
....
./Middlewares/wolfSSL/wolfSSL/wolfSSL/Core/tls13.o: in function `DeriveEarlySecret':
...

Do you have any ideas?

Share

Re: Type 'asm' operand has impossible c in WOLFSSL example with STM32CuIDE

These errors are related to

undefined reference to `wc_PRF_TLS'    STM32L4A6        line 0, external location:

undefined reference to `wc_PRF_TLS'    tls.c    /STM32L4A6/Middlewares/wolfSSL/wolfSSL/wolfSSL/Core         C/C++ Problem


Thanks in advance

Share

Re: Type 'asm' operand has impossible c in WOLFSSL example with STM32CuIDE

Hi lili,

Make sure you have the wolfcrypt/src/kdf.c file included. Make sure you have `WOLFSSL_HAVE_PRF` defined.
Are you using the latest wolfSSL v5.3.0 Cube pack?

Thanks,
David Garske, wolfSSL

Share