This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EK-TM4C123GXL: [ERROR] CORTEX_M4_0: File Loader: Verification failed: Values at address 0x00008000 do not match Please verify target memory and memory map.

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: UNIFLASH,

Hello,

I'm compiling an application on Linux with a Makefile. The Compiler and Linker is from Imperas (OVP World). After compiling I get a *.elf file, that I want to flash on the Tiva C using Uniflash on Windows.

I always get this error when I press the buttom "Verify Image": [ERROR] CORTEX_M4_0: File Loader: Verification failed: Values at address 0x00008000 do not match Please verify target memory and memory map.

Is there a way that I can include the *.cmd file with the memory map to my Makefile?

My Makefile looks like this:

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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


OPTIMIZATION=-Os


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))


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
    $(V)  echo "# Linking $@"
    $(V) $(IMPERAS_LINKXX)  -o $@ $^ $(IMPERAS_LDFLAGS)


# Compilation of standard benchmarch code
%.o: %.cpp
    $(V)  echo "# Compiling $<"
    $(V)  $(IMPERAS_CXX) -g -c -o $@ $< $(OPTIMIZATION) -lm

clean:
    -rm -f *.elf *.o

realclean: clean
    -rm -f *.log

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Does someone know a solution for my problem and can help me?

Please let me know if you need any further information.

Thank you!

Johannes

  • Hi Johannes,
    Normally this type of errors arise due to mismatch between:
    1. what the Linker thinks the amount of writable memory is available on the target you are building the application for
    2. In your case what the Uniflash thinks the amount of writable memory available on the target
    3. the actual available writable memory is on the target at the time the program load was attempted

    I think the most likely problem - as you have suspected - is on the linking phase of your build where the linker combines object files and allocates sections into the target system's configured memory. I don't have any knowledge with the Imperas. I will suggest you contact Imperas for support on how to input the the equivalent of .cmd into the Makefile.
  • Address 0x00008000 is a valid flash address for the EK-TM4C123GXL. You mention that you get this error when you select "Verify Image". Did you get any error messages when you programmed the device using "Load Image"?
  • The warning I get then is: [WARNING] CORTEX_M4_0: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.

    So it probably is that the memory map is not included in the linking.

    If you have any idea please let me know. Thanks for your help
  • You definitely need to include a linker command file in your project. It will likely end in a ".cmd" extension and look something like this file:

    /cfs-file/__key/communityserver-discussions-components-files/908/tm4c123ge6pm.cmd