Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edbg.inc.mk: allow flashing with an offset in rom without erasing all ROM #9788

Merged
merged 2 commits into from
Aug 30, 2018

Conversation

cladmi
Copy link
Contributor

@cladmi cladmi commented Aug 16, 2018

Contribution description

This makes edbg.inc.mk more similar to openocd.sh behavior that can flash with an offset and only erasing the needed parts of the ROM. (at least after bug fixing #9787)

  • Disable erase of the whole ROM when flashing.
    • I could make this configurable if needed
  • Handle IMAGE_OFFFSET for configuring rom offset

Openocd is already not erasing the memory so not sure how "major" this is to change this default.

Testing

I do not currently have a dedicated test for this, but I will enable murdock to show it is not breaking the current tests.

  • Write a test for this

We can at least see that edbg gets the correct arguments:

make -C examples/hello-world BOARD=samr21-xpro  flash-only  IMAGE_OFFSET=0x1000

...
RIOT/dist/tools/edbg/edbg --offset 0x1000 -t atmel_cm0p -b -v -p -f ..../RIOT/examples/hello-world/bin/samr21-xpro/hello-world.bin

Issues/PRs references

This is part of the OTA implementation required features in #9342

@cladmi cladmi added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: tools Area: Supplementary tools CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Aug 16, 2018
@cladmi cladmi requested review from kaspar030 and kYc0o August 16, 2018 14:45
This mimics openocd behaviour that only erase needed sectors of the rom.
Allow flashing with an offset in ROM from the rom base address.
It reuses `IMAGE_OFFSET` configuration variable name from `openocd.sh`.

This will allow flashing multiple images with different flash operations.
Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

ACK.

@kaspar030 kaspar030 merged commit bcb438a into RIOT-OS:master Aug 30, 2018
@cladmi cladmi deleted the pr/edbg/flashbin branch September 3, 2018 13:57
@cladmi cladmi added this to the Release 2018.10 milestone Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants