This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F149: Compilation error

Part Number: MSP430F149

Hi,

We need to compile an old project with a new compiler. But there were some incompatibilities. The old code construction is like this: port5.out.pin6 = 1. New compiler does not understand this construction. Old compiler: https://sourceforge.net/projects/mspgcc/ . New compiler: https://www.ti.com/tool/MSP430-GCC-OPENSOURCEHow do I fix this problem? Please help, thanks.

  • without changing this line if possible

  • If you have the old headers, looks for the struct definitions that allow for that syntax and copy them to a new header for the new compiler.

  • Add iostructures.h to new project, but this causes assembler problems:

    Assembler messages:

    Error: expected symbol name
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccaQQzxz.s:1875: Error: Missing symbol name in directive
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccaQQzxz.s:1875: Error: junk at end of line, first unrecognized character is `x'

  • Dmitrii,

    It is unclear to me exactly what the error is. Are you using CCS? Can you post more of the error message?

    Evan

  • I use msp430-gcc, make and command line.

    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s: Assembler messages:
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1873: Error: expected symbol name
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1875: Error: Missing symbol name in directive
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1875: Error: junk at end of line, first unrecognized character is `x'
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1876: Error: expected comma after name `' in .size directive
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1877: Error: junk at end of line, first unrecognized character is `0'
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1879: Error: expected symbol name
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1880: Error: Missing symbol name in directive
    C:\Users\D3EF3~1.POT\AppData\Local\Temp\ccvDFVzJ.s:1880: Error: junk at end of line, first unrecognized character is `x'

  • I found some interesting lines in iostructures.h. Maybe they cause errors: 

    #if defined(__MSP430_HAS_PORT1__)  ||  defined(__MSP430_HAS_PORT1_R__)
    __MSP430_EXTERN__ struct port_full_t port1 asm("0x0020");
    #endif
  • I'm not sure if you will be able easily copy all of the old header files into you new project. It may be easier to copy each data structure that you require. Otherwise you will end up debugging a lot of issues that project doesn't actually require.

  • There is only one header file and it is completely needed to define new structures. But unfortunately I can't deal with this assembler error.

  • You need to be looking at the assembler source produced to see what is going on. The "-S" option will tell gcc to stop at that point leaving you with the .s file to examine.

    Once you have that you should be able to figure what is causing the trouble.

**Attention** This is a public forum