Closed augustozanellato closed 1 year ago
You are welcome to add an entry to the CHANGELOG.md as well
I am not a huge fan of having multiple places to put what device you have.
Perhaps we should do Makefile with build and flash targets that sources Makefile.defs and passes device type as argument to flash?
I am not a huge fan of having multiple places to put what device you have.
Perhaps we should do Makefile with build and flash targets that sources Makefile.defs and passes device type as argument to flash?
You only need to define it once while you're compiling. Flash scripts automatically detect the connected device type and pick the correct dfu package
Even the build.sh is not really using Makefile.defs, and it has its own way to set default
The makefile pulls the device type from an environment variable, build.sh just does some more things like packaging dfu etc.
Default is to build everything for ultra, if you want to build for lite you'd only need to run CURRENT_DEVICE_TYPE=lite firmware/build.sh
without editing anything.
Maybe that is something that should be documented.
I missed ?=, thanks for clarification
I'm in favor of replacing build.sh by a general Makefile, and load user prefs from a file not part of the repo (but template prefs file available in the repo). So only one place to define prefs, and once you've set your prefs for your device, you don't have to worry anymore. And no risk to commit prefs by accident. Just didn't have time for that yet.
My confusion started from assuming prefs are in single file like with proxmark3, and I know I am not going to be the only one.
I even failed to flash lite (completly gave up) since I was attempting to flash ultra firmware (changed just Makefile.defs)
yes I'd like to make it the same as for pm3
still WIP or ready ?
still WIP or ready ?
Forgot to rename the pr, now it's ready.
Fixes
Overlapping segments detected at address 1040384.ERROR: The hex files cannot be merged since there are conflicts.
Was caused bybuild.sh
overwritingapplication.hex
with a version merged with bootloader settings, wasn't catched during testing because only clean builds were tested. Fix involves using a temp directory for storing the binaries that will be put intotype-binaries.zip
so that the merged application can be renamed toapplication.hex
without breaking successive builds.flash-dfu-*.sh
scripts have also been fixed to account for the new file names and to properly enter dfu even if script is ran from repo root (for examplefirmware/flash-dfu-app.sh
)