Skip to content

10.0.0 Alpha-2 created 2 drives on Pico W #10237

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

Closed
b-blake opened this issue Apr 8, 2025 · 16 comments
Closed

10.0.0 Alpha-2 created 2 drives on Pico W #10237

b-blake opened this issue Apr 8, 2025 · 16 comments
Milestone

Comments

@b-blake
Copy link

b-blake commented Apr 8, 2025

CircuitPython version and board name

See AdaFruit Forum:
10.0.0 Alpha-2 created 2 drives

Adafruit CircuitPython 10.0.0-alpha.2 on 2025-04-04; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w

Code/REPL

Any code.py

Behavior

10.0.0 Alpha-2 creates 2 drives on Pico W. One showing the files. The other waiting for the user to insert an SD card in the USB drive. The Pico W does not have an SD card slot.

Description

Extra SD drive

Additional information

No response

@b-blake b-blake added the bug label Apr 8, 2025
@dhalbert
Copy link
Collaborator

dhalbert commented Apr 8, 2025

Originally reported here: https://forums.adafruit.com/viewtopic.php?t=217730.

@tannewt My impression is that this should not be happening on this board?

@tannewt tannewt added this to the 10.0.0 milestone Apr 8, 2025
@tannewt
Copy link
Member

tannewt commented Apr 8, 2025

Yup, seems like a bug.

@tannewt
Copy link
Member

tannewt commented Apr 8, 2025

Looks like we condition the second drive on CIRCUITPY_SDCARDIO but not the stricter automounting test:

#if CIRCUITPY_SDCARDIO
#include "shared-module/sdcardio/__init__.h"
#define SDCARD_COUNT 1
#define SDCARD_LUN (1 + SAVES_COUNT)
#else
#define SDCARD_COUNT 0
#endif

I don't know why the drive letter would change.

@b-blake
Copy link
Author

b-blake commented Apr 8, 2025

@tannewt,

The The drive letter may have been changed because I connected another MCU to the USB cable I was using to see what would happen. It came up as O:. When I reconnected the Alpha board to the same cable the drive letters were swapped. HTH

@b-blake
Copy link
Author

b-blake commented Apr 10, 2025

Apparently the AF Feather RP2350 does it also.

@tannewt
Copy link
Member

tannewt commented May 1, 2025

Thinking about this more, it is intentional because you can attach an SD card breakout to it. The drive without a medium present is intentional in this case.

@tannewt tannewt closed this as completed May 1, 2025
@b-blake
Copy link
Author

b-blake commented May 2, 2025

Is there a possibility to make this feature optional? It is a PITA for me.

@tannewt
Copy link
Member

tannewt commented May 5, 2025

Why is an extra drive a pain?

@b-blake
Copy link
Author

b-blake commented May 6, 2025

@tannewt,

Yes, I have a bunch of MCUs running and if each uses two drives I will run out of drives. I will admit I am an unusual case, but here I am. A:, B:, C:, D:, E:, F:, G:, Y:, Z: are used by my system. That leaves 17 drive letters, H: through X:. At two drives per MCU that sets the limit to 8 MCUs. I can't guarantee MCU 9 will get a letter or an empty. This will lead me to not adopt CP 10.x.x.

Some MCUs are running clocks (GPS and NTP), decoration, calibration (time, temperature), environment, entertainment, new AdaFruit hardware, testing, etc.

It is also annoying that the empty drive does not identify what MCU it is affiliated with.

My suggestion would be to put the option to create/not create the empty drive in the boot.py file.

Bruce

@bablokb
Copy link

bablokb commented May 6, 2025

You don't need drive letters in Windows to mount something. You can just mount to an existing directory. This is not well known, but Google is your friend.

@tannewt
Copy link
Member

tannewt commented May 7, 2025

@b-blake If you compile your own without CIRCUITPY_SDCARDIO then the second drive won't appear.

@b-blake
Copy link
Author

b-blake commented May 7, 2025

@tannewt (Scott),

You have wayyyy too much confidence in my abilities. The last time I compiled code was for the 6502 CPU. back in the 70s and 80s. My first programming experience was using Fortran in the mid 60s on the IBM 1620. (Not Fortran II, III, IV) I also learned Assembly on that machine. I had it compute e to 400 decimal places. It took hours!

Bruce

P.S. @bablokb, You too. ;-) Wayyyy too much confidence.

P.S.S.
It is the job of the programmer to make the user's life easy, not the other way around.
Please don't take the above personally, but not everybody is as talented/knowledgeable as you guys.
Most of us just stumble forward as best as we can.

@b-blake
Copy link
Author

b-blake commented May 8, 2025

Scott,

What are the usage cases for the "thumb Drive" SD card access by the PC?
Would the PC and the MCU both have simultaneous access to the SD card?

Bruce

@bablokb
Copy link

bablokb commented May 8, 2025

P.S. @bablokb, You too. ;-) Wayyyy too much confidence.

Why? There is no programming involved. When you google for "windows more than 26 drives" you will find a lot of instructions on how to do that. Given the fact that you setup so many devices I have a lot of confidence that you can read and follow those instructions. It is about Windows, so it is clicky-clicky and not programming.

@tannewt
Copy link
Member

tannewt commented May 8, 2025

Scott,

What are the usage cases for the "thumb Drive" SD card access by the PC? Would the PC and the MCU both have simultaneous access to the SD card?

Bruce

The idea is that CP can save to the SD card and then the host can read it. We can also now switch it the other way so the host can load assets onto the SD card for CP to read.

@b-blake
Copy link
Author

b-blake commented May 8, 2025

Scott,

How about a third option where nobody can write/read it and it goes away? I know I am being a bit flippant, but...

Will it be switchable real time from within CP. e.g. Red LED, write by CP. Green LED, write by PC. Red or Green read by both.
I assume the status can be tested for completion of any write before code.py flips the LED colors. (Two LEDs, Bi/Tri color LED, or NeoPixel)

Default or boot.py or code.py option.
SD_Card = 0: No write/read Drive gone. Default and available from boot.py and code.py.
In boot.py and/or CP options.
SD_Card = 1: Write from CP, Read from CP and PC
SD_Card = 2: Write from PC, Read from CP and PC
SD_Card = 3: Read only from CP and PC. Don't leave it open for write if you don't need to write.

You are starting to win me over, but I still would like SD_Card = 0 as an option.

Bruce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants