Jump to content
Sign in to follow this  
larsie

Problem setting up newest MSPGCC on Ubuntu

Recommended Posts

I've got some problems with setting up the newest version of MSPGCC on Ubuntu 10.04. Is the mailing list the best place to ask?

 

If someone here's an expert, this is the problem:

 

It basically doesn't recognize which MCU I'm trying to compile for, giving an error that it can't find the MCU definition (the below example is for MSP430G2553), but it's not listing any value line devices. Must be something wrong in my path/settings/library etc. I'm using Ubuntu 10.04. My msp430mcu.spec has the device. I guess I'm doing it wrong somehow.

 

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

Makefile: (output of running Make is on the bottom).

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

#

# Makefile for msp430

#

# 'make' builds TARGET

# 'make clean' deletes everything except source files and Makefile

# 'make program' programs flash on msp430 with TARGET, then resets it.

# 'make reset' resets the msp430

 

 

TARGET = msp430.elf

#MCU = msp430x149

MCU = msp430g2553

 

# List all the source files here

# eg if you have a source file foo.c then list it here

XSOURCES = main.c

SOURCES = $(wildcard *.c)

 

# Use lines like those below to include your own libraries, include files (if you have any).

# Changing a library won't cause a rebuild - use make clean then make.

# this will link libboard430.a (use LIBPATH to say where it is, and take care of the order):

#LIBS = -lcc2420 -lboard430

 

# paths to extra libraries and extra standard includes

#ROOTPATH = ../..

LIBPATH = -L/usr/local/msp430/msp430/lib

INCLUDES = -I/usr/local/msp430/include

 

LD_LIBRARY_PATH := ${LD_LIBRARY_PATH}:/usr/local/msp430/msp430/lib

 

PATH := /usr/local/msp430/bin/:${PATH}:/usr/local/msp430/bin/

 

 

# You probably don't need to change anything below this line.

#######################################################################################

# below had -g -O3 option

 

CFLAGS = -mmcu=$(MCU) -Wall -Wcast-align -Wcast-qual -Wimplicit \

-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \

-Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow \

-Wstrict-prototypes -Wswitch -Wunused $(INCLUDES)

ASFLAGS = -mmcu=$(MCU) -x assembler-with-cpp -Wa,-gstabs

LDFLAGS = -mmcu=$(MCU) -Wl,-rpath -Wl,$(LIBPATH)

#LDFLAGS = -mmcu=$(MCU) -Wl $(LIBPATH)

 

########################################################################################

 

CC = msp430-gcc -v

LD = msp430-ld

AR = msp430-ar

AS = msp430-gcc

GASP = msp430-gasp

NM = msp430-nm

OBJCOPY = msp430-objcopy

RANLIB = msp430-ranlib

STRIP = msp430-strip

SIZE = msp430-size

READELF = msp430-readelf

CP = cp -p

RM = rm -f

MV = mv

#Linux jtag program

JTAGPROG = jtag.py

#Windows jtag program

#JTAGPROG = msp430-jtag

PROGRAM = $(JTAGPROG) -mEpv

RESET = $(JTAGPROG) -r

########################################################################################

 

# the file which will include dependencies

DEPEND = $(TARGET:.elf=.d)

 

# all the object files

OBJECTS = $(SOURCES:.c=.o)

 

$(TARGET): $(OBJECTS) Makefile

$(CC) -v $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@

 

# rule for making assembler source listing, to see the code

%.lst : %.c

$(CC) -c $(CFLAGS) -Wa,-anlhd $< > $@

 

# include the dependencies

-include $(DEPEND)

 

# dependencies file

# includes also considered, since some of these are our own

# (otherwise use -MM instead of -M)

$(DEPEND): $(SOURCES) Makefile

$(CC) -M ${CFLAGS} $(SOURCES) >$@

 

 

.PHONY: clean

 

clean:

-$(RM) $(OBJECTS)

-$(RM) $(TARGET)

-$(RM) $(SOURCES:.c=.lst)

-$(RM) $(DEPEND)

 

.PHONY: program

program: $(TARGET)

$(PROGRAM) $(TARGET)

 

.PHONY: reset

reset:

$(RESET)

 

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

Make output

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

 

lars@rock:~/test$ make

msp430-gcc -v -mmcu=msp430g2553 -Wall -Wcast-align -Wcast-qual -Wimplicit -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wunused -I/usr/local/msp430/include -c -o main.o main.c

Using built-in specs.

Reading specs from /usr/local/msp430/lib/gcc/msp430/4.6.1/../../../../msp430/lib/msp430mcu.spec

COLLECT_GCC=msp430-gcc

COLLECT_LTO_WRAPPER=/usr/local/msp430/libexec/gcc/msp430/4.6.1/lto-wrapper

Target: msp430

Configured with: ../../configure --target=msp430 --enable-languages=c,c++ --prefix=/usr/local/msp430

Thread model: single

gcc version 4.6.1 20110627 (mspgcc dev 20120125) (GCC)

COLLECT_GCC_OPTIONS='-v' '-mmcu=msp430g2553' '-Wall' '-Wcast-align' '-Wcast-qual' '-Wimplicit' '-Wmissing-declarations' '-Wmissing-prototypes' '-Wnested-externs' '-Wpointer-arith' '-Wredundant-decls' '-Wreturn-type' '-Wshadow' '-Wstrict-prototypes' '-Wswitch' '-Wunused' '-I' '/usr/local/msp430/include' '-c' '-o' 'main.o' '-mcpu=430' '-mmpy=none' '-mivcnt=16'

/usr/local/msp430/libexec/gcc/msp430/4.6.1/cc1 -quiet -v -I /usr/local/msp430/include -D__MSP430G2553__ main.c -mcpu=430 -mmpy=none -mivcnt=16 -quiet -dumpbase main.c -mmcu=msp430g2553 -mcpu=430 -mmpy=none -mivcnt=16 -auxbase-strip main.o -Wall -Wcast-align -Wcast-qual -Wimplicit -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wunused -version -o /tmp/cc2wG8Ar.s

GNU C (GCC) version 4.6.1 20110627 (mspgcc dev 20120125) (msp430)

compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version 2.4.2-p1, MPC version 0.8.1

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

ignoring nonexistent directory "/usr/local/msp430/lib/gcc/msp430/4.6.1/../../../../msp430/sys-include"

#include "..." search starts here:

#include <...> search starts here:

/usr/local/msp430/include

/usr/local/msp430/lib/gcc/msp430/4.6.1/include

/usr/local/msp430/lib/gcc/msp430/4.6.1/include-fixed

/usr/local/msp430/lib/gcc/msp430/4.6.1/../../../../msp430/include

End of search list.

GNU C (GCC) version 4.6.1 20110627 (mspgcc dev 20120125) (msp430)

compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version 2.4.2-p1, MPC version 0.8.1

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

Compiler executable checksum: deb79d066428197b4567c46440799008

main.c: In function

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...