Other Parts Discussed in Thread: UNIFLASH
Hello,
I'm compiling an application with a Makefile to a *.elf file. Then I want to flash this *.elf file on my microcontroller with Uniflash.
I always get this error: "[ERROR] CORTEX_m4_0: File Loader: Verification failed: Values at 0x00008000 do not match Please verify target memory and memory map."
My compiler is from Imperas and it is all running on Linux. But I'm flashing the microcontroller on Windows.
My Makefile looks like this:
IMPERAS_HOME := $(shell getpath.exe "$(IMPERAS_HOME)")
OPTIMISATION = -O2
CROSS = MICROBLAZE
SRC = main.cpp Timer/Timer.cpp Sensor/ADC.cpp Sensor/ADCSensor.cpp Sensor/GPIOSensor.cpp Segway/Segway.cpp Configuration/Configuration.cpp Antrieb/Motor.cpp Antrieb/PWM.cpp
SRCINC = microblaze_io.c microblaze/microblaze_enable_interrupts.s microblaze/microblaze_interrupt_handler.c microblaze/microblaze_interrupts_g.c microblaze_0/libsrc/common_v1_00_a/src/xbasic_types.c
INCOBJ = $(patsubst %.c,%.o,$(SRCINC))
OBJ = $(patsubst %.cpp,%.o,$(SRC))
EXE = Segway_microblaze.elf
-include $(IMPERAS_HOME)/lib/$(IMPERAS_ARCH)/CrossCompiler/$(CROSS).makefile.include
ifeq ($($(CROSS)_CC),)
IMPERAS_ERROR := $(error "Error : $(CROSS)_CC not set. Please check installation of toolchain for $(CROSS)")
endif
IMPERAS_CC = /opt/Imperas.20131018/lib/Linux32/CrossCompiler/microblaze-elf/bin/mb-g++ -fstack-check -I. -I/opt/ovp//ImpPublic/include/common -I/opt/ovp//ImpPublic/include/target/common -I/opt/ovp//ImpPublic/include/target/application -I/opt/ovp//lib/Linux32/TargetLibraries/include/microblaze
IMPERAS_LINK = /opt/Imperas.20131018/lib/Linux32/CrossCompiler/microblaze-elf/bin/mb-g++ -fstack-check -I. -I/opt/ovp//ImpPublic/include/common -I/opt/ovp//ImpPublic/include/target/common -I/opt/ovp//ImpPublic/include/target/application -I/opt/ovp//lib/Linux32/TargetLibraries/include/microblaze -L/opt/ovp//lib/Linux32/TargetLibraries/microblaze-elf
IMPERAS_LDFLAGS = -L. -lm -fstack-check -I. -Wl,-defsym,_STACK_SIZE=0x10000 -Wl,-defsym,_HEAP_SIZE=0x4000000 -limperas
#-limperas flag muss raus wenn die includes nicht eingebunden werden
all: $(EXE)
%.elf: $(OBJ) $(INCOBJ)
@ echo "# Linking $(CROSS) $@"
$(IMPERAS_LINK) -o $@ $^ $(IMPERAS_LDFLAGS)
%.o: %.cpp
@ echo "# Compiling $(CROSS) $<"
$(IMPERAS_CC) -c -o $@ $< -D$(CROSS) $(OPTIMISATION)
%.o: %.c
@ echo "# Compiling $(CROSS) $<"
$($(CROSS)_CC) -c -o $@ $< -D$(CROSS) $(OPTIMISATION)
clean:
rm -rf *.elf *.o
Do I have to tell the compiler that the *.elf file has to be like in die *.cmd file described?
Does anyone know the answer to my problem and can please help me.
If you need anything else or more information please let me know.
Regards,
Johannes