RfidResearchGroup / ChameleonUltra

The new generation chameleon based on NRF52840 makes the performance of card emulation more stable. And gave the chameleon the ability to read, write, and decrypt cards.
https://chameleonultra.com
GNU General Public License v3.0
873 stars 147 forks source link

Fix stuff I broke yesterday #85

Closed augustozanellato closed 1 year ago

augustozanellato commented 1 year ago

Fixes Overlapping segments detected at address 1040384.ERROR: The hex files cannot be merged since there are conflicts. Was caused by build.sh overwriting application.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 into type-binaries.zip so that the merged application can be renamed to application.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 example firmware/flash-dfu-app.sh)

github-actions[bot] commented 1 year ago

You are welcome to add an entry to the CHANGELOG.md as well

github-actions[bot] commented 1 year ago

Built artifacts for commit 9d5cf21182843b5c55f79616082dddf3f30814ba

Firmware

Client

nemanjan00 commented 1 year ago

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?

augustozanellato commented 1 year ago

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

nemanjan00 commented 1 year ago

Even the build.sh is not really using Makefile.defs, and it has its own way to set default

augustozanellato commented 1 year ago

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.

nemanjan00 commented 1 year ago

Maybe that is something that should be documented.

I missed ?=, thanks for clarification

doegox commented 1 year ago

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.

nemanjan00 commented 1 year ago

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)

doegox commented 1 year ago

yes I'd like to make it the same as for pm3

doegox commented 1 year ago

still WIP or ready ?

augustozanellato commented 1 year ago

still WIP or ready ?

Forgot to rename the pr, now it's ready.