elf File not valid
Hi
I found a related OpenOCD error in the net:
https://lists.riot-os.org/pipermail/notifications/2015-February/028991.html
That implies to me, that the named value, “(‘exit’)” in this case, is an argument of the “-c” option of OpenOCD.
There seems to be an optional value in the list of arguments of the “-c” command option which overrides the image base address.
I have traced the complete call to openocd on my linux box
Eclipse makes a new thread and then execs openocd there:
[pid 14427] execve("/home/db/eclipse/cpp-mars/eclipse/../../../.p2/pool/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.13.0.201701121612/tools/openocd/bin/openocd", ["/home/db/eclipse/cpp-mars/eclipse/../../../.p2/pool/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.13.0.201701121612/tools/openocd/bin/openocd", "-f", "L433CCT6-mini-sys.cfg", "-s", "/array_data01/STM32L433CCTx-mini-sys-01/L433CCTx-mini-sys", "-s", "/home/db/eclipse/cpp-mars/eclipse/../../../.p2/pool/plugins/fr.ac6.mcu.debug_1.12.0.201701121612/resources/openocd/scripts", "-c", "program Debug/L433CCTx-mini-sys.elf verify reset exit"], [/* 114 vars */] <unfinished ...> [pid 14427] <... execve resumed> ) = 0
OpenOCD is called with the argument of the “-c” command option: “programm” as used by AC6
Syntax:
program filename verify reset exit offset
In the case above taken from the net search the word “exit” was interpreted as offset by OpenOCD and so not valid.
The wording image.base_address seems to exist in the source of OpenOCD only.
Full Docu for flash commands:
http://openocd.org/doc/html/Flash-Commands.html#program
Examples:
http://openocd.org/doc/html/Flash-Programming.html
In the case of .elf file the “offset” is not needed because it is in the elf header.
In your case the filename seems to be taken as offset.
You should try to configure your OpenOCD the right way.
Dieter