MSP430 Function pointers


1 comment

  • Avatar
    Paul Curtis

    > Can anyone advise on if this is actually a bug in the compiler and provide a work around please.

    It is not a bug.  Generation for >64k of code requires pointers to be thunked (that is, the function pointer does not hold the address of the function, it holds the address of where you will find the address of the function).  Doing it this way means that function pointers stay in 16 bits and can be passed through a void * without problem, or cast to an int and back again, without problem.

    Comment actions Permalink

Please sign in to leave a comment.