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.
Tool/software: TI C/C++ Compiler
The compiler generates a segmentation fault when using a switch statement with the intrinsic __even_in_range. The following error message is produced.
INTERNAL ERROR: \ccs_v9\ccs\tools\compiler\ti-cgt-msp430_18.12.2.LTS\bin\acpia430.exe experienced a segmentation fault while processing function (unknown or file scope) file (unknown) line 0
This is caused by a defect in the TI EABI C/C++ Parser.
TI Customer Support may be able to suggest a workaround to avoid this.
The issue can be verified using the Blink LED example code, then adding the following code:
#pragma vector = USCI_A0_VECTOR __interrupt void ServiceInterrupt() { switch (__even_in_range(UCA0IV, UCA0IFG)) //switch (UCA0IV) { case USCI_NONE: break; default: break; } }
No error is produced when the switch statement is swapped to the simple version.
I'm pretty sure the second argument needs to be a compile-time constant, which UCA0IFG isn't.
Yeah, it could be a little more graceful.
I recommend you not do that.
Ah, you are spot on. That second parameter should have been the constant USCI_SPI_UCTXIFG for SPI mode interrupts. Thanks for the fast response!
**Attention** This is a public forum