I am just beginning a new project using mspgcc-20120406-p20120911. I have the code below, which I believe to be properly structured.
typedef void (*cbFunction_t)(void); cbFunction_t callbackFunc = 0;
I get the compiler error "dangerous relocation: unaligned address" on the following lines where I try to assign a value to the function pointer:
void registerISRCallback (cbFunction_t callbackFunc)
{
callbackFunc= callbackFunc;
}
void unregisterISRCallback (void)
{
callbackFunc= NULL;
}
I have tried the exact same code in CCS v5.4 and it compiles fine. Am I missing a #pragma or other that solve this issue in mspgcc? I would appreciate any help on this. Thanks.
