Reply by jack...@motec.com.au September 20, 20052005-09-20
Hi,
I'm using V7.0 of the 56800E tools to build for the 56F8323

I'm trying to build my project using the MW command line tools with limited success.
I can get the project to compile/assemble and link, but the elf file won't debug in the MW IDE.

My makefile is shown below.
When I build the same set of files from the IDE, the elf file can be loaded into the IDE and debugged. Both .c and .asm files are listed.
When I build using the command line tools, the elf file will load into the IDE, but with the following issues:
- only the .c files appear in the project file list in the IDE
- The 'Project Creator Log' has several errors similar to:
Warning : Could not add file to project : E:\Products\Hybrid\Layout\Metrowerks\CodeWarrior\M56800E Support\runtime_56800E\init\FSTART.asm.
File could not be found. Missing full path.

I don't have the path E:\Products etc, so I'm assuming this was the path on the machine that built the libraries that came from MW.

Questions:
- Is there a way to see what command line options are passed to the compiler/assembler/linker when building in the IDE?
- Do I have to compile the libraries on my own machine? If so, why is not necessary when building from the IDE?
- Is there an IDE equivalent to the -D command line option in the compiler, for passing #defines to a .c file?
- Is anybody else using the command line tools, or am I on my own?

Cheers,
Jackson #makefile

CFLAGS = -O3 -c -g -padpipe -sprog -ldata -I. -I../common
AFLAGS = -debug -data 24 -prog 19 -codegen -c
LFLAGS = -g -ldata -sortbyaddr -map

##### Set system includes paths used by compiler and linker #####
export MWC56800EIncludes := +C:/Program Files/Metrowerks/CodeWarrior/M56800E Support
export MW56800ELibraries := +C:/Program Files/Metrowerks/CodeWarrior/M56800E Support
export MW56800ELibraryFiles := Runtime 56800E lmm.Lib;MSL C 56800E LMM.lib

OBJS := DSP56800E_promxram.obj \
DSP56800E_zeroBSS.obj \
MC56F832x_vector.obj \
MC56F83xx_init.obj \
VIM.obj \
ADC.obj \
can.obj \
flash.obj \
utils.obj

BUILDLIST := $(addprefix build/,$(OBJS))

vpath %.c ../common
vpath %.asm support

all : build/vim.elf

build/%.obj: %.c
mwcc56800e ${CFLAGS} -o $@ $<

build/%.obj: %.asm
mwasm56800e ${AFLAGS} -o $@ $<

build/vim.elf:$(BUILDLIST)
mwld56800e ${LFLAGS} -o build/vim.elf $(BUILDLIST) lcf/MC56F832x_pROM-xRAM_linker.cmd

clean:
rm -f build/*