hi alan,

 

 

>>As you can see, there is some error to do with `msp430-ld'. How do I solve
this?

is your path correct ? are you able to exec msp430-ld directly (from your
IDE (where you call gcc))

 

 

>>Otherwise in the GCC litterature, the word makefile is used a lot. How do
I go about creating one and what should I put in it?

about the makefile - the next few lines show a simple makefile exmaples:

 

.SUFFIXES:            # Delete the default suffixes

 

NAME=outputname.elf

 

CC=msp430-gcc

CPU=msp430x427

ASMOPT = -mmcu=${CPU}

CFLAGS = -mmcu=${CPU} -O2 -Wall -g

 

OBJECTS = Transmitter_31_12.o flash_31_12.o sd16_31_12.o
port1_interrupt_31_12.o

 

all: ${NAME}

 

%.o: %.c

#          $(CC) ${CFLAGS} -S -dp $<

            $(CC) ${CFLAGS} -c $<

 

${NAME}: ${OBJECTS}

            $(CC) -mmcu=${CPU} -o $@ $^

            msp430-objcopy -O ihex $@ [email protected]

#          msp430-objdump -DS ${NAME} >${NAME}.lst

            msp430-size ${NAME}

 

.PHONY: clean

clean:

            del *.o ${NAME} ${NAME}.lst ${NAME}.hex

            

#automatic collection of dependencies in the source files.

#it's only updated the first time, after that it must be done maually

#with "make depend"

#the dependecies are included from a separate file:

-include dependencies.in

#target to update the file, it's removed first

depend: rmdepend dependencies.in

#remove the file

rmdepend:

            rm -f dependencies.in

#build the file that contains the dependencies. no deps in this rule.

#if there were deps it would be rebuilt every chnage, which is unneded:

dependencies.in:

            $(CC) -MM ${CFLAGS} $(patsubst %.o,%.c,$(OBJECTS)) >$@

 

 

 

good luck,

 matthias

 

 

  _____  

Von: [email protected]
[mailto:[email protected]] Im Auftrag von Alan Ball
Gesendet: Mittwoch, 4. April 2007 15:25
An: [email protected]
Betreff: [Mspgcc-users] installing gcc compiler and debugger

 

Dear All,

 

This morning, I downloaded the gcc compiler of the sourceforge web site. I
then installed it on my pc. Once I did this, I realised that it didn't have
a GUI, so I also downloaded SciTE.

 

I want to be able to use the MSP430 USB Debug-Interface to download my code.


 

I wrote C code for my MSP application with an IAR compiler and am trying to
recompile the code with GCC. My code is made up for 4 C files. I changed the
declaration of all my interrupt function prototypes so that it matchs what
it says in the GCC manual. I also included the signal.h header file.

 

In SciTE I type the following command to compile my code:

 

>msp430-gcc -mmcu=msp430x427 -g -Os -o Transmitter_31_12.c flash_31_12.c
sd16_31_12.c port1_interrupt_31_12.c
port1_interrupt_31_12.c:17: warning: built-in function `index' declared as
non-function
port1_interrupt_31_12.c: In function `intPort1':
port1_interrupt_31_12.c:1381: warning: comparison is always false due to
limited range of data type
msp430-gcc: installation problem, cannot exec `msp430-ld': No such file or
directory
>Exit code: 1    Time: 0.662

 

As you can see, there is some error to do with `msp430-ld'. How do I solve
this?

 

Otherwise in the GCC litterature, the word makefile is used a lot. How do I
go about creating one and what should I put in it?

 

Could somebody possibly talk me through, how to create a GCC project,
compile the code, download the file to the MSP and then debug the code using
breakpoints etc?

 

Thanks in advance for your help,

 

Regards,

 

Alan

 

  _____  

What kind of emailer are you? Find out today - get a free analysis of your
email personality. Take the quiz at the Yahoo!
<http://uk.rd.yahoo.com/mail/uk/taglines/default/championships/quiz/*http:/u
k.rd.yahoo.com/evt=44106/*http:/mail.yahoo.net/uk/>  Mail Championship.

Reply via email to