Skip to content

makefiles/boot/riotboot.mk: fix unrelated introduced change#11284

Merged
emmanuelsearch merged 1 commit intoRIOT-OS:masterfrom
cladmi:pr/riotboot/fixup_changed_line_openocd
Mar 26, 2019
Merged

makefiles/boot/riotboot.mk: fix unrelated introduced change#11284
emmanuelsearch merged 1 commit intoRIOT-OS:masterfrom
cladmi:pr/riotboot/fixup_changed_line_openocd

Conversation

@cladmi
Copy link
Copy Markdown
Contributor

@cladmi cladmi commented Mar 26, 2019

Contribution description

This change was introduced by mistake by the edbg refactoring. This
restores the original value for openocd.

Testing procedure

This fixes tests/riotboot_flashwrite when called with riotboot/flash-slot0:

BOARD=iotlab-m3 make -C tests/riotboot_flashwrite/ riotboot/flash-slot0 FLASHER=true
true flash /home/harter/work/git/RIOT/tests/riotboot_flashwrite/bin/iotlab-m3/tests_riotboot_flashwrite-slot0.riot.bin

in master

true flash /home/harter/work/git/RIOT/tests/riotboot_flashwrite/bin/iotlab-m3/tests_riotboot_flashwrite.elf

The flashed file for riotboot/flash-slot0 in tests/riotbootwas however still correct in master due to the ELFFILE = $(FLASHFILE) hack to have make flash working in tests/riotboot.

BOARD=iotlab-m3 make -C tests/riotboot riotboot/flash-slot0 FLASHER=true
true flash /home/harter/work/git/RIOT/tests/riotboot/bin/iotlab-m3/tests_riotboot-slot0.riot.bin

Review only:

git diff 72bc21c0d -- makefiles/boot should show that now only changes to HEXFILE are left

diff --git a/makefiles/boot/riotboot.mk b/makefiles/boot/riotboot.mk
index bca34b714..90ad575cb 100644
--- a/makefiles/boot/riotboot.mk
+++ b/makefiles/boot/riotboot.mk
@@ -97,9 +97,6 @@ $(RIOTBOOT_EXTENDED_BIN): $(RIOTBOOT_COMBINED_BIN)
        $(Q)truncate -s $$(($(SLOT0_OFFSET) + $(SLOT0_LEN) + $(RIOTBOOT_HDR_LEN))) [email protected]
        $(Q)mv [email protected] $@

-# Flashing rule for edbg to flash combined/extended binaries
-riotboot/flash-combined-slot0: HEXFILE=$(RIOTBOOT_COMBINED_BIN)
-riotboot/flash-extended-slot0: HEXFILE=$(RIOTBOOT_EXTENDED_BIN)
 # Flashing rule for openocd to flash combined/extended binaries
 riotboot/flash-combined-slot0: ELFFILE=$(RIOTBOOT_COMBINED_BIN)
 riotboot/flash-extended-slot0: ELFFILE=$(RIOTBOOT_EXTENDED_BIN)
@@ -114,8 +111,6 @@ riotboot/flash-extended-slot0: $(RIOTBOOT_EXTENDED_BIN) $(FLASHDEPS)

 # Flashing rule for slot 0
 riotboot/flash-slot0: export IMAGE_OFFSET=$(SLOT0_OFFSET)
-# Flashing rule for edbg to flash only slot 0
-riotboot/flash-slot0: HEXFILE=$(SLOT0_RIOT_BIN)
 # openocd
 riotboot/flash-slot0: ELFFILE=$(SLOT0_RIOT_BIN)
 riotboot/flash-slot0: FLASHFILE=$(SLOT0_RIOT_BIN)
@@ -124,8 +119,6 @@ riotboot/flash-slot0: $(SLOT0_RIOT_BIN) $(FLASHDEPS)

 # Flashing rule for slot 1
 riotboot/flash-slot1: export IMAGE_OFFSET=$(SLOT1_OFFSET)
-# Flashing rule for edbg to flash only slot 1
-riotboot/flash-slot1: HEXFILE=$(SLOT1_RIOT_BIN)
 # openocd
 riotboot/flash-slot1: ELFFILE=$(SLOT1_RIOT_BIN)
 riotboot/flash-slot1: FLASHFILE=$(SLOT1_RIOT_BIN)

Issues/PRs references

#11172 when updating edbg
This is to get a proper fix for this issue only without the whole change from #11254 that now also includes this commit.

This change was introduced by mistake by the `edbg` refactoring. This
restores the original value for openocd.
@cladmi cladmi added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 26, 2019
@cladmi cladmi added this to the Release 2019.04 milestone Mar 26, 2019
@cladmi cladmi added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Mar 26, 2019
@kYc0o
Copy link
Copy Markdown
Contributor

kYc0o commented Mar 26, 2019

Looks legit, however I can't test on hardware right now. I'll ACK it but if one can test is better.

Copy link
Copy Markdown
Contributor

@kYc0o kYc0o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@emmanuelsearch
Copy link
Copy Markdown
Member

tested riot/flash-slot0 on iotlab-m3 works like a charm ;)

@emmanuelsearch emmanuelsearch merged commit ba1008d into RIOT-OS:master Mar 26, 2019
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 26, 2019

Thanks for reviewing and testing.

@cladmi cladmi deleted the pr/riotboot/fixup_changed_line_openocd branch March 26, 2019 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants