MTP Storage Errors

Wampie

Member
Team, I hate to come here looking for an easy button, but my research hasn't gotten me anywhere. I had a error during compiling code for the guestbook project. The interest suggested that I change my port to Serial + MTP (Experimental) and my compile errors tripled. I'm hoping it's a cascading effect and if I get solve the big one the others will solve themselves.
Here are few choice errors that I "think" might be most important. I've attached a file with all the error codes, but it's a hot mess and I am not requesting a 1:1 answer. Any assistance that can be provided is appreciated.

1. Compilation error: 'class MTP_class' has no member named 'storage'; did you mean 'MTPStorage MTP_class::storage_'? (not accessible from this context)

2. C:\Users\warre\OneDrive\Documents\Warren\Sketches\audio-guestbook-main\audio-guestbook-main\audio-guestbook\audio-guestbook.ino: In function 'void setup()':
C:\Users\warre\OneDrive\Documents\Warren\Sketches\audio-guestbook-main\audio-guestbook-main\audio-guestbook\audio-guestbook.ino:148:28: error: 'class MTP_class' has no member named 'storage'; did you mean 'MTPStorage MTP_class::storage_'? (not accessible from this context)
148 | MTPcheckInterval = MTP.storage()->get_DeltaDeviceCheckTimeMS();

3. C:\Users\warre\OneDrive\Documents\Warren\Sketches\audio-guestbook-main\audio-guestbook-main\audio-guestbook\audio-guestbook.ino: In function 'void setMTPdeviceChecks(bool)':
C:\Users\warre\OneDrive\Documents\Warren\Sketches\audio-guestbook-main\audio-guestbook-main\audio-guestbook\audio-guestbook.ino:247:9: error: 'class MTP_class' has no member named 'storage'; did you mean 'MTPStorage MTP_class::storage_'? (not accessible from this context)
247 | MTP.storage()->set_DeltaDeviceCheckTimeMS(MTPcheckInterval);

Warren
 

Attachments

  • Guestbook Error Codes.txt
    4.7 KB · Views: 19
This is a guess, but as of Teensyduino 1.60, MTP is part of the Teensy core, so you no longer need the library, and if you have the MTP library installed, you should remove it. I've never used or tried to build the Audio Guestbook, but I wonder if it needs updating to be compatible with Teensyduino 1.60?
 
I've been working with Copilot and I'll give you it's exact reasoning. I don't necessarily know what it's getting at, but it also provided instructions to fix. I don't why all this mess happened when in February it compiled and ran fine. Maybe I should have waited load the upgrades.

The compiler errors happened because your sketch is calling MTP methods that aren't present in the header files the IDE is actually using. Your PowerShell output shows the USBHost_t36-master files you inspected live under the AVR hardware folder (...hardware\avr\1.60.0\libraries\USBHost_t36-master) and that folder does not contain an MTP class implementation. For Teensy 4.0 (IMXRT/ARM) the USBHost/MTP code lives in the Teensy core for the IMXRT target, not the AVR folder you were looking at.
 
Back
Top