1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tools/openocd: check OPENOCD_VERIFY after IMAGE_OFFSET is computed

This commit is contained in:
Alexandre Abadie 2021-11-22 13:03:32 +01:00
parent 638b86e749
commit 68bfd8e257
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -330,9 +330,6 @@ do_flash() {
exit $RETVAL
fi
fi
if [ -z "${OPENOCD_SKIP_VERIFY}" ]; then
OPENOCD_VERIFY="-c 'verify_image \"${IMAGE_FILE}\" ${IMAGE_OFFSET}'"
fi
# In case of binary file, IMAGE_OFFSET should include the flash base address
# This allows flashing normal binary files without env configuration
@ -344,6 +341,10 @@ do_flash() {
IMAGE_OFFSET=$(printf "0x%08x\n" "$((${IMAGE_OFFSET} + ${FLASH_ADDR}))")
fi
if [ -z "${OPENOCD_SKIP_VERIFY}" ]; then
OPENOCD_VERIFY="-c 'verify_image \"${IMAGE_FILE}\" ${IMAGE_OFFSET}'"
fi
if [ "${IMAGE_OFFSET}" != "0" ]; then
echo "Flashing with IMAGE_OFFSET: ${IMAGE_OFFSET}"
fi