Dan Miner wrote:
Try this
msp430-gcc -mmcu=msp430x149 -x assembler-with-cpp test.s -c -o test.o
The #define directive is not an something that the assembler
understands, its got to be run through the c pre processor. Renaming the
file test.S also works as this is the default extension for preprocessing.
I am having trouble assembling an assembly language source file.
Here is a small sample file to demonstrate the issue:
;;;;;;;;;;;;;;;;;;;;;; file test.s ;;;;;;;;;;;;;;;
#define foo1 1
#define foo2 2
mov.w #foo1, R4 ; works
mov.w #foo2, R5 ; works
mov.w #foo1+2, R5 ; works
mov.w #1+foo2, R5 ; works
mov.w #foo1+foo2, R5 ; fails
mov.w # foo1 + foo2 , R5 ; fails
mov.w #(foo1+foo2), R5 ; fails
mov.w # ( foo1 + foo2 ) , R5 ; fails
;;;;;;;;;;;;;;;;;; end of file test.s ;;;;;;;;;;;;
Command line:
C:\Data> msp430-gcc -mmcu=msp430x149 test.s -o test.o
test.s: Assembler messages:
test.s:9: Error: unknown operand #foo1+foo2
test.s:10: Error: unknown operand #foo1+foo2
test.s:11: Error: unknown operand #(foo1+foo2)
test.s:12: Error: unknown operand #(foo1+foo2)
I'm running Windows 2000 and I used the default installer and
binaries from http://mspgcc.sourceforge.net/ .
I don't know if this is really a bug or something I am doing
wrong. If possible, please tell me how I can make this work.
- Dan Miner
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
--
Peter Jansen
STS
Australian Antarctic Division
Channel Highway
Kingston
TAS 7050
AUSTRALIA
Ph (03) 62 323 533
Fax (03) 62 323 351