-
Notifications
You must be signed in to change notification settings - Fork 2.1k
make/flash: make flasher take the file used for flashing from command line argument #9514
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
Conversation
|
Updated the reference in the PR that was wrong. |
smlng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused when to use (and why) HEXFILE or BINFILE it looks a bit random to me, can you explain, eg. for the different flash script eg. cc2538 vs. calliope.
| OS=`uname` | ||
| DID_MOUNT=false | ||
|
|
||
| BINFILE=$1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the calliope you specified HEXFILE=$1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I based myself on what file is actually used by the board:
make --no-print-directory -C examples/hello-world/ info-debug-variable-HEXFILE BOARD=calliope-mini
.../examples/hello-world/bin/calliope-mini/hello-world.hex
make --no-print-directory -C examples/hello-world/ info-debug-variable-HEXFILE BOARD=mbed_lpc1768
.../examples/hello-world/bin/mbed_lpc1768/hello-world.bin
The mbed board uses BINFILE as file to generate called HEXFILE currently
| HEXFILE = $(BINFILE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah so you want to match the variable name in the script with the actual file ending, right? So BINFILE where it is <appname>.bin and HEXFILE for <appname>.hex. Makes sense, was just confusing to use different variable names inside all those flash scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to be coherent with the filename/extension yes.
|
I can definitely split this PR if it helps you review (and maybe merge :)) separately. |
edbfa8f to
fa912fd
Compare
|
Rebased to remove merge conflict with |
|
No need to split this further, just needed some clarification |
|
Is this ready then? |
|
I think it is ready but it is still only a subset of all the boards. I could still split to allow testing only few boards at a time and get the fix merged. |
fa912fd to
7bab27b
Compare
|
This PR is getting split with references in the original PR: #8838 |
Get HEXFILE and ELFFILE from command line instead of environment variable.
Get FLASH_FILE and ELFFILE from command line instead of environment variable.
7bab27b to
dbca7e1
Compare
|
@cladmi, please rebase this PR. |
|
I am splitting |
|
Split in #10539 |
|
All the split boards were either merged or split outside now, so I close this one. |
Contribution description
This makes most of the boards get the file used for flashing from command line arguments instead of environment variables. This prevents using arbitrary "HEXFILE" or "BINFILE".
This is a split of #8838 that already have been tested.
I split it to allow only fixing newly added boards before adding the
FLASHFILEvariable.Issues/PRs references
Split of #8838