0

Accessing virtual disk drive? (c++ Trinket MO)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

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

by jim_lee on Thu Jul 18, 2019 3:25 pm

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

jim_lee
 
Posts: 546
Joined: Thu May 24, 2012 8:24 pm

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

by adafruit_support_mike on Sat Jul 20, 2019 10:07 pm

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.

adafruit_support_mike
 
Posts: 58799
Joined: Thu Feb 11, 2010 2:51 pm

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

by jim_lee on Sun Jul 21, 2019 4:19 am

Rats

jim_lee
 
Posts: 546
Joined: Thu May 24, 2012 8:24 pm

Please be positive and constructive with your questions and comments.