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.

MSP430F5529: __delay_cycles is not supported in gcc GNU lianaro compiler ? what is the alternative ?

Part Number: MSP430F5529

hi all,

__delay_cycles is not supported in gcc GNU lianaro compiler ? what is the alternative ?

I am using Ti RTOS with GCC Lianaro compiler ,

__delay_cycles function is undefined reference ,

what would be the reason and what would be the fix ?

thanks in advance

chiranth

  • Hi Chiranth,

    Looking at the user's guide for the MSP430 GCC compiler I do see the same intrinsic should be available. There are a couple things you can do to create your own.

    1. Set a for loop with for(i = 0; i < DelayValue; i++); this would cycle through DelayValue of times, but the compiler might optimize this out.
    2. Create your own function to delay. Here is a link to an example note this example was for an arm device, you would need to adjust for the MSP430 instruction set instead 

    I would check your includes -> compiler and look for an intrinsics.h file or something similar. Another possibility John found a couple years ago, I find this unlikely to be the cause but I would still double check.

    Regards,

    Luke

  • I had no idea what a "lianaro" compiler version was so I Googled. it. This appears to be only for the ARM processor so the reference to a MSP430 here is confusing.

    The MSP430 version of the GCC compiler has had __delay_cycles for a long time. An ARM version, perhaps not.

**Attention** This is a public forum