Closed datdenkikniet closed 1 year ago
I like this feature, but can we make it something else than 0xDEADBEEF
? While I myself take no offense and would choose a value like that I have seen people make a fuss about it in the past.
Huh, absolutely! I wasn't aware that it was a "controversial" magic number, but will keep that in mind for the future now.
Yeah, I have trouble tracking controversial values myself as it feels many things are controversial nowadays ... Thanks for changing it =)
Also, the code looks nice, great work, I love this feature!
Do you think it would be possible to make the script a cargo xtask (or similar) (you could take a look at probe-rs for an example as we use it in the release process)? While I despise windows, I heard quite some folks use it and I am generally trying to be aware of portability :)
I will try! Yeah, the scripts are (for the most part) a quick and dirty solution. It would be nice if they're a bit more portable.
Done! I guess we should follow the xtask
people's advice and set up the workspace properly? Now it's a bit of a mess when it comes to setting up the correct compilation target... (but it does work! And only "1" tool needed to perform all the tricks)
This also takes me back to the 2nd point on the TODO list: if we have this whole tool that only really works if we've got the defmt-bbq
and usb-serial-reboot
features enabled, should they be on by default?
This is awesome!
I am not sure how realistic it is that UART accidentally triggers the magic byte? Maybe it's a bit risky?
Honestly, I have no idea. But, just adding an alias in .cargo/config
that builds with the correct features and then delegates to xtask is probably better, now that I think of it xd.
Okay, I forgot how annoying it is to mix-and-match different targets (without having to explicitly specify the targets you want), so even with the workspace setup it will be pretty annoying to use properly. I don't think changing it to that setup now will make any difference.
Yeah workspaces in general are a bit annoying to manage imo ... mixed targets is even worse ...
But an alias with correct features would be very nice =)
There, updated the README and .cargo/config.toml
for some ease-of-use
Now, sending
0xDABAD000
(in big endian order) over the USB serial triggers a restart into the USB bootloader with a specific feature enabled.Pin
defmt
version to v0.3.2 for now to avoid the wire-breaking change.Add some scripts that help with automagically restarting the probe, running
elf2uf2-rs
and startingdefmt-print
on the relevant serial port :DThis makes debugging/programming without a debugger to attach to the probe even more seamless
TODO: