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

Fix mass storage issues #40

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

BenjaminPelletier
Copy link
Contributor

This PR addresses some of the mass storage issues we've seen recently.

Unflagging ARDUINO_USB_MODE at the platform level fixes many build warnings when setting ARDUINO_USB_MODE at the flag level. The combination of ARDUINO_USB_MODE=0 and ARDUINO_CDC_ON_BOOT=1 allows use of both the serial port and mass storage devices (firmware & SD card), however it does not allow firmware upload without manually switching back into bootloader mode.

The ENABLE_MASS_STORAGE flag is no longer needed because the serial port and mass storage work together with these settings, so it is removed.

MSC_Update conflicted with a platform symbol, so its name is upgraded to the more specific MSC_FirmwareUpdate.

These changes were tested to work properly* on a Windows machine after verifying the drives-not-appearing problem using the head of main prior to these changes.

*work properly =

  • Two drives appear immediately after programming
    • One contains FIRMWARE.BIN
    • The other contains SD card contents
  • With the drives present, turning on the leaf and operating buttons produces serial output in the serial monitor
  • Content on the SD card can be manipulated
  • After disconnecting the leaf and reconnecting it, serial output still flows to serial monitor (after reconnecting serial monitor)

Note: if the device turns on without an SD card mounted, the firmware drive will not be mounted either (the drive will be present, but it will not have any contents until the SD card is mounted)

Copy link
Collaborator

@scottyob scottyob left a comment

Choose a reason for hiding this comment

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

Nice finding! Thanks for fixing this up!

@scottyob
Copy link
Collaborator

scottyob commented Jan 7, 2025

Mind double checking this actually before merging it in? On my setup, I'm unable to open Serial monitor or push new code now. If we're not able to push new code without holding down the boot button, it might be worth going with the #39 approach?

@oxothnk423
Copy link
Contributor

Merging for now, as it fixes the expected Mass Storage behavior on windows machines, but would be good to find a solution to uploading code without boot-reset to the Dev Env.

@oxothnk423 oxothnk423 merged commit 4858c4d into DangerMonkeys:main Jan 8, 2025
2 checks passed
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.

3 participants