On Sep 9, 2010, at 5:36 AM, Peter Bigot wrote:

Nonetheless, if you can't get ti-20100815 to build with the current mspgcc4 on any reasonable platform, that's something we need to get fixed ASAP. Can you provide more details, here or as a ticket on the mspgcc project (or
is there already a ticket I've missed)?

I have problems with building libc, as I mentioned.
MacOS 10.5.8 I have:

Select GCC version to build:
1) gcc-4.4.4
2) gcc-4.4.3
3) none
Enter your choice (1-3) [1]: 1

Select GDB version to build:
1) gdb-7.1
2) gdb-7.0.1
3) none
Enter your choice (1-3) [1]: 1

Select Insight version to build:
1) insight-6.8-1
2) none
Enter your choice (1-2) [1]: 2

Select libc version to build:
1) 20100815
2) ti_20100829
3) ti_20100815
Enter your choice (1-3) [1]: 2

Strip debug information
from executables after install? (y/n) [y]

Enter target toolchain path
[/opt/msp430-gcc-4.4.4]: /sw/cross/msp430-ti

And it eventually fails:

msp430-gcc -x assembler-with-cpp -c -mmcu=msp3 -I./../include/ti - I./../include -I. ./stdlib/div.S -o Build/msp3/div.o
./stdlib/div.S: Assembler messages:
./stdlib/div.S:9: Error: unknown opcode `xpushm'
./stdlib/div.S:24: Error: unknown opcode `xpopm'
make[1]: *** [Build/msp3/div.o] Error 1

Looking at div.S, there is:
#include    "../core_common.inc"
/* ldiv() is the same as __divmodsi4() in libgcc */

        .section .text
        .global div
div:
;; save clobbers first
#if defined(__MSP430X__)
        XPUSHM  #2, r11
#else


But elsewhere (in core_common.inc), code under __MPS430X__ is completely disabled and so XPUSHM does not get defined. I don't see how this compiles on any platform...

/* pab 20100724 Disable MSP430X recognition: the required supporting
 * infrastructure has not been integrated into mpsgcc4. */

#if 0 /* defined(__MSP430X__) */
  #if defined(__MSP430X_ADDR_16BIT__)
    #define XBR     br
    #define XCALL   call
    #define XRET    ret
    #define XMOVA   mov
    #define XCMP    cmp
  #else
    #define XBR     bra
    #define XCALL   calla
    #define XRET    reta
    #define XMOVA   mova
    #define XCMP    cmpa
  #endif
  #if defined(__MSP430X_REGS_16BIT__)
    #define XPUSH   pushx.w
    #define XPOP    popx.w
    #define XPUSHM  pushm.w
    #define XPOPM   popm.w
    #define XMOV    movx.w
    .equ    PUSH_BYTES, 2
  #else
    #define XPUSH   pushx.a
    #define XPOP    popx.a
    #define XPUSHM  pushm.a
    #define XPOPM   popm.a
    #define XMOV    movx.a
    .equ    PUSH_BYTES, 4
  #endif
#else
  #define XBR     br
  #define XCALL   call
  #define XRET    ret
  #define XMOV    mov
  #define XCMP    cmp
  #define XPUSH   push
  #define XPOP    pop
  #define XMOVA   mov
  .equ    PUSH_BYTES, 2
#endif


Reply via email to