Does CrossStudio for MSP430 produce fully relocatable code?

Comments

1 comment

  • Avatar
    Paul Curtis

    > Title says it all really

    I disgree!  The title asks for fully relocatable code and, yes, CrossWorks object files are fully relocatable. But linked code is not position independent and cannot be moved/duplicated at runtime.

    > - I'm wanting to put the same code at 2 different locations in flash - fairly big code (23K) - does CrossStudio generate relative jumps or absolute?

    It uses both: small when they can be small and then absolute when they are out of range of a relative jump. For full position independence, you will take a hit in code size and, unfortunately, CrossWorks does not support position independent code.  There's lots of other additional problems, such as what a function pointer is if the code moves...

    0
    Comment actions Permalink

Please sign in to leave a comment.