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

Bootloader v6.0 #548

Merged
merged 15 commits into from
Dec 22, 2023
Merged

Bootloader v6.0 #548

merged 15 commits into from
Dec 22, 2023

Conversation

CorvusPrudens
Copy link
Collaborator

This adds the Daisy bootloader v6 to libDaisy, which fixes any stuck-pin issues such as #534. This also adds a parameter to the System::ResetToBootloader method which allows returning to the Daisy bootloader (both with the timeout, and without).

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Unit Test Results

151 tests  ±0   151 ✔️ ±0   0s ⏱️ ±0s
  16 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit f95a8f0. ± Comparison against base commit 4bb0f8a.

♻️ This comment has been updated with latest results.

Copy link

@ohmtech-rdi ohmtech-rdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that the changes to src/daisy_seed.cpp should be reflected as well in src/daisy_patch_sm.cpp.

(At least I see that when using the bootloader v6 and a program on QSPI, my program doesn't run, but didn't check in the debugger yet)

When I update my code template to reflect the changes in src/daisy_seed.cpp, it works at least on my end:
ohmtech-rdi/eurorack-blocks@7b6d5cd

This version slows down the SDMMC peripheral and sets it to 1 bit instead of 4. This should improve SDMMC compatibility and reliability for flashing new binaries at startup.
@CorvusPrudens
Copy link
Collaborator Author

Okay, I've tested and confirmed that those changes work @ohmtech-rdi ! (At least, for a simple blink program).

@ohmtech-rdi
Copy link

@CorvusPrudens When do you think this will be merged? Currently using the previous bootloader makes it not really usable when having a program on QSPI.

If this will take some time, do you know if there is a workaround we could apply on our end please?

Thanks

@stephenhensley
Copy link
Collaborator

Hi @ohmtech-rdi

Can you describe the issue you're experiencing with running a program from QSPI on the v5 bootoader (and if that still persists on this branch)?
Can you also clarify if you're using the BOOT_SRAM app type, or the BOOT_QSPI app type when you run into issues?

The more recent commits here should have everything working for the PatchSM at this point.

I'd just like to make sure that we're aware of, and resolving any existing issues as we go through testing this PR, and staging it for release.

@ohmtech-rdi
Copy link

Hi @stephenhensley

The problem is described a bit more in detail here

But in essence, when using BOOT_QSPI, at least the A8 pin, that we use as a GPIO out in eurorack-blocks kivu12 for the address of the multiplexer of our pots, couldn't be changed for some reason.

Switching to the v6 bootloader solves everything for us (if there was other pins than A8, we didn't check), users are happy as far as I know, so that's why we are so eager to see this branch merged.

@OmsInSerial
Copy link

Hi,
When do you think this will be merged? I need it for my module to work properly.
Regards

@stephenhensley
Copy link
Collaborator

Okay! Update time!

So we are going to release this, and do a version tick on libDaisy before the end of the year.
Likely within the next week.

The planned release version is going to be for multiple configurations of v6.2

In addition to the fixes/features mentioned above:

  • A configuration with the external USB port configured for DFU will be available with and without a startup timeout.
  • A configuration of the current external USB port settings will be available with and without a startup timeout.
  • In addition to the "skip timeout" option added in v6, an infinite timeout option has been added when jumping. This allows an application to trigger a jump to the bootloader that will remain there indefinitely, or until an update or reset occurs.

The new external USB configurations do disable the built-in USB port.
However, the configurations of the same version will be compatible with each other. So if you're developing firmware and "get stuck" you can always re-flash a different configuration of the bootloader that allows for a more accessible means of updating.

The various configurations of 6.2 should be uploaded to this branch in the next day or so, and any additional feedback is welcome leading up to merging it within the next week or so.

@dromer
Copy link

dromer commented Dec 18, 2023

@stephenhensley how is it going with this, will it happen before christmas? 🎅

@stephenhensley
Copy link
Collaborator

@dromer yes! This should be merged by the end of the week.

We're wrapping up some testing with a few new configurations of the bootloader now, and then those new bin files, and a little update to the core/Makefile are all that need to happen.

Worth mentioning that the new configurations are available for testing in a test repo I made. Pending any issues we haven't found yet, those bin files will be the ones coming in.
The intusb, 2000ms timeout configuration is the equivalent of the current version of the bootloader bin staged on this branch.

@beserge
Copy link
Contributor

beserge commented Dec 21, 2023

Tested the example under examples/BootLoaderBlink with the default + all four custom BOOT_BIN settings.
Works great! :shipit:

@CorvusPrudens
Copy link
Collaborator Author

I also tested all configurations of the example successfully!

@stephenhensley
Copy link
Collaborator

Everyone who's tested this, including myself haven't run into any issues.

Thanks everyone for the contributions, testing, and feedback in general as we worked on this update!

Merging now! 🚀😄

@stephenhensley stephenhensley merged commit b98d764 into master Dec 22, 2023
6 checks passed
@stephenhensley stephenhensley deleted the bootloader_v6 branch December 22, 2023 19:39
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.

7 participants