1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

tools/openocd: Export IMAGE_OFFSET only when flashing

This commit is contained in:
Erik Ekman 2021-09-28 01:13:45 +02:00
parent 739ec44739
commit 2df7d499c8
2 changed files with 6 additions and 1 deletions

View File

@ -87,5 +87,5 @@ ifneq (,$(filter esp_jtag,$(USEMODULE)))
-c 'flash write_image erase "$(RIOTCPU)/$(CPU)/bin/bootloader.bin" $(BOOTLOADER_POS) bin' \
-c 'echo "Installing partition table at $(PARTITION_POS)"' \
-c 'flash write_image erase "$(BINDIR)/partitions.bin" $(PARTITION_POS) bin'
export IMAGE_OFFSET = 0x10000
IMAGE_OFFSET = 0x10000
endif

View File

@ -51,6 +51,11 @@ endif
OPENOCD_FLASH_TARGETS = flash flash-only
ifneq (,$(IMAGE_OFFSET))
# Export IMAGE_OFFSET only to the flash/flash-only target
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),IMAGE_OFFSET)
endif
ifneq (,$(OPENOCD_PRE_VERIFY_CMDS))
# Export OPENOCD_PRE_VERIFY_CMDS only to the flash/flash-only target
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_PRE_VERIFY_CMDS)