Hello JMGross, thank you for the reply.
I now think the problem is that the assembling/linking process is somehow
incomplete. In the example below, I'm just referring to a symbol which is in
the same source file:
.arch msp430x1232
#include
.org 0xE080
.text
main: mov #message, R14
jmp main
message: .ascii "hello world"
.byte 0
.end
The instruction "mov #message, R14" is getting assembled as "3E 40 00 00"
In a nutshell, the assembler is rendering "mov #message, R14" as "mov #0, R14".
I suspect this is closer to the root cause of my problem.
My source code is the file "f.s" and it is being compiled with the command
"msp430-gcc -c f.s -o f.out
", then converted to intel hex using "msp430-objcopy -O ihex f.out f.hex"
The msp430x12x2.h file is located in /usr/msp430/include, where it appeared
when I first installed msp430-gcc with apt-get (on a Ubuntu 9.04 system.)
There are no error messages from the command line launch of msp430-gcc.
Is there a linking step I am missing? Perhaps there is a symbol table
containing the address of message: in the above example, or &U0TXBUF in my
initial example, which is not getting applied to the object code?
Thanks again for the patience of those on the reflector!
Dave
>Hi!
>Don't you get any warnings when compiling your code?
>...
>I never used assembler directly, only as inline assembler through
>C++, but looking at your code and the mspgcc include files I have here,
>I wonder where U0TXBUF is defined for assembly use.
>JMGross
---------------------------
>
> Message: 5
> Date: Tue, 11 Aug 2009 15:58:22 -0600
> From: david feldman
> Subject: [Mspgcc-users] Unexpected output from msp430-gcc assembler
> (simple problem?)
> To:
> Message-ID:
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> I'm having trouble getting the msp430-gcc assembler to emit working code in
> this example (target is MSP430F1232) - it appears the symbol U0TXBUF (which
> should point to the UART transmit data register) is getting assembled as 0,
> not hex 77 (I don't
_________________________________________________________________
Windows Liveā¢: Keep your life in sync.
http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009