MSP430 in gcc4.9 ... enable interrupts?
Brian Drummond
brian@shapes.demon.co.uk
Thu Feb 13 23:12:00 GMT 2014
I have built a crosscompiler for the MSP430, using a gcc4.9 snapshot
(gcc-4.9-20140112) and the compiler seems OK and builds a simple
"blinky" LED flashing example.
But my slightly larger example, originally built using Peter Bigot's
mspgcc backend, no longer compiles ...
mspgcc had a number of intrinsic functions, such as __nop(), __eint()
and __dint() respectively. Calling these would execute a nop, enable and
disable interrupts respectively.
Others such as __bis_status_register(), __bic_status_register() would
manipulate system status, low power modes etc.
Now in gcc4.9, these intrinsic functions have gone.
Perusing the config/msp430 source files, e.g. config/msp430/msp430.md I
can see evidence that the _functionality_ is still there, e.g.
(define_insn "enable_interrupts"
[(unspec_volatile [(const_int 0)] UNS_EINT)]
""
"EINT"
)
...
(define_insn "bis_SR"
[(unspec_volatile [(match_operand 0 "nonmemory_operand" "ir")]
UNS_BIS_SR)]
""
"BIS.W\t%0, %O0(SP)"
)
... but how do I access it? In other words, what C code fragment would
cause the "enable_interrupts" instruction to be emitted, and generate
"EINT" in the assembler or object output?
- Brian
More information about the Gcc-help
mailing list