Accessing virtual disk drive? (c++ Trinket MO)

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jim_lee
 
Posts: 709
Joined: Thu May 24, 2012 8:24 pm

Accessing virtual disk drive? (c++ Trinket MO)

Post by jim_lee »

When I hook the trinket MO to my Mac I get a virtual disk drive on my desktop. Well, -sometimes- I get a virtual disk drive on my desktop. Firstly, I don't know why its sometimes there and sometimes not there. It would be nice to be able to control this. And secondly, it would be nice to be able to access the files in this diskdrive from c++ running on my MO. This way I can access setting sand things from my Laptop to the processor easy peasy.

Questions :

a) How do you control whether the disk image appears?
b) How do I access files on this disk image from c++ on my MO?

Thanks!

-jim lee

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Accessing virtual disk drive? (c++ Trinket MO)

Post by adafruit_support_mike »

A) The UF2 bootloader should mount as a disk every time it connects to the USB host.

B) You don't. The UF2 bootloader lightly abuses the USB Mass Storage protocol to communicate with the computer, and what you see isn't an actual filesystem. The bootloader maps the read and write functions to code that moves data to the appropriate parts of the microcontroller's Flash array and the QSPI chip.

User avatar
jim_lee
 
Posts: 709
Joined: Thu May 24, 2012 8:24 pm

Re: Accessing virtual disk drive? (c++ Trinket MO)

Post by jim_lee »

Rats

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”