Menu

#335 msp430mcu headers in assembly

open
mcu (21)
5
2012-10-11
2012-09-26
Esmil
No

The chip-specific headers seem to be designed to work in both assembly and C code. What they do is this

#ifndef __STDC__
/* assembly stuff */
#else
/* C stuff */
#endif

However __STDC__ *is* defined when running the preprocessor on assembly files (.S), so the C stuff ends up being defined.
A solution is to do as is already done in the iomacros.h and intrinsics.h:

#ifdef __ASSEMBLER__
/* assembly stuff */
#else
/* C stuff */
#endif

Discussion

  • Peter A. Bigot

    Peter A. Bigot - 2012-10-11

    Rosty, could you please take this one for the next msp430mcu bundle? It'd probably be good if you could give me a preview to validate the fix against a test case before finalizing the release.

     
  • Peter A. Bigot

    Peter A. Bigot - 2012-10-11
    • assigned_to: pabigot --> stolyarr
     

Log in to post a comment.