Skip to content
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

Python based bootloader support and dfureset #377

Merged
merged 6 commits into from
Apr 15, 2021
Merged

Python based bootloader support and dfureset #377

merged 6 commits into from
Apr 15, 2021

Conversation

trentgill
Copy link
Collaborator

make pydfu wraps the crow binary into a dfu package, then uploads using pydfu.py from micropython project.

Amazingly it's the fastest upload i've ever seen to a stm32 chip!

make dfureset attempts to send the ^^b command to a connected crow. assumes port /dev/ttyACM0 so it will only work on ubuntu right now.

make dfureset pydfu will build the firmware, reset to bootloader mode, and upload to memory.

//

@tehn the make recipe for pydfu is all it took to get the firmware to flash. it just relies upon util/pydfu.py. i'll need to update the git release to build .dfu file.

would be great if you could just try and build & upload the firmware with these new commands!

@trentgill trentgill requested a review from tehn April 13, 2021 03:32
@tehn
Copy link
Member

tehn commented Apr 13, 2021

whoa! you did it! yes, will test it out.

@tehn
Copy link
Member

tehn commented Apr 13, 2021

just a forward reminder note:

pip install pyusb

(there's also a usb package, which is confusing)

@tehn
Copy link
Member

tehn commented Apr 13, 2021

i don't recall exactly but maybe druid installation has dependency checking? so that install can just take care of it...

@trentgill
Copy link
Collaborator Author

yes definitely druid has auto dependency handling (it already does it for the TUI library).

just checked and it looks like a one-line addition here https://github.com/monome/druid/blob/3541aab071b507c8bfc82a17deb52ec27db61bd5/setup.py#L35

@trentgill trentgill changed the base branch from main to THREE April 15, 2021 15:04
@trentgill trentgill merged commit cbb97c1 into THREE Apr 15, 2021
trentgill added a commit that referenced this pull request Jun 30, 2021
* can now update output[n].scale(_) with .scale = {note list}, so it can be dynamically set like a regular table (#373)

* fix bug where aliasing an ii address before use could stack overflow (#374)

* querying output voltage now returns the shaped & scaled voltage (real voltage at jack)

* add just intonation helpers: justvolts(), just12()
* support input scales: input[n].mode( 'scale', {...}, 'ji')
* support output scales: output[n].scale({...}, 'ji')

* Python based bootloader support and dfureset (#377)
* `make pydfu` to use python3 dfu bootloader
* `make dfureset` jumps to bootloader from make
* `make zip` now builds dfu file as well as binary
* add instructions for using pydfu instead of dfu-util

* Frequency detect mode for input[1] (#382)
* `input[1].mode('freq', interval)` reports frequency of a signal connected to input 1 (no support for input 2)
* `hztovolts(hz, <ref>)` helper fn converts an input hz equivalent voltage (uses default reference to match Just-Friends & W/Syn)

* print an error to usb host if event queue overflows (#391)

* clock.lua module added (#393)

* New calibrate.lua & underlying engine (#397)
Breaking:
* `cal` lua module refactored with new API
* calibration no longer auto-runs if no vals saved (ie new factory modules)
* `util/recalibrate.lua` demonstrates usage, and can be used for factory calibration (or at home)

* double userscript storage size to 16kB (#396)

* add jacktest.lua

* strip debug info from crow lua libs for dramatic ram reduction (#395)

* Sequins.lua library (#387)
* add sequins library

* ASL2 (#399) ASL2 library. Runtime operates in C for greatly optimized performance & sample accuracy

* introduce Caw_printf

* Public.lua library for sharing parameters (#394)
* after calling init() crow sends '^^ready()'
* add 'public.view' for enabling live monitoring of in & out voltages

* Oscillate asllib fn (#407)
* add 'oscillate' asllib fn

* add note about not using `note` in asllib. kept only to avoid the breaking change

* add quote library & remove quotes global (#412)

* support ii getters from teletype (#403)

Co-authored-by: brian crabtree <tehn@monome.org>
@trentgill trentgill deleted the pydfu branch July 3, 2021 17:13
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.

2 participants