1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #17251 from aabadie/pr/tools/openocd_verify_fix

tools/openocd: check OPENOCD_VERIFY after IMAGE_OFFSET is computed
This commit is contained in:
Francisco 2021-11-22 21:50:48 +01:00 committed by GitHub
commit 075677e883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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