Skip to main content
SKuma.41
Visitor II
September 27, 2022
Question

How to solve the error: 'asm' operand has impossible constraints while building the project ??

  • September 27, 2022
  • 5 replies
  • 5244 views

I am trying to build my project with wolfssl software pack integrated. I am getting  error: 'asm' operand has impossible constraints  at the line  __asm__ __volatile__ ( ) function from the file Middlewares/Third_Party/wolfSSL_wolfSSL_wolfSSL/wolfssl/wolfcrypt/src/sp_cortexm.c. how to solve it???

     

This topic has been closed for replies.

5 replies

Semer CHERNI
ST Employee
September 28, 2022

Hello @Community member​ 

First let me thank you for posting.

Could you please provide the *.ioc file so I be able to investigate the issue.

Or at least the details about your environment:

  • MCU ref
  • The package version
  • The CubeMx and CubeIDE version

Kind regards,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
September 28, 2022

Perhaps cite the specific line at least. You're probably using an "r" parameter and the compiler has run out of registers to give you. Perhaps could use "g" instead.

Try with WOLFSSL_SP_SMALL *not* defined

If you can isolate it to one specific function perhaps you can use the C code for that rather than the assembler version.

Look also for specific compiler/code version issues which may have already been identified and fixed

Check it is the current version of this file.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
SamKoyande
Visitor II
October 11, 2022

I am having exactly same issue at my end. I am also getting error: 'asm' operand has impossible constraints  at the line  __asm__ __volatile__ ( ) function from the file Middlewares/Third_Party/wolfSSL_wolfSSL_wolfSSL/wolfssl/wolfcrypt/src/sp_cortexm.c.

details about your environment:

MCU ref : STM32F732IETx, LQFP 176

The package version : 5.1.1

The CubeMx and CubeIDE version : STM32CubeIDE Version: 1.10.1, STM32CUBEMX Version 6-6-1

Kindly suggest me.

Tesla DeLorean
Guru
October 11, 2022

I made several suggestions, which if any did you try and what kind of errors or warning, or functionality did those get?

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
SamKoyande
Visitor II
October 12, 2022

The issue is resolved at my end by using STM32CubeIDE V1.5.0 instead of Version 1.10.1.

SamKoyande
Visitor II
November 4, 2022

Hii All,

The above listed issue is resolved with new versions of STM32CubeIDE at my end.

I got this answer from wolfssl forum. Below is the link of answer:

https://www.wolfssl.com/forums/topic1877-type-asm-operand-has-impossible-c-in-wolfssl-example-with-stm32cuide.html

Below are modifications needed in STM32CubeIDE with new version to build firmware successfully:

  1. Add -fomit-frame-pointer flag at location Project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> MCC GCC Compiler -> Miscellaneous -> Other flags 

Version of tools are as below:

STM32CubeIDE Version 1.10.1

STM32CubeMx Version 6.6.1