This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-EM-CC2745R10-Q1: How to disable STRD instruction in CCS?

Part Number: LP-EM-CC2745R10-Q1

Tool/software:

Hi team,

We have a 3rd party lib and after integration it into the source code, the code would enter hard fault and we debug that reason for this hard fault is the address of STRD is not 4 bytes aligned.

But we also find our compiler has allowed unalignment and too many structures and unions in the lib, we cannot force 4 bytes align for all the structures.

So I'm asking for a method to disable strd in for compiling the lib. I tried to add a -mno-strd in the project properties but I cannot compile it.

Do you have some idea?

  • For the source file that contains the function for which the compiler generates the problem STRD instruction, please follow the directions in the article How to Submit a Compiler Test Case.  In addition, please give the name of this function.  If it generates more than one STRD instruction, please indicate which one causes the problem.

    I'm asking for a method to disable strd in for compiling the lib

    There is no such method.  It is already the case that the compiler uses STRD only when it knows the address is 4-byte aligned.  That's why I ask for a test case.

    Thanks and regards,

    -George