Tool/software: Linux
Hello,
I got some trouble compiling my project on linux. I'm working with Imperas Open Virtual Platform (ovpworld.org) and I'm compiling it with a makefile.
Makefile:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
IMPERAS_HOME := $(shell getpath.exe "$(IMPERAS_HOME)")
include $(IMPERAS_HOME)/bin/Makefile.include
ifndef IMPERAS_HOME
IMPERAS_ERROR := $(error "IMPERAS_HOME not defined")
endif
CROSS=ARM_CORTEX_M4F
-include $(IMPERAS_HOME)/lib/$(IMPERAS_ARCH)/CrossCompiler/$(CROSS).makefile.include
ifeq ($($(CROSS)_CXX),)
IMPERAS_ERROR := $(error "Please install the toolchain to support $(CROSS) ")
endif
OPTIMISATION?=-O2
SRC = $(sort $(wildcard main.cpp)) $(sort $(wildcard Configuration/Configuration.cpp)) $(sort $(wildcard Segway/Simulation.cpp)) $(sort $(wildcard Segway/Segway.cpp)) $(sort $(wildcard Sensor/ADC.cpp)) $(sort $(wildcard Sensor/ADCSensor.cpp)) $(sort $(wildcard Antrieb/Motor.cpp)) $(sort $(wildcard Sensor/GPIOSensor.cpp)) $(sort $(wildcard Timer/Timer.cpp)) $(sort $(wildcard Antrieb/PWM.cpp)) $(sort $(wildcard tm4c123gh6pm_startup_ccs.c))
EXE = application.ARM_CORTEX_M4F.elf
all: $(EXE)
%.elf: main.o Segway/Segway.o Timer/Timer.o Sensor/ADC.o Sensor/ADCSensor.o Sensor/GPIOSensor.o Configuration/Configuration.o Antrieb/Motor.o Antrieb/PWM.o tm4c123gh6pm_startup_ccs.o
$(V) $(IMPERAS_LINKXX) -o $@ $^ $(IMPERAS_LDFLAGS)
# Compilation of standard benchmarch code
%.o: %.cpp
$(V) echo "# Compiling $<"
$(V) $(IMPERAS_CXX) -g -c -o $@ $< #$(OPTIMISATION)
%.o: %.c
$(V) echo "# Compiling $<"
$(V) $(IMPERAS_CC) -g -c -o $@ $< #$(OPTIMISATION)
clean:
-rm -f *.elf *.o
realclean: clean
-rm -f *.log
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
So my compiler and linker are from Imperas but I don't think that they are the problem.
I get errors with the assembler code when I compile the interrupt vector table (tm4c123gh6pm_startup_ccs.c).
Does anyone know how to compile it correctly?
Are there any example makefiles for compiling a project on linux?