Skip to content

Naive way to merge sketches and bootloaders in bin format #192

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

Closed
wants to merge 2 commits into from

Conversation

facchinm
Copy link
Member

Works with SAMD platform (at least)

@ArduinoBot
Copy link
Contributor

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-192.zip

ℹ️ To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

@matthijskooijman
Copy link
Collaborator

This looks a bit like we're hardcoding too much. The current merging of .hex files is already a special case, and deciding what to do based on the extension of the generated file or bootloader file (which I think is what happens now?) might be too far down that rabbit hole? Would it not be better to let the platform.txt / boards.txt specify what kind of merging needs to happen and/or with what files? The actual merging methods can still be somewhat hardcoded, but at least they're more extensible then.

Also, this introduces the build.ldscript variable, but it seems unused by the merging code? What's up with that?

@facchinm
Copy link
Member Author

This was a very special purpose PR (thus its hackish feeling 😛 )

hex format is position independent, so merging the bootloader after the sketch will never produce an unbootable file (at least the bootloader part will be flashed correctly)

The correct approach for merging bins would include a "partitions" list csv (as happens on ESP8266) to extract the correct locations; the ldscript way is transparent but too SAMD dependant (and it doesn't take into account an address space offset).

@ArduinoBot
Copy link
Contributor

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-192.zip

ℹ️ To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

@cmaglie cmaglie force-pushed the merge_bootloader_bin_pr branch from 1f3014c to c2e408f Compare January 11, 2018 11:28
@ArduinoBot
Copy link
Contributor

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-192.zip

ℹ️ To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

@facchinm facchinm mentioned this pull request Aug 30, 2018
@facchinm facchinm closed this Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants