Teensyduino File System Integration, including MTP and MSC

Sorry not running primes - don't like running bat files on my computer and no need. I am running your makefiles.ino from github with the mods mentioned:

View attachment Makefiles2204-220517a.zip

This is what I get from running the 't' and 'v' from the sketch:
Code:
 ================================ Media Size=127831900160	Used Size=393216
	Make DeepDir :
Make DD File:/D0.20/4096	File size=4096=4096	 us=13800838    end:zE.   1x     FD
Make DD File:/D0.20/4096	File size=4096=4096	 us=13808749    end:zE.   2x    1FB
Make DD File:/D0.20/4096	File size=4096=4096	 us=13816436    end:zE.   3x    2F9
Make DD File:/D0.20/4096	File size=4096=4096	 us=13824205    end:zE.   4x    3F7
Make DD File:/D0.20/4096	File size=4096=4096	 us=13832310    end:zE.   5x    4F5
Make DD File:/D0.20/4096	File size=4096=4096	 us=13839890    end:zE.   6x    5F3
Make DD File:/D0.20/4096	File size=4096=4096	 us=13858834    end:zE.   7x    6F1
Make DD File:/D0.20/4096	File size=4096=4096	 us=13867259    end:zE.   8x    7EF
Make DD File:/D0.20/4096	File size=4096=4096	 us=13875864    end:zE.   9x    8ED
Make DD File:/D0.20/4096	File size=4096=4096	 us=13884328    end:zE.  10x    9EB
Make DD File:/D0.20/4096	File size=4096=4096	 us=13892951    end:zE.  11x    AE9
Make DD File:/D0.20/4096	File size=4096=4096	 us=13910166    end:zE.  12x    BE7
Make DD File:/D0.20/4096	File size=4096=4096	 us=13918646    end:zE.  13x    CE5
Make DD File:/D0.20/4096	File size=4096=4096	 us=13927281    end:zE.  14x    DE3
Make DD File:/D0.20/4096	File size=4096=4096	 us=13935827    end:zE.  15x    EE1
Make DD File:/D0.20/4096	File size=4096=4096	 us=13944563    end:zE.  16x    FDF
Make DD File:/D0.20/4096	File size=4096=4096	 us=13953154    end:zE.  17x   10DD
Make DD File:/D0.20/4096	File size=4096=4096	 us=13961850    end:zE.  18x   11DB
Make DD File:/D0.20/4096	File size=4096=4096	 us=13973522    end:zE.  19x   12D9
Make DD File:/D0.20/4096	File size=4096=4096	 us=13982034    end:zE.  20x   13D7

 ================================ Media Size=127831900160	Used Size=3145728	 us=211772   KB/sec=377.76   Bytes written=81920
	Make DeepDir :
Make DD File:/D0.40/124928	File size=124928=124928	 us=14013088    end:zE.  21x   3255
Make DD File:/D0.40/124928	File size=124928=124928	 us=14044531    end:zE.  22x   50D3
Make DD File:/D0.40/124928	File size=124928=124928	 us=14077532    end:zE.  23x   6F51
Make DD File:/D0.40/124928	File size=124928=124928	 us=14110064    end:zE.  24x   8DCF
Make DD File:/D0.40/124928	File size=124928=124928	 us=14144169    end:zE.  25x   AC4D
Make DD File:/D0.40/124928	File size=124928=124928	 us=14176330    end:zE.  26x   CACB
Make DD File:/D0.40/124928	File size=124928=124928	 us=14220606    end:zE.  27x   E949
Make DD File:/D0.40/124928	File size=124928=124928	 us=14253744    end:zE.  28x  107C7
Make DD File:/D0.40/124928	File size=124928=124928	 us=14288524    end:zE.  29x  12645
Make DD File:/D0.40/124928	File size=124928=124928	 us=14322752    end:zE.  30x  144C3
Make DD File:/D0.40/124928	File size=124928=124928	 us=14356396    end:zE.  31x  16341
Make DD File:/D0.40/124928	File size=124928=124928	 us=14398080    end:zE.  32x  181BF
Make DD File:/D0.40/124928	File size=124928=124928	 us=14431975    end:zE.  33x  1A03D
Make DD File:/D0.40/124928	File size=124928=124928	 us=14466238    end:zE.  34x  1BEBB
Make DD File:/D0.40/124928	File size=124928=124928	 us=14500940    end:zE.  35x  1DD39
Make DD File:/D0.40/124928	File size=124928=124928	 us=14534315    end:zE.  36x  1FBB7
Make DD File:/D0.40/124928	File size=124928=124928	 us=14567805    end:zE.  37x  21A35
Make DD File:/D0.40/124928	File size=124928=124928	 us=14601737    end:zE.  38x  238B3
Make DD File:/D0.40/124928	File size=124928=124928	 us=14636769    end:zE.  39x  25731
Make DD File:/D0.40/124928	File size=124928=124928	 us=14671761    end:zE.  40x  275AF
Make DD File:/D0.40/124928	File size=124928=124928	 us=14705412    end:zE.  41x  2942D
Make DD File:/D0.40/124928	File size=124928=124928	 us=14739053    end:zE.  42x  2B2AB
Make DD File:/D0.40/124928	File size=124928=124928	 us=14785866    end:zE.  43x  2D129
Make DD File:/D0.40/124928	File size=124928=124928	 us=14821244    end:zE.  44x  2EFA7
Make DD File:/D0.40/124928	File size=124928=124928	 us=14855711    end:zE.  45x  30E25
Make DD File:/D0.40/124928	File size=124928=124928	 us=14889379    end:zE.  46x  32CA3
Make DD File:/D0.40/124928	File size=124928=124928	 us=14923690    end:zE.  47x  34B21
Make DD File:/D0.40/124928	File size=124928=124928	 us=14966955    end:zE.  48x  3699F
Make DD File:/D0.40/124928	File size=124928=124928	 us=15002462    end:zE.  49x  3881D
Make DD File:/D0.40/124928	File size=124928=124928	 us=15035917    end:zE.  50x  3A69B
Make DD File:/D0.40/124928	File size=124928=124928	 us=15070117    end:zE.  51x  3C519
Make DD File:/D0.40/124928	File size=124928=124928	 us=15103721    end:zE.  52x  3E397
Make DD File:/D0.40/124928	File size=124928=124928	 us=15139249    end:zE.  53x  40215
Make DD File:/D0.40/124928	File size=124928=124928	 us=15173956    end:zE.  54x  42093
Make DD File:/D0.40/124928	File size=124928=124928	 us=15207734    end:zE.  55x  43F11
Make DD File:/D0.40/124928	File size=124928=124928	 us=15241657    end:zE.  56x  45D8F
Make DD File:/D0.40/124928	File size=124928=124928	 us=15277664    end:zE.  57x  47C0D
Make DD File:/D0.40/124928	File size=124928=124928	 us=15312973    end:zE.  58x  49A8B
Make DD File:/D0.40/124928	File size=124928=124928	 us=15358892    end:zE.  59x  4B909
Make DD File:/D0.40/124928	File size=124928=124928	 us=15391565    end:zE.  60x  4D787

 ================================ Media Size=127831900160	Used Size=8519680	 us=1427182   KB/sec=3419.33   Bytes written=4997120
	Make DeepDir :
Make DD File:/D0.60/64512	File size=64512=64512	 us=15446474    end:zE.  61x  4E745
Make DD File:/D0.60/64512	File size=64512=64512	 us=15467546    end:zE.  62x  4F703
Make DD File:/D0.60/64512	File size=64512=64512	 us=15489744    end:zE.  63x  506C1
Make DD File:/D0.60/64512	File size=64512=64512	 us=15512062    end:zE.  64x  5167F
Make DD File:/D0.60/64512	File size=64512=64512	 us=15534470    end:zE.  65x  5263D
Make DD File:/D0.60/64512	File size=64512=64512	 us=15556975    end:zE.  66x  535FB
Make DD File:/D0.60/64512	File size=64512=64512	 us=15590685    end:zE.  67x  545B9
Make DD File:/D0.60/64512	File size=64512=64512	 us=15613591    end:zE.  68x  55577
Make DD File:/D0.60/64512	File size=64512=64512	 us=15635374    end:zE.  69x  56535
Make DD File:/D0.60/64512	File size=64512=64512	 us=15657292    end:zE.  70x  574F3
Make DD File:/D0.60/64512	File size=64512=64512	 us=15679068    end:zE.  71x  584B1
Make DD File:/D0.60/64512	File size=64512=64512	 us=15710527    end:zE.  72x  5946F
Make DD File:/D0.60/64512	File size=64512=64512	 us=15732697    end:zE.  73x  5A42D
Make DD File:/D0.60/64512	File size=64512=64512	 us=15754926    end:zE.  74x  5B3EB
Make DD File:/D0.60/64512	File size=64512=64512	 us=15777037    end:zE.  75x  5C3A9
Make DD File:/D0.60/64512	File size=64512=64512	 us=15799396    end:zE.  76x  5D367
Make DD File:/D0.60/64512	File size=64512=64512	 us=15821640    end:zE.  77x  5E325
Make DD File:/D0.60/64512	File size=64512=64512	 us=15844031    end:zE.  78x  5F2E3
Make DD File:/D0.60/64512	File size=64512=64512	 us=15866302    end:zE.  79x  602A1
Make DD File:/D0.60/64512	File size=64512=64512	 us=15888829    end:zE.  80x  6125F
Make DD File:/D0.60/64512	File size=64512=64512	 us=15910913    end:zE.  81x  6221D
Make DD File:/D0.60/64512	File size=64512=64512	 us=15933187    end:zE.  82x  631DB
Make DD File:/D0.60/64512	File size=64512=64512	 us=15967576    end:zE.  83x  64199
Make DD File:/D0.60/64512	File size=64512=64512	 us=15989906    end:zE.  84x  65157
Make DD File:/D0.60/64512	File size=64512=64512	 us=16013182    end:zE.  85x  66115
Make DD File:/D0.60/64512	File size=64512=64512	 us=16036715    end:zE.  86x  670D3
Make DD File:/D0.60/64512	File size=64512=64512	 us=16059873    end:zE.  87x  68091
Make DD File:/D0.60/64512	File size=64512=64512	 us=16092152    end:zE.  88x  6904F
Make DD File:/D0.60/64512	File size=64512=64512	 us=16115654    end:zE.  89x  6A00D
Make DD File:/D0.60/64512	File size=64512=64512	 us=16139351    end:zE.  90x  6AFCB
Make DD File:/D0.60/64512	File size=64512=64512	 us=16162782    end:zE.  91x  6BF89
Make DD File:/D0.60/64512	File size=64512=64512	 us=16186048    end:zE.  92x  6CF47
Make DD File:/D0.60/64512	File size=64512=64512	 us=16208028    end:zE.  93x  6DF05
Make DD File:/D0.60/64512	File size=64512=64512	 us=16232889    end:zE.  94x  6EEC3
Make DD File:/D0.60/64512	File size=64512=64512	 us=16255004    end:zE.  95x  6FE81
Make DD File:/D0.60/64512	File size=64512=64512	 us=16276984    end:zE.  96x  70E3F
Make DD File:/D0.60/64512	File size=64512=64512	 us=16299576    end:zE.  97x  71DFD
Make DD File:/D0.60/64512	File size=64512=64512	 us=16321543    end:zE.  98x  72DBB
Make DD File:/D0.60/64512	File size=64512=64512	 us=16354681    end:zE.  99x  73D79
Make DD File:/D0.60/64512	File size=64512=64512	 us=16375701    end:zE. 100x  74D37
Make DD File:/D0.60/64512	File size=64512=64512	 us=16397563    end:zE. 101x  75CF5
Make DD File:/D0.60/64512	File size=64512=64512	 us=16419457    end:zE. 102x  76CB3
Make DD File:/D0.60/64512	File size=64512=64512	 us=16441827    end:zE. 103x  77C71
Make DD File:/D0.60/64512	File size=64512=64512	 us=16470872    end:zE. 104x  78C2F
Make DD File:/D0.60/64512	File size=64512=64512	 us=16493574    end:zE. 105x  79BED
Make DD File:/D0.60/64512	File size=64512=64512	 us=16516049    end:zE. 106x  7ABAB
Make DD File:/D0.60/64512	File size=64512=64512	 us=16539399    end:zE. 107x  7BB69
Make DD File:/D0.60/64512	File size=64512=64512	 us=16562323    end:zE. 108x  7CB27
Make DD File:/D0.60/64512	File size=64512=64512	 us=16586624    end:zE. 109x  7DAE5
Make DD File:/D0.60/64512	File size=64512=64512	 us=16611270    end:zE. 110x  7EAA3
Make DD File:/D0.60/64512	File size=64512=64512	 us=16636284    end:zE. 111x  7FA61
Make DD File:/D0.60/64512	File size=64512=64512	 us=16660320    end:zE. 112x  80A1F
Make DD File:/D0.60/64512	File size=64512=64512	 us=16685422    end:zE. 113x  819DD
Make DD File:/D0.60/64512	File size=64512=64512	 us=16709657    end:zE. 114x  8299B
Make DD File:/D0.60/64512	File size=64512=64512	 us=16747472    end:zE. 115x  83959
Make DD File:/D0.60/64512	File size=64512=64512	 us=16771899    end:zE. 116x  84917
Make DD File:/D0.60/64512	File size=64512=64512	 us=16795861    end:zE. 117x  858D5
Make DD File:/D0.60/64512	File size=64512=64512	 us=16819284    end:zE. 118x  86893
Make DD File:/D0.60/64512	File size=64512=64512	 us=16843240    end:zE. 119x  87851
Make DD File:/D0.60/64512	File size=64512=64512	 us=16875872    end:zE. 120x  8880F

 ================================ Media Size=127831900160	Used Size=16515072	 us=1468561   KB/sec=2573.95   Bytes written=3870720
	Make DeepDir :
Make DD File:/D0.30/31744	File size=31744=31744	 us=16921656    end:zE. 121x  88FCD
Make DD File:/D0.30/31744	File size=31744=31744	 us=16936283    end:zE. 122x  8978B
Make DD File:/D0.30/31744	File size=31744=31744	 us=16951452    end:zE. 123x  89F49
Make DD File:/D0.30/31744	File size=31744=31744	 us=16965913    end:zE. 124x  8A707
Make DD File:/D0.30/31744	File size=31744=31744	 us=16980934    end:zE. 125x  8AEC5
Make DD File:/D0.30/31744	File size=31744=31744	 us=16996072    end:zE. 126x  8B683
Make DD File:/D0.30/31744	File size=31744=31744	 us=17023216    end:zE. 127x  8BE41
Make DD File:/D0.30/31744	File size=31744=31744	 us=17039033    end:zE. 128x  8C5FF
Make DD File:/D0.30/31744	File size=31744=31744	 us=17054652    end:zE. 129x  8CDBD
Make DD File:/D0.30/31744	File size=31744=31744	 us=17069911    end:zE. 130x  8D57B
Make DD File:/D0.30/31744	File size=31744=31744	 us=17085472    end:zE. 131x  8DD39
Make DD File:/D0.30/31744	File size=31744=31744	 us=17109696    end:zE. 132x  8E4F7
Make DD File:/D0.30/31744	File size=31744=31744	 us=17125284    end:zE. 133x  8ECB5
Make DD File:/D0.30/31744	File size=31744=31744	 us=17142976    end:zE. 134x  8F473
Make DD File:/D0.30/31744	File size=31744=31744	 us=17158408    end:zE. 135x  8FC31
Make DD File:/D0.30/31744	File size=31744=31744	 us=17174167    end:zE. 136x  903EF
Make DD File:/D0.30/31744	File size=31744=31744	 us=17189305    end:zE. 137x  90BAD
Make DD File:/D0.30/31744	File size=31744=31744	 us=17204916    end:zE. 138x  9136B
Make DD File:/D0.30/31744	File size=31744=31744	 us=17220525    end:zE. 139x  91B29
Make DD File:/D0.30/31744	File size=31744=31744	 us=17235848    end:zE. 140x  922E7
Make DD File:/D0.30/31744	File size=31744=31744	 us=17251517    end:zE. 141x  92AA5
Make DD File:/D0.30/31744	File size=31744=31744	 us=17293551    end:zE. 142x  93263
Make DD File:/D0.30/31744	File size=31744=31744	 us=17321002    end:zE. 143x  93A21
Make DD File:/D0.30/31744	File size=31744=31744	 us=17336697    end:zE. 144x  941DF
Make DD File:/D0.30/31744	File size=31744=31744	 us=17352163    end:zE. 145x  9499D
Make DD File:/D0.30/31744	File size=31744=31744	 us=17367694    end:zE. 146x  9515B
Make DD File:/D0.30/31744	File size=31744=31744	 us=17383323    end:zE. 147x  95919
Make DD File:/D0.30/31744	File size=31744=31744	 us=17407613    end:zE. 148x  960D7
Make DD File:/D0.30/31744	File size=31744=31744	 us=17423035    end:zE. 149x  96895
Make DD File:/D0.30/31744	File size=31744=31744	 us=17438399    end:zE. 150x  97053

 ================================ Media Size=127831900160	Used Size=20578304	 us=547113   KB/sec=1699.83   Bytes written=952320
	Make DeepDir :ManyD10
Make DD File:ManyD10/D0.5/500	File size=500=500	 us=17508904    end:zE. 151x  97071
Make DD File:ManyD10/D0.5/1012	File size=1012=1012	 us=17517268    end:zE. 152x  970AF
Make DD File:ManyD10/D0.5/1524	File size=1524=1524	 us=17526150    end:zE. 153x  9710D
Make DD File:ManyD10/D0.5/2036	File size=2036=2036	 us=17534704    end:zE. 154x  9718B
Make DD File:ManyD10/D0.5/2548	File size=2548=2548	 us=17543562    end:zE. 155x  97229
Make DD File:ManyD10/D0.5/D1.5/500	File size=500=500	 us=17581946    end:zE. 156x  97247
Make DD File:ManyD10/D0.5/D1.5/1012	File size=1012=1012	 us=17591848    end:zE. 157x  97285
Make DD File:ManyD10/D0.5/D1.5/1524	File size=1524=1524	 us=17601705    end:zE. 158x  972E3
Make DD File:ManyD10/D0.5/D1.5/2036	File size=2036=2036	 us=17611335    end:zE. 159x  97361
Make DD File:ManyD10/D0.5/D1.5/2548	File size=2548=2548	 us=17621157    end:zE. 160x  973FF
Make DD File:ManyD10/D0.5/D1.5/D2.5/500	File size=500=500	 us=17660305    end:zE. 161x  9741D
Make DD File:ManyD10/D0.5/D1.5/D2.5/1012	File size=1012=1012	 us=17670943    end:zE. 162x  9745B
Make DD File:ManyD10/D0.5/D1.5/D2.5/1524	File size=1524=1524	 us=17681642    end:zE. 163x  974B9
Make DD File:ManyD10/D0.5/D1.5/D2.5/2036	File size=2036=2036	 us=17692091    end:zE. 164x  97537
Make DD File:ManyD10/D0.5/D1.5/D2.5/2548	File size=2548=2548	 us=17702815    end:zE. 165x  975D5
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/500	File size=500=500	 us=17744647    end:zE. 166x  975F3
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/1012	File size=1012=1012	 us=17756243    end:zE. 167x  97631
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/1524	File size=1524=1524	 us=17767740    end:zE. 168x  9768F
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/2036	File size=2036=2036	 us=17779211    end:zE. 169x  9770D
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/2548	File size=2548=2548	 us=17791079    end:zE. 170x  977AB
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/500	File size=500=500	 us=17833412    end:zE. 171x  977C9
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/1012	File size=1012=1012	 us=17846379    end:zE. 172x  97807
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/1524	File size=1524=1524	 us=17859257    end:zE. 173x  97865
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/2036	File size=2036=2036	 us=17871988    end:zE. 174x  978E3
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/2548	File size=2548=2548	 us=17885020    end:zE. 175x  97981
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/500	File size=500=500	 us=17929002    end:zE. 176x  9799F
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/1012	File size=1012=1012	 us=17942949    end:zE. 177x  979DD
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/1524	File size=1524=1524	 us=17956897    end:zE. 178x  97A3B
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/2036	File size=2036=2036	 us=17970632    end:zE. 179x  97AB9
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/2548	File size=2548=2548	 us=17988596    end:zE. 180x  97B57
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/500	File size=500=500	 us=18033199    end:zE. 181x  97B75
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/1012	File size=1012=1012	 us=18048002    end:zE. 182x  97BB3
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/1524	File size=1524=1524	 us=18062735    end:zE. 183x  97C11
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/2036	File size=2036=2036	 us=18077222    end:zE. 184x  97C8F
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/2548	File size=2548=2548	 us=18091899    end:zE. 185x  97D2D
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/500	File size=500=500	 us=18139108    end:zE. 186x  97D4B
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/1012	File size=1012=1012	 us=18154741    end:zE. 187x  97D89
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/1524	File size=1524=1524	 us=18170279    end:zE. 188x  97DE7
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/2036	File size=2036=2036	 us=18185790    end:zE. 189x  97E65
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/2548	File size=2548=2548	 us=18201698    end:zE. 190x  97F03
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/500	File size=500=500	 us=18249384    end:zE. 191x  97F21
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/1012	File size=1012=1012	 us=18266389    end:zE. 192x  97F5F
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/1524	File size=1524=1524	 us=18283317    end:zE. 193x  97FBD
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/2036	File size=2036=2036	 us=18300084    end:zE. 194x  9803B
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/2548	File size=2548=2548	 us=18317157    end:zE. 195x  980D9
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/D9.5/500	File size=500=500	 us=18366538    end:zE. 196x  980F7
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/D9.5/1012	File size=1012=1012	 us=18384538    end:zE. 197x  98135
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/D9.5/1524	File size=1524=1524	 us=18402541    end:zE. 198x  98193
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/D9.5/2036	File size=2036=2036	 us=18420318    end:zE. 199x  98211
Make DD File:ManyD10/D0.5/D1.5/D2.5/D3.5/D4.5/D5.5/D6.5/D7.5/D8.5/D9.5/2548	File size=2548=2548	 us=18438282    end:zE. 200x  982AF

 ================================ Media Size=127831900160	Used Size=28573696	 us=995302   KB/sec=74.77   Bytes written=76200
	Make DeepDir :TEST
Make DD File:TEST/D0.28/495	File size=495=495	 us=18491786    end:zE. 201x  982CC
Make DD File:TEST/D0.28/496	File size=496=496	 us=18500716    end:zE. 202x  982E9
Make DD File:TEST/D0.28/497	File size=497=497	 us=18509523    end:zE. 203x  98307
Make DD File:TEST/D0.28/498	File size=498=498	 us=18518368    end:zE. 204x  98325
Make DD File:TEST/D0.28/499	File size=499=499	 us=18526971    end:zE. 205x  98343
Make DD File:TEST/D0.28/500	File size=500=500	 us=18535918    end:zE. 206x  98361
Make DD File:TEST/D0.28/501	File size=501=501	 us=18556137    end:zE. 207x  9837F
Make DD File:TEST/D0.28/502	File size=502=502	 us=18565772    end:zE. 208x  9839D
Make DD File:TEST/D0.28/503	File size=503=503	 us=18575422    end:zE. 209x  983BB
Make DD File:TEST/D0.28/504	File size=504=504	 us=18584997    end:zE. 210x  983D9
Make DD File:TEST/D0.28/505	File size=505=505	 us=18594483    end:zE. 211x  983F7
Make DD File:TEST/D0.28/506	File size=506=506	 us=18612324    end:zE. 212x  98415
Make DD File:TEST/D0.28/507	File size=507=507	 us=18621889    end:zE. 213x  98433
Make DD File:TEST/D0.28/508	File size=508=508	 us=18631483    end:zE. 214x  98451
Make DD File:TEST/D0.28/509	File size=509=509	 us=18641119    end:zE. 215x  9846F
Make DD File:TEST/D0.28/510	File size=510=510	 us=18650772    end:zE. 216x  9848D
Make DD File:TEST/D0.28/511	File size=511=511	 us=18660345    end:zE. 217x  984AB
Make DD File:TEST/D0.28/512	File size=512=512	 us=18669884    end:zE. 218x  984C9
Make DD File:TEST/D0.28/513	File size=513=513	 us=18679278    end:zE. 219x  984E8
Make DD File:TEST/D0.28/514	File size=514=514	 us=18688730    end:zE. 220x  98507
Make DD File:TEST/D0.28/515	File size=515=515	 us=18698344    end:zE. 221x  98526
Make DD File:TEST/D0.28/516	File size=516=516	 us=18707992    end:zE. 222x  98545
Make DD File:TEST/D0.28/517	File size=517=517	 us=18733526    end:zE. 223x  98564
Make DD File:TEST/D0.28/518	File size=518=518	 us=18743249    end:zE. 224x  98583
Make DD File:TEST/D0.28/519	File size=519=519	 us=18752717    end:zE. 225x  985A2
Make DD File:TEST/D0.28/520	File size=520=520	 us=18762319    end:zE. 226x  985C1
Make DD File:TEST/D0.28/521	File size=521=521	 us=18771895    end:zE. 227x  985E0
Make DD File:TEST/D0.28/522	File size=522=522	 us=18790847    end:zE. 228x  985FF

 ================================ Media Size=127831900160	Used Size=32505856	 us=338156   KB/sec=41.12   Bytes written=14238
	Make DeepDir :
Make DD File:/D0.28/495	File size=495=495	 us=18822395    end:zE. 229x  9861C
Make DD File:/D0.28/496	File size=496=496	 us=18830407    end:zE. 230x  98639
Make DD File:/D0.28/497	File size=497=497	 us=18838132    end:zE. 231x  98657
Make DD File:/D0.28/498	File size=498=498	 us=18846164    end:zE. 232x  98675
Make DD File:/D0.28/499	File size=499=499	 us=18854038    end:zE. 233x  98693
Make DD File:/D0.28/500	File size=500=500	 us=18862125    end:zE. 234x  986B1
Make DD File:/D0.28/501	File size=501=501	 us=18881533    end:zE. 235x  986CF
Make DD File:/D0.28/502	File size=502=502	 us=18889970    end:zE. 236x  986ED
Make DD File:/D0.28/503	File size=503=503	 us=18898859    end:zE. 237x  9870B
Make DD File:/D0.28/504	File size=504=504	 us=18907481    end:zE. 238x  98729
Make DD File:/D0.28/505	File size=505=505	 us=18916133    end:zE. 239x  98747
Make DD File:/D0.28/506	File size=506=506	 us=18934154    end:zE. 240x  98765
Make DD File:/D0.28/507	File size=507=507	 us=18942777    end:zE. 241x  98783
Make DD File:/D0.28/508	File size=508=508	 us=18951314    end:zE. 242x  987A1
Make DD File:/D0.28/509	File size=509=509	 us=18959754    end:zE. 243x  987BF
Make DD File:/D0.28/510	File size=510=510	 us=18968242    end:zE. 244x  987DD
Make DD File:/D0.28/511	File size=511=511	 us=18976868    end:zE. 245x  987FB
Make DD File:/D0.28/512	File size=512=512	 us=18985566    end:zE. 246x  98819
Make DD File:/D0.28/513	File size=513=513	 us=18994327    end:zE. 247x  98838
Make DD File:/D0.28/514	File size=514=514	 us=19003111    end:zE. 248x  98857
Make DD File:/D0.28/515	File size=515=515	 us=19011808    end:zE. 249x  98876
Make DD File:/D0.28/516	File size=516=516	 us=19020419    end:zE. 250x  98895
Make DD File:/D0.28/517	File size=517=517	 us=19040986    end:zE. 251x  988B4
Make DD File:/D0.28/518	File size=518=518	 us=19049846    end:zE. 252x  988D3
Make DD File:/D0.28/519	File size=519=519	 us=19058570    end:zE. 253x  988F2
Make DD File:/D0.28/520	File size=520=520	 us=19067519    end:zE. 254x  98911
Make DD File:/D0.28/521	File size=521=521	 us=19076265    end:zE. 255x  98930
Make DD File:/D0.28/522	File size=522=522	 us=19094106    end:zE. 256x  9894F

 ================================ Media Size=127831900160	Used Size=36306944	 us=295035   KB/sec=47.13   Bytes written=14238
	Make DeepDir :
Make DD File:/D0.25/500	File size=500=500	 us=19124632    end:zE. 257x  9896D
Make DD File:/D0.25/501	File size=501=501	 us=19132943    end:zE. 258x  9898B
Make DD File:/D0.25/502	File size=502=502	 us=19140813    end:zE. 259x  989A9
Make DD File:/D0.25/503	File size=503=503	 us=19148721    end:zE. 260x  989C7
Make DD File:/D0.25/504	File size=504=504	 us=19156385    end:zE. 261x  989E5
Make DD File:/D0.25/505	File size=505=505	 us=19164233    end:zE. 262x  98A03
Make DD File:/D0.25/506	File size=506=506	 us=19183621    end:zE. 263x  98A21
Make DD File:/D0.25/507	File size=507=507	 us=19192315    end:zE. 264x  98A3F
Make DD File:/D0.25/508	File size=508=508	 us=19201022    end:zE. 265x  98A5D
Make DD File:/D0.25/509	File size=509=509	 us=19209653    end:zE. 266x  98A7B
Make DD File:/D0.25/510	File size=510=510	 us=19218199    end:zE. 267x  98A99
Make DD File:/D0.25/511	File size=511=511	 us=19235353    end:zE. 268x  98AB7
Make DD File:/D0.25/512	File size=512=512	 us=19243975    end:zE. 269x  98AD5
Make DD File:/D0.25/513	File size=513=513	 us=19252619    end:zE. 270x  98AF4
Make DD File:/D0.25/514	File size=514=514	 us=19261299    end:zE. 271x  98B13
Make DD File:/D0.25/515	File size=515=515	 us=19273278    end:zE. 272x  98B32
Make DD File:/D0.25/516	File size=516=516	 us=19281906    end:zE. 273x  98B51
Make DD File:/D0.25/517	File size=517=517	 us=19290509    end:zE. 274x  98B70
Make DD File:/D0.25/518	File size=518=518	 us=19298979    end:zE. 275x  98B8F
Make DD File:/D0.25/519	File size=519=519	 us=19307510    end:zE. 276x  98BAE
Make DD File:/D0.25/520	File size=520=520	 us=19316193    end:zE. 277x  98BCD
Make DD File:/D0.25/521	File size=521=521	 us=19324905    end:zE. 278x  98BEC
Make DD File:/D0.25/522	File size=522=522	 us=19346509    end:zE. 279x  98C0B
Make DD File:/D0.25/523	File size=523=523	 us=19355520    end:zE. 280x  98C2A
Make DD File:/D0.25/524	File size=524=524	 us=19364281    end:zE. 281x  98C49

 ================================ Media Size=127831900160	Used Size=39714816	 us=263086   KB/sec=47.51   Bytes written=12800
	Make DeepDir :Huge
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=19409767    end:zE. 282x  9EDEF
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=19502302    end:zE. 283x  A4F95
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=19594986    end:zE. 284x  AB13B
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=19687894    end:zE. 285x  B12E1
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=19784356    end:zE. 286x  B7487
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=19882122    end:zE. 287x  BD62D
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=19985676    end:zE. 288x  C37D3
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=20078361    end:zE. 289x  C9979
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=20171026    end:zE. 290x  CFB1F
Make DD File:Huge/D0.10/400000	File size=400000=400000	 us=20263401    end:zE. 291x  D5CC5

 ================================ Media Size=127831900160	Used Size=45219840	 us=976316   KB/sec=4001.01   Bytes written=4000000
MakeData done.

----	Task 't' complete!	----
        
D0.20 /                                                                                                                                                                    
DONE RESULTS GOOD HERE 20 Files(s)	 with 20 files of Size 81920 Bytes	19.889845 ms
        
D0.40 /                                                                                                                                                                                                                                                                                                                                    
DONE RESULTS GOOD HERE 40 Files(s)	 with 40 files of Size 4997120 Bytes	448.908492 ms
        
D0.60 /                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
DONE RESULTS GOOD HERE 60 Files(s)	 with 60 files of Size 3870720 Bytes	361.008712 ms
        
D0.30 /                                                                                                                                                                                                                                                    
DONE RESULTS GOOD HERE 30 Files(s)	 with 30 files of Size 952320 Bytes	99.979118 ms
        
ManyD10 /no count DIR
        
D0.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	4.794892 msec

D1.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	4.816565 msec

D2.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	3.999012 msec

D3.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	3.504405 msec

D4.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	4.444192 msec

D5.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	4.185998 msec

D6.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	4.844225 msec

D7.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	3.486425 msec

D8.5 /                                                
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	4.443998 msec

D9.5 /                                            
DONE RESULTS GOOD HERE 5 Files(s)	 with 5 files of Size 7620 Bytes	3.543453 ms
                                                
TEST /no count DIR
        
D0.28 /                                                                                                                                                                                                                                    
DONE RESULTS GOOD HERE 28 Files(s)	 with 28 files of Size 14238 Bytes	20.029658 ms
            
D0.28 /                                                                                                                                                                                                                                    
DONE RESULTS GOOD HERE 28 Files(s)	 with 28 files of Size 14238 Bytes	16.815658 ms
        
D0.25 /                                                                                                                                                                                                            
DONE RESULTS GOOD HERE 25 Files(s)	 with 25 files of Size 12800 Bytes	15.691205 ms
        
Huge /no count DIR
        
D0.10 /                                                                                    
DONE RESULTS GOOD HERE 10 Files(s)	 with 10 files of Size 4000000 Bytes	347.681112 ms
        
Total 291 files of Size 14019556 Bytes	 Verify Errors 0	1382.610267 msec
Bytes Used: 45219840, Bytes Total:127831900160

----	Task 'v' complete!	----
and from the directory listing:
Code:
Total 291 files of Size 14019556 Bytes
Bytes Used: 45219840, Bytes Total:127831900160

1. All files copied from the Builtin sd card to a folder on the pc in less than 30 seconds:
2. Taking the sd card out of the Teensy and putting back into the PC did a code compare - no differences found:
Capture.PNG
and if I select hide identical files:
Capture.PNG

So at this point I can not duplicate what you are seeing or why the sketch is not running for you if you add in those lines. Again I am using the sketch from your repository.
 
Running your 1_primes test. Unzip and ran bat, then copied all files to the SD card in less than minute or so.

Coping back to the PC - same thing less than a minute

1. Code compare the files transfered from the SD Card to the PC with the original files on the PC: No differences found
2. Code compare the files on the SD Card to the original files on the pc: As expected no differences

Again not really sure why you are having so many issues. I really am trying to duplicate.
 
Running your 1_primes test. Unzip and ran bat, then copied all files to the SD card in less than minute or so.

Coping back to the PC - same thing less than a minute

1. Code compare the files transfered from the SD Card to the PC with the original files on the PC: No differences found
2. Code compare the files on the SD Card to the original files on the pc: As expected no differences

Again not really sure why you are having so many issues. I really am trying to duplicate.

So you ran the bat - the entirety of it was the one line shown in the post.
> Seems like the indicated steps show your system having the MTP transfer integrity I'm not seeing with the same process.

Have got Win 11 - got it unexpectedly as pre-release and not sure it hasn't messed with things as it evolved to ship and since. Some clear FS speed issues that should not be on this 32GB RAM, 10 Gen i7 with a 1TB SSD.
> have been hoping to get feedback to show if it was or wasn't a personal issue with the Makefiles as it has evovled from Day 1 - Thanks for testing.
> For file copy from MTP a 2TB HDD is the destination it was new with this machine Feb 2021.

> It is quite possible my Hacking of TeensyDuino 1.57b1 is not equal to yours. I am not running with Serial edit to Cores and ... ???
> maybe I need to get my 'HUB' out of the loop?

Question: The MakeFiles.ino run from github does not have the LFS_PROG change: was that applied or run 'unchanged' with the mtpindex file on the SD card?
> With that change to use that LFS_PROG storage made here I did see a dramatic improvement in functionality

I have a Win 10 Laptop and my deskmate's Win 10 desktop I can repeat on
 
RE: p#1203
Moved T_4.1 to front panel USB from HUB.
Started timer and it was minutes ... so long I forgot it was running so not sure when it finished.
> CodeCompare results show the same Diff/Errors as before. ... post #1200 image

Moved to Win10 Laptop (11th gen i7 and all SSD):
Copied off compare copy, there were FOUND files on SD card from the SCAN repair not indicated before
First part went fast to 1:45 then 8 hours replaced 6 seconds ... now about 6 hours ...
... 15+ minutes in ... > it is choking on the ManyD10 folder of 500 (w/512 B adds) :: File name updates are 30 seconds apart.
>> with 50 of those files { that show copy size error } that will be 25 minutes for them
... just updated to 29 minutes remaining - THEN Completed copy at ~27+ minutes.

SAME ERROR SET: All those files of 500 (with None to 4 multiples of 512 bytes added ) are 12 bytes over size.


So this followed my Build of MakeFiles just presenting the MTP to a Win 10 Laptop.
> either it is specific to the sketch as built ... or ... something not showing for @mjs513 ???

BUILD IDE for T_4.1: CORES as provided by TD 1.57b1, @KurtE updated:: USBHost_T36 (today) , MTP_Teensy (yesterday 5/16 not changed in 3 days)

@KurtE made a change for the 500 and 512 Bytes case months back - that is where the 500 and 512 add 'test spec' came from? and why these files are present.
 
Last edited:
defragster said:
Question: The MakeFiles.ino run from github does not have the LFS_PROG change: was that applied or run 'unchanged' with the mtpindex file on the SD card?
As I said in post #1197 yes I did run and was seeing similar errors. After I made the change to use LFSPRGM to store the MTPINDEX the problems went away and I posted the results of both the makefile and just transfering the 1_primes directory showing no deltas.

Not sure why you are having issues, going to resynch all libraries and try it again.



UPDATE: Updated the USBHost library (-Part2) and MTP_TEENSY as of this morning. Reran what I did in post #1202 and got exactly the same results - no differences between copied directories:
Coping back to the PC - same thing less than a minute

Not sure why you are having so many issues - did you check your SD card with chkdsk, reformat etc.
1. Code compare the files transfered from the SD Card to the PC with the original files on the PC: No differences found
2. Code compare the files on the SD Card to the original files on the pc: As expected no differences

EDIT: Just as a note I have my T4.1 plugged into a powered hub going to the back of the PC.

UPDATE2: Repeated primes test with a smaller 32GB sd card and no issues were found when I did the code compare.

I just cannot seem to duplicate the failures you are seeing
 
Last edited:
Morning all (at least in my time zone):

Tim, I will try to run some more of your tests over the next several days. As was mentioned yesterday it may be that there is an interaction issue with the index file and operations.
As having it on a different drive fixed the initial cases for both Mike and myself.

As I also mentioned yesterday, I am currently more focused on the MSC part of the code. Trying to get more of it fleshed out and into the official builds.

It has been awhile since I looked through the copy of a directory to the PC code, so there are some aspects I don't remember all of the specifics. Like if you select a directory and drag it to a folder on your PC.
Do we need to add of of the folders/files contained within this directory branch to the storage index?

Internally we may not need it, but we may need to tell the host that this is object ID X... Whose parent is Y...
Again it has been awhile. I also don't remember for sure if we fully enumerate all of the items in the directory tree before we start the copy or do we do it on the fly? Example we enumerate a directory, then may start a copy, and if the next item is a directory, do we then iterate it then or did we already do it?

So it might be very useful, when you have a test case such as this. If you might instrument the code, to see what additional hints we can get on what might have caused the failure.
Things like:

a) Were we doing reads/writes to the index file? Did any of these fail?
b) Is it always the same number of things happening when the failure happens? Is it timing?
c) What MTP messages/responses lead up to the failure.
d) Do we hit the MTP USB error state that Paul added code in earlier to detect and hopefully we recover?

Hope this makes sense. Also will be interesting to see what you come up with.

Kurt
 
@defragster - quick question are you running your Makefile sketch as MTP Disk or MTP Serial?

One reason I ask is some places in the code you have:
Code:
#if defined(USB_MTPDISK) || defined(USB_MTPDISK_SERIAL)
#include <MTP_Teensy.h>
#endif

but at the beginning of setup you have:
Code:
void setup()
{
#ifdef USB_MTPDISK
  MTP.begin();
#endif
 
Noted compiling with MTP_Experimental, have made no edits to CORES - including the USB Descriptors
Indeed the 1_Primes issue cleared up with LFSProg for MTP.addFS(), but the bad xfer of 500 Byte base files still persists.

Updated git hub with:
Code:
#if defined(USB_MTPDISK) || defined(USB_MTPDISK_SERIAL)
  // MJS513 :: https://forum.pjrc.com/threads/68139-Teensyduino-File-System-Integration-including-MTP-and-MSC?p=306205&viewfull=1#post306205
  // Lets add the Program memory version:
  // checks that the LittFS program has started with the disk size specified
  if (lfsProg.begin(file_system_size)) {
    MTP.addFilesystem(lfsProg, "PgmIndx");
  } else {
    Serial.println("Error starting Program Flash storage");
  }
  MTP.begin();

Wasn't clear if MTP.begin() goes before or after .addFS() - both work the same - initially had it before assuming MTP had to exist before doing .addFS()?

Ran once as updated and each 500 Byte (and Mult of 512 added file) takes 30 seconds - same as when watched on Win 10 laptop.

Should I be running a 'local github' copy of LittleFS? I am for some reason - but adding that {with the above change} use only helped and didn't add any troubles. I just removed that - it looks OLD.

Seems I'm still missing some Post 1.57Beta1 code? That's why I stopped following in Feb as I wasn't keeping up somehow. Here is MakeFiles libs used - not even including USBHost_T36:
Code:
Multiple libraries were found for "SD.h"
 Used: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SD
 Not used: C:\T_Drive\arduino-1.8.19\libraries\SD
Using library LittleFS at version 1.0.0 in folder: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS 
Using library SPI at version 1.0 in folder: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SPI 
Using library SD at version 2.0.0 in folder: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SD 
Using library SdFat at version 2.1.2 in folder: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SdFat 
Using library MTP_Teensy at version 1.0.0 in folder: C:\T_Drive\tCode\libraries\MTP_Teensy

Maybe I need a fresh IDE 1.8.19 with TD 1.57b1? Not sure if there are any holdover issues from using IDE 2.0? As noted I killed that TD 1.56subset in %appdata% when the Beta 1 released.

Did disk check on SD card and all good. With SD on PC opening the 500B files in 'G:\ManyD10\D0.5' works fine. Doing a DOS dir in that folder indicates proper Byte counts.
 
Maybe I need a fresh IDE 1.8.19 with TD 1.57b1? Not sure if there are any holdover issues from using IDE 2.0? As noted I killed that TD 1.56subset in %appdata% when the Beta 1 released.

Did disk check on SD card and all good. With SD on PC opening the 500B files in 'G:\ManyD10\D0.5' works fine. Doing a DOS dir in that folder indicates proper Byte counts.

Maybe... I uninstalled the Teensy boards from the IDE for now...

Note: I am running my own simple sketch for SD to see if anything pops up: I am running it on T4.1 that has PSRAM... Using the previously generated SD card.

Code:
#include <SD.h>
#include <MTP_Teensy.h>

#define CS_SD BUILTIN_SDCARD  // Works on T_3.6 and T_4.1

#ifdef ARDUINO_TEENSY41
extern "C" uint8_t external_psram_size;
#endif

class RAMStream : public Stream {
public:
  // overrides for Stream
  virtual int available() { return (tail_ - head_); }
  virtual int read() { return (tail_ != head_) ? buffer_[head_++] : -1; }
  virtual int peek() { return (tail_ != head_) ? buffer_[head_] : -1; }

  // overrides for Print
  virtual size_t write(uint8_t b) {
    if (tail_ < buffer_size) {
      buffer_[tail_++] = b;
      return 1;
    }
    return 0;
  }

  enum { BUFFER_SIZE = 32768 };
//  uint8_t buffer_[BUFFER_SIZE];
  uint8_t *buffer_ = nullptr;
  uint32_t buffer_size = BUFFER_SIZE;
  uint32_t head_ = 0;
  uint32_t tail_ = 0;
};

RAMStream rstream;

//#define CS_SD 10  // Works on SPI with this CS pin
void setup()
{

  // see if external memory
#ifdef ARDUINO_TEENSY41
  if (external_psram_size) {
    rstream.buffer_size = 2097152;
    rstream.buffer_ = (uint8_t*)extmem_malloc(rstream.buffer_size);
    Serial.printf("extmem_malloc %p %u %u\n", rstream.buffer_, rstream.buffer_size, external_psram_size);
  }
#endif
  if (!rstream.buffer_) {
    rstream.buffer_ = (uint8_t*)malloc(rstream.buffer_size);
    Serial.printf("malloc %p %u\n", rstream.buffer_, rstream.buffer_size);
  }


  // mandatory to begin the MTP session.
  //MTP.begin();

  Serial.begin(9600);
  while (!Serial && millis() < 5000) {
    // wait for serial port to connect.
  }

  // Add SD Card
  if (SD.begin(CS_SD)) {
    MTP.addFilesystem(SD, "SD Card");
    Serial.println("Added SD card using built in SDIO, or given SPI CS");
  } else {
    Serial.println("No SD Card");
  }
  Serial.println("\nSetup done");
}


uint8_t print_buffer[256];
void print_capture_data() {

  Serial.printf("Capture size: %d out of %d PS:%u\n", rstream.available(), rstream.buffer_size, external_psram_size);

  int avail;
  while ((avail = rstream.available())) {
    if (avail > (int)sizeof(print_buffer)) avail = sizeof(print_buffer);

    int avail_for_write = Serial.availableForWrite();
    if (avail_for_write < avail) avail = avail_for_write;
    rstream.readBytes(print_buffer, avail);
    Serial.write(print_buffer, avail);

  } 


  int ch;
  while ((ch = rstream.read()) != -1)
    Serial.write(ch);
}

void loop() {
  MTP.loop();  //This is mandatory to be placed in the loop code.

  if (Serial.available()) {
    uint8_t command = Serial.read();
    switch (command) {
    case 'c':
      // start capture debug info
      rstream.head_ = 0;
      rstream.tail_ = 0;
      MTP.PrintStream(&rstream); // Setup which stream to use...
      Serial.println("Capturing MTP debug output");
      break;
    case 's':
      Serial.println("Stop Captured data");
      rstream.head_ = 0;
      rstream.tail_ = 0;
      break;
    case 'p':
      MTP.PrintStream(&Serial); // Setup which stream to use...
      Serial.println("Print Captured data");
      print_capture_data();
      rstream.head_ = 0;
      rstream.tail_ = 0;
      break;
    case 'd':
      // first dump list of storages:
      {
        uint32_t fsCount = MTP.getFilesystemCount();
        Serial.printf("\nDump Storage list(%u)\n", fsCount);
        for (uint32_t ii = 0; ii < fsCount; ii++) {
          Serial.printf("store:%u storage:%x name:%s fs:%x\n", ii,
                        MTP.Store2Storage(ii), MTP.getFilesystemNameByIndex(ii),
                        (uint32_t)MTP.getFilesystemNameByIndex(ii));
        }
        Serial.println("\nDump Index List");
        MTP.storage()->dumpIndexList();
      }
      break;
    default:  
      Serial.println("Menu");
      Serial.println("\t c - start capture debug data");
      Serial.println("\t p - Stop capture and print");
      Serial.println("\t s - stop capture and discard");
      Serial.println("\t d - dump storage info");
    }
    while (Serial.read() != -1);
  }

}
It more or less started as Paul's Example 3 SD simple... But I added debug support. I also went into MTP_Teensy.cpp and uncommented the line to turn on output debug.

I figured that the tons of debug output might screw up seeing timing issues, so I created my simple Memory stream, which I can turn on and off and when turning off, I have the
option to print out what it captured...
screenshot.jpg
I had turned on the capture data just before I did the copy, and printed at the state I show in image above. I also dumped the index list.

I won't put the whole 7600+ line output here, but shows information like:

Code:
Print Captured data
Capture size: 397780 out of 2097152 PS:8
loop:64107 CMD: 1007(GET_OBJECT_HANDLES)l: 24 T:90 : 10001 0 16
  >> 28: 0 1 0 22 0 0 1652873282 1652873282 D0.28
64108 RESP:2001(RSP:OK)l: 12 T:90
loop:64110 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:91 : 1c dc02 (FORMAT)
64110 RESP:2001(RSP:OK)l: 12 T:91
loop:64110 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:92 : 1c dc03 (PROTECTION)
64110 RESP:2001(RSP:OK)l: 12 T:92
loop:64111 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:93 : 1c dc04 (SIZE)
64111 RESP:2001(RSP:OK)l: 12 T:93
loop:64111 CMD: 1008(GET_OBJECT_INFO)l: 16 T:94 : 1c
64111 RESP:2001(RSP:OK)l: 12 T:94
loop:64112 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:95 : 1c dc01 (STORAGE_ID)
64112 RESP:2001(RSP:OK)l: 12 T:95
loop:64112 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:96 : 1c dc07 (OBJECT NAME)
64112 RESP:2001(RSP:OK)l: 12 T:96
loop:64113 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:97 : 1c dc08 (CREATED)
64113 RESP:2001(RSP:OK)l: 12 T:97
loop:64113 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:98 : 1c dc09 (MODIFIED)
64113 RESP:2001(RSP:OK)l: 12 T:98
loop:64114 CMD: 9802(GET_OBJECT_PROP_DESC)l: 20 T:99 : dc0b 3001 (PARENT)
64114 RESP:2001(RSP:OK)l: 12 T:99
loop:64114 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:9a : 1c dc0b (PARENT)
64114 RESP:2001(RSP:OK)l: 12 T:9a
loop:64115 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:9b : 1c dc41 (PERSISTENT_UID)
64115 RESP:2001(RSP:OK)l: 12 T:9b
loop:64115 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:9c : 1c dc44 (NAME)
64115 RESP:2001(RSP:OK)l: 12 T:9c
loop:64120 CMD: 1007(GET_OBJECT_HANDLES)l: 24 T:9d : 10001 0 1c
  >> 29: 0 0 0 28 0 495 1652873282 1652873282 495.txt
  >> 30: 0 0 0 28 29 496 1652873282 1652873282 496.txt
  >> 31: 0 0 0 28 30 497 1652873282 1652873282 497.txt
  >> 32: 0 0 0 28 31 498 1652873282 1652873282 498.txt
  >> 33: 0 0 0 28 32 499 1652873282 1652873282 499.txt
  >> 34: 0 0 0 28 33 500 1652873282 1652873282 500.txt
  >> 35: 0 0 0 28 34 501 1652873282 1652873282 501.txt
  >> 36: 0 0 0 28 35 502 1652873282 1652873282 502.txt
  >> 37: 0 0 0 28 36 503 1652873282 1652873282 503.txt
  >> 38: 0 0 0 28 37 504 1652873282 1652873282 504.txt
  >> 39: 0 0 0 28 38 505 1652873282 1652873282 505.txt
  >> 40: 0 0 0 28 39 506 1652873282 1652873282 506.txt
  >> 41: 0 0 0 28 40 507 1652873282 1652873282 507.txt
  >> 42: 0 0 0 28 41 508 1652873282 1652873282 508.txt
  >> 43: 0 0 0 28 42 509 1652873282 1652873282 509.txt
  >> 44: 0 0 0 28 43 510 1652873282 1652873282 510.txt
  >> 45: 0 0 0 28 44 511 1652873282 1652873282 511.txt
  >> 46: 0 0 0 28 45 512 1652873282 1652873282 512.txt
  >> 47: 0 0 0 28 46 513 1652873282 1652873282 513.txt
  >> 48: 0 0 0 28 47 514 1652873282 1652873282 514.txt
...
 >> 54: 0 0 0 28 53 520 1652873282 1652873282 520.txt
  >> 55: 0 0 0 28 54 521 1652873284 1652873284 521.txt
  >> 56: 0 0 0 28 55 522 1652873284 1652873284 522.txt
64128 RESP:2001(RSP:OK)l: 12 T:9d
loop:64130 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:9e : 38 dc02 (FORMAT)
64130 RESP:2001(RSP:OK)l: 12 T:9e
loop:64131 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:9f : 38 dc03 (PROTECTION)
64131 RESP:2001(RSP:OK)l: 12 T:9f
loop:64132 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a0 : 38 dc04 (SIZE)
64132 RESP:2001(RSP:OK)l: 12 T:a0
loop:64134 CMD: 1008(GET_OBJECT_INFO)l: 16 T:a1 : 38
64134 RESP:2001(RSP:OK)l: 12 T:a1
loop:64135 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a2 : 38 dc01 (STORAGE_ID)
64135 RESP:2001(RSP:OK)l: 12 T:a2
loop:64136 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a3 : 38 dc07 (OBJECT NAME)
64136 RESP:2001(RSP:OK)l: 12 T:a3
loop:64136 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a4 : 38 dc08 (CREATED)
64137 RESP:2001(RSP:OK)l: 12 T:a4
loop:64137 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a5 : 38 dc09 (MODIFIED)
64137 RESP:2001(RSP:OK)l: 12 T:a5
loop:64138 CMD: 9802(GET_OBJECT_PROP_DESC)l: 20 T:a6 : dc0b 3000 (PARENT)
64138 RESP:2001(RSP:OK)l: 12 T:a6
loop:64139 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a7 : 38 dc0b (PARENT)
64139 RESP:2001(RSP:OK)l: 12 T:a7
loop:64139 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a8 : 38 dc41 (PERSISTENT_UID)
64139 RESP:2001(RSP:OK)l: 12 T:a8
loop:64140 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:a9 : 38 dc44 (NAME)
64140 RESP:2001(RSP:OK)l: 12 T:a9
loop:64142 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:aa : 37 dc02 (FORMAT)
64142 RESP:2001(RSP:OK)l: 12 T:aa
loop:64143 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:ab : 37 dc03 (PROTECTION)
64143 RESP:2001(RSP:OK)l: 12 T:ab
loop:64143 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:ac : 37 dc04 (SIZE)
64143 RESP:2001(RSP:OK)l: 12 T:ac
loop:64144 CMD: 1008(GET_OBJECT_INFO)l: 16 T:ad : 37
64144 RESP:2001(RSP:OK)l: 12 T:ad
loop:64145 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:ae : 37 dc01 (STORAGE_ID)
64145 RESP:2001(RSP:OK)l: 12 T:ae
loop:64146 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:af : 37 dc07 (OBJECT NAME)
64146 RESP:2001(RSP:OK)l: 12 T:af
loop:64146 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b0 : 37 dc08 (CREATED)
64146 RESP:2001(RSP:OK)l: 12 T:b0
loop:64146 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b1 : 37 dc09 (MODIFIED)
64146 RESP:2001(RSP:OK)l: 12 T:b1
loop:64147 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b2 : 37 dc0b (PARENT)
64147 RESP:2001(RSP:OK)l: 12 T:b2
loop:64147 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b3 : 37 dc41 (PERSISTENT_UID)
64147 RESP:2001(RSP:OK)l: 12 T:b3
loop:64148 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b4 : 37 dc44 (NAME)
64148 RESP:2001(RSP:OK)l: 12 T:b4
loop:64149 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b5 : 36 dc02 (FORMAT)
64149 RESP:2001(RSP:OK)l: 12 T:b5
loop:64150 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b6 : 36 dc03 (PROTECTION)
64150 RESP:2001(RSP:OK)l: 12 T:b6
loop:64150 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b7 : 36 dc04 (SIZE)
64150 RESP:2001(RSP:OK)l: 12 T:b7
loop:64150 CMD: 1008(GET_OBJECT_INFO)l: 16 T:b8 : 36
64150 RESP:2001(RSP:OK)l: 12 T:b8
loop:64150 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:b9 : 36 dc01 (STORAGE_ID)
64151 RESP:2001(RSP:OK)l: 12 T:b9
loop:64151 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:ba : 36 dc07 (OBJECT NAME)
64151 RESP:2001(RSP:OK)l: 12 T:ba
loop:64151 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:bb : 36 dc08 (CREATED)
64151 RESP:2001(RSP:OK)l: 12 T:bb
loop:64151 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:bc : 36 dc09 (MODIFIED)
64151 RESP:2001(RSP:OK)l: 12 T:bc
loop:64151 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:bd : 36 dc0b (PARENT)
64151 RESP:2001(RSP:OK)l: 12 T:bd
loop:64151 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:be : 36 dc41 (PERSISTENT_UID)
64151 RESP:2001(RSP:OK)l: 12 T:be
loop:64151 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:bf : 36 dc44 (NAME)
...
64213 RESP:2001(RSP:OK)l: 12 T:1a6
loop:64214 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1a7 : 20 dc02 (FORMAT)
64215 RESP:2001(RSP:OK)l: 12 T:1a7
loop:64215 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1a8 : 20 dc03 (PROTECTION)
64215 RESP:2001(RSP:OK)l: 12 T:1a8
loop:64215 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1a9 : 20 dc04 (SIZE)
64215 RESP:2001(RSP:OK)l: 12 T:1a9
loop:64215 CMD: 1008(GET_OBJECT_INFO)l: 16 T:1aa : 20
64215 RESP:2001(RSP:OK)l: 12 T:1aa
loop:64216 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1ab : 20 dc01 (STORAGE_ID)
64216 RESP:2001(RSP:OK)l: 12 T:1ab
loop:64216 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1ac : 20 dc07 (OBJECT NAME)
64216 RESP:2001(RSP:OK)l: 12 T:1ac
loop:64216 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1ad : 20 dc08 (CREATED)
64216 RESP:2001(RSP:OK)l: 12 T:1ad
loop:64216 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1ae : 20 dc09 (MODIFIED)
64216 RESP:2001(RSP:OK)l: 12 T:1ae
loop:64216 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1af : 20 dc0b (PARENT)
64216 RESP:2001(RSP:OK)l: 12 T:1af
loop:64216 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b0 : 20 dc41 (PERSISTENT_UID)
64216 RESP:2001(RSP:OK)l: 12 T:1b0
loop:64217 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b1 : 20 dc44 (NAME)
64217 RESP:2001(RSP:OK)l: 12 T:1b1
loop:64217 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b2 : 1f dc02 (FORMAT)
64217 RESP:2001(RSP:OK)l: 12 T:1b2
loop:64218 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b3 : 1f dc03 (PROTECTION)
64218 RESP:2001(RSP:OK)l: 12 T:1b3
loop:64218 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b4 : 1f dc04 (SIZE)
64218 RESP:2001(RSP:OK)l: 12 T:1b4
loop:64218 CMD: 1008(GET_OBJECT_INFO)l: 16 T:1b5 : 1f
64218 RESP:2001(RSP:OK)l: 12 T:1b5
loop:64218 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b6 : 1f dc01 (STORAGE_ID)
64218 RESP:2001(RSP:OK)l: 12 T:1b6
loop:64219 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b7 : 1f dc07 (OBJECT NAME)
64219 RESP:2001(RSP:OK)l: 12 T:1b7
loop:64219 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b8 : 1f dc08 (CREATED)
64219 RESP:2001(RSP:OK)l: 12 T:1b8
loop:64219 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1b9 : 1f dc09 (MODIFIED)
64219 RESP:2001(RSP:OK)l: 12 T:1b9
loop:64219 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1ba : 1f dc0b (PARENT)
64219 RESP:2001(RSP:OK)l: 12 T:1ba
loop:64219 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1bb : 1f dc41 (PERSISTENT_UID)
64219 RESP:2001(RSP:OK)l: 12 T:1bb
loop:64219 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1bc : 1f dc44 (NAME)
64219 RESP:2001(RSP:OK)l: 12 T:1bc
loop:64220 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1bd : 1e dc02 (FORMAT)
64220 RESP:2001(RSP:OK)l: 12 T:1bd
loop:64220 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1be : 1e dc03 (PROTECTION)
64220 RESP:2001(RSP:OK)l: 12 T:1be
loop:64221 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1bf : 1e dc04 (SIZE)
64221 RESP:2001(RSP:OK)l: 12 T:1bf
loop:64221 CMD: 1008(GET_OBJECT_INFO)l: 16 T:1c0 : 1e
64221 RESP:2001(RSP:OK)l: 12 T:1c0
loop:64221 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c1 : 1e dc01 (STORAGE_ID)
64221 RESP:2001(RSP:OK)l: 12 T:1c1
loop:64222 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c2 : 1e dc07 (OBJECT NAME)
64222 RESP:2001(RSP:OK)l: 12 T:1c2
loop:64222 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c3 : 1e dc08 (CREATED)
64222 RESP:2001(RSP:OK)l: 12 T:1c3
loop:64222 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c4 : 1e dc09 (MODIFIED)
64222 RESP:2001(RSP:OK)l: 12 T:1c4
loop:64222 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c5 : 1e dc0b (PARENT)
64222 RESP:2001(RSP:OK)l: 12 T:1c5
loop:64222 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c6 : 1e dc41 (PERSISTENT_UID)
64222 RESP:2001(RSP:OK)l: 12 T:1c6
loop:64222 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c7 : 1e dc44 (NAME)
64222 RESP:2001(RSP:OK)l: 12 T:1c7
loop:64223 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c8 : 1d dc02 (FORMAT)
64223 RESP:2001(RSP:OK)l: 12 T:1c8
loop:64223 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1c9 : 1d dc03 (PROTECTION)
64223 RESP:2001(RSP:OK)l: 12 T:1c9
loop:64223 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1ca : 1d dc04 (SIZE)
64223 RESP:2001(RSP:OK)l: 12 T:1ca
loop:64224 CMD: 1008(GET_OBJECT_INFO)l: 16 T:1cb : 1d
64224 RESP:2001(RSP:OK)l: 12 T:1cb
loop:64224 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1cc : 1d dc01 (STORAGE_ID)
64224 RESP:2001(RSP:OK)l: 12 T:1cc
loop:64224 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1cd : 1d dc07 (OBJECT NAME)
64224 RESP:2001(RSP:OK)l: 12 T:1cd
loop:64224 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1ce : 1d dc08 (CREATED)
64224 RESP:2001(RSP:OK)l: 12 T:1ce
loop:64225 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1cf : 1d dc09 (MODIFIED)
64225 RESP:2001(RSP:OK)l: 12 T:1cf
loop:64225 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1d0 : 1d dc0b (PARENT)
64225 RESP:2001(RSP:OK)l: 12 T:1d0
loop:64225 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1d1 : 1d dc41 (PERSISTENT_UID)
64225 RESP:2001(RSP:OK)l: 12 T:1d1
loop:64225 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:1d2 : 1d dc44 (NAME)
64225 RESP:2001(RSP:OK)l: 12 T:1d2
loop:64230 CMD: 1007(GET_OBJECT_HANDLES)l: 24 T:1d3 : 10001 0 11
  >> 57: 0 0 0 17 0 4096 1652873266 1652873266 4096_1.txt
  >> 58: 0 0 0 17 57 4096 1652873266 1652873266 4096_2.txt
  >> 59: 0 0 0 17 58 4096 1652873266 1652873266 4096_3.txt
  >> 60: 0 0 0 17 59 4096 1652873266 1652873266 4096_4.txt
  >> 61: 0 0 0 17 60 4096 1652873266 1652873266 4096_5.txt
  >> 62: 0 0 0 17 61 4096 1652873266 1652873266 4096_6.txt
  >> 63: 0 0 0 17 62 4096 1652873266 1652873266 4096_7.txt
...
<<<<<<<<<<<<<<<<<<< We are now down to line 691 in debug output >>>>>>>>>>>>>>>>>>>>>>>>
Skip to about line 7081...

65300 RESP:2001(RSP:OK)l: 12 T:dc7
loop:65300 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:dc8 : 163 dc01 (STORAGE_ID)
65300 RESP:2001(RSP:OK)l: 12 T:dc8
loop:65300 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:dc9 : 163 dc07 (OBJECT NAME)
65300 RESP:2001(RSP:OK)l: 12 T:dc9
loop:65300 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:dca : 163 dc08 (CREATED)
65300 RESP:2001(RSP:OK)l: 12 T:dca
loop:65301 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:dcb : 163 dc09 (MODIFIED)
65301 RESP:2001(RSP:OK)l: 12 T:dcb
loop:65301 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:dcc : 163 dc0b (PARENT)
65301 RESP:2001(RSP:OK)l: 12 T:dcc
loop:65301 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:dcd : 163 dc41 (PERSISTENT_UID)
65301 RESP:2001(RSP:OK)l: 12 T:dcd
loop:65301 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:dce : 163 dc44 (NAME)
65301 RESP:2001(RSP:OK)l: 12 T:dce
loop:65402 CMD: 1009(GET_OBJECT)l: 16 T:dcf : 1d
65404 RESP:2001(RSP:OK)l: 12 T:dcf
loop:65421 CMD: 1009(GET_OBJECT)l: 16 T:dd0 : 1e
65423 RESP:2001(RSP:OK)l: 12 T:dd0
loop:65439 CMD: 1009(GET_OBJECT)l: 16 T:dd1 : 1f
65440 RESP:2001(RSP:OK)l: 12 T:dd1
loop:65456 CMD: 1009(GET_OBJECT)l: 16 T:dd2 : 20
65458 RESP:2001(RSP:OK)l: 12 T:dd2
loop:65474 CMD: 1009(GET_OBJECT)l: 16 T:dd3 : 21
65475 RESP:2001(RSP:OK)l: 12 T:dd3
loop:65491 CMD: 1009(GET_OBJECT)l: 16 T:dd4 : 22
send a ZLP
65493 RESP:2001(RSP:OK)l: 12 T:dd4
loop:65509 CMD: 1009(GET_OBJECT)l: 16 T:dd5 : 23
65511 RESP:2001(RSP:OK)l: 12 T:dd5
loop:65527 CMD: 1009(GET_OBJECT)l: 16 T:dd6 : 24
65529 RESP:2001(RSP:OK)l: 12 T:dd6
loop:65545 CMD: 1009(GET_OBJECT)l: 16 T:dd7 : 25
65547 RESP:2001(RSP:OK)l: 12 T:dd7
loop:65564 CMD: 1009(GET_OBJECT)l: 16 T:dd8 : 26
65565 RESP:2001(RSP:OK)l: 12 T:dd8
loop:65582 CMD: 1009(GET_OBJECT)l: 16 T:dd9 : 27
65584 RESP:2001(RSP:OK)l: 12 T:dd9
loop:65600 CMD: 1009(GET_OBJECT)l: 16 T:dda : 28
65601 RESP:2001(RSP:OK)l: 12 T:dda
loop:65617 CMD: 1009(GET_OBJECT)l: 16 T:ddb : 29
65618 RESP:2001(RSP:OK)l: 12 T:ddb
loop:65641 CMD: 1009(GET_OBJECT)l: 16 T:ddc : 2a
65643 RESP:2001(RSP:OK)l: 12 T:ddc
loop:65657 CMD: 1009(GET_OBJECT)l: 16 T:ddd : 2b
65659 RESP:2001(RSP:OK)l: 12 T:ddd
loop:65676 CMD: 1009(GET_OBJECT)l: 16 T:dde : 2c
65678 RESP:2001(RSP:OK)l: 12 T:dde
loop:65695 CMD: 1009(GET_OBJECT)l: 16 T:ddf : 2d
65697 RESP:2001(RSP:OK)l: 12 T:ddf
loop:65713 CMD: 1009(GET_OBJECT)l: 16 T:de0 : 2e
65714 RESP:2001(RSP:OK)l: 12 T:de0
loop:65732 CMD: 1009(GET_OBJECT)l: 16 T:de1 : 2f
65734 RESP:2001(RSP:OK)l: 12 T:de1
loop:65750 CMD: 1009(GET_OBJECT)l: 16 T:de2 : 30
65752 RESP:2001(RSP:OK)l: 12 T:de2
loop:65768 CMD: 1009(GET_OBJECT)l: 16 T:de3 : 31
65770 RESP:2001(RSP:OK)l: 12 T:de3
loop:65789 CMD: 1009(GET_OBJECT)l: 16 T:de4 : 32
65790 RESP:2001(RSP:OK)l: 12 T:de4
loop:65805 CMD: 1009(GET_OBJECT)l: 16 T:de5 : 33
65807 RESP:2001(RSP:OK)l: 12 T:de5
loop:65823 CMD: 1009(GET_OBJECT)l: 16 T:de6 : 34
65825 RESP:2001(RSP:OK)l: 12 T:de6
loop:65840 CMD: 1009(GET_OBJECT)l: 16 T:de7 : 35
65842 RESP:2001(RSP:OK)l: 12 T:de7
loop:65858 CMD: 1009(GET_OBJECT)l: 16 T:de8 : 36
65860 RESP:2001(RSP:OK)l: 12 T:de8
loop:65878 CMD: 1009(GET_OBJECT)l: 16 T:de9 : 37
65880 RESP:2001(RSP:OK)l: 12 T:de9
loop:65897 CMD: 1009(GET_OBJECT)l: 16 T:dea : 38
65899 RESP:2001(RSP:OK)l: 12 T:dea
loop:66092 CMD: 1009(GET_OBJECT)l: 16 T:deb : 39
66094 RESP:2001(RSP:OK)l: 12 T:deb
loop:66109 CMD: 1009(GET_OBJECT)l: 16 T:dec : 3a
66112 RESP:2001(RSP:OK)l: 12 T:dec
loop:66129 CMD: 1009(GET_OBJECT)l: 16 T:ded : 3b
66131 RESP:2001(RSP:OK)l: 12 T:ded
loop:66149 CMD: 1009(GET_OBJECT)l: 16 T:dee : 3c
66152 RESP:2001(RSP:OK)l: 12 T:dee
loop:66204 CMD: 1009(GET_OBJECT)l: 16 T:def : 3d
66207 RESP:2001(RSP:OK)l: 12 T:def
loop:66225 CMD: 1009(GET_OBJECT)l: 16 T:df0 : 3e
66228 RESP:2001(RSP:OK)l: 12 T:df0
loop:66248 CMD: 1009(GET_OBJECT)l: 16 T:df1 : 3f
66251 RESP:2001(RSP:OK)l: 12 T:df1
loop:66270 CMD: 1009(GET_OBJECT)l: 16 T:df2 : 40
66276 RESP:2001(RSP:OK)l: 12 T:df2
loop:66296 CMD: 1009(GET_OBJECT)l: 16 T:df3 : 41
66299 RESP:2001(RSP:OK)l: 12 T:df3
loop:66322 CMD: 1009(GET_OBJECT)l: 16 T:df4 : 42
66325 RESP:2001(RSP:OK)l: 12 T:df4
loop:66343 CMD: 1009(GET_OBJECT)l: 16 T:df5 : 43
66346 RESP:2001(RSP:OK)l: 12 T:df5
loop:66365 CMD: 1009(GET_OBJECT)l: 16 T:df6 : 44
66367 RESP:2001(RSP:OK)l: 12 T:df6
loop:66398 CMD: 1009(GET_OBJECT)l: 16 T:df7 : 45
66401 RESP:2001(RSP:OK)l: 12 T:df7
loop:66433 CMD: 1009(GET_OBJECT)l: 16 T:df8 : 46
66436 RESP:2001(RSP:OK)l: 12 T:df8
loop:66452 CMD: 1009(GET_OBJECT)l: 16 T:df9 : 47
66455 RESP:2001(RSP:OK)l: 12 T:df9
loop:66476 CMD: 1009(GET_OBJECT)l: 16 T:dfa : 48
66478 RESP:2001(RSP:OK)l: 12 T:dfa
loop:66494 CMD: 1009(GET_OBJECT)l: 16 T:dfb : 49
66497 RESP:2001(RSP:OK)l: 12 T:dfb
loop:66515 CMD: 1009(GET_OBJECT)l: 16 T:dfc : 4a
66518 RESP:2001(RSP:OK)l: 12 T:dfc
loop:66536 CMD: 1009(GET_OBJECT)l: 16 T:dfd : 4b
66539 RESP:2001(RSP:OK)l: 12 T:dfd
loop:66556 CMD: 1009(GET_OBJECT)l: 16 T:dfe : 4c
66558 RESP:2001(RSP:OK)l: 12 T:dfe
loop:66815 CMD: 1009(GET_OBJECT)l: 16 T:dff : 4d
send a ZLP
66817 RESP:2001(RSP:OK)l: 12 T:dff
loop:66834 CMD: 1009(GET_OBJECT)l: 16 T:e00 : 4e
66835 RESP:2001(RSP:OK)l: 12 T:e00
loop:66858 CMD: 1009(GET_OBJECT)l: 16 T:e01 : 4f
66860 RESP:2001(RSP:OK)l: 12 T:e01
loop:66918 CMD: 1009(GET_OBJECT)l: 16 T:e02 : 50
66924 RESP:2001(RSP:OK)l: 12 T:e02
loop:66944 CMD: 1009(GET_OBJECT)l: 16 T:e03 : 51
66951 RESP:2001(RSP:OK)l: 12 T:e03
loop:66972 CMD: 1009(GET_OBJECT)l: 16 T:e04 : 52
66977 RESP:2001(RSP:OK)l: 12 T:e04
loop:66996 CMD: 1009(GET_OBJECT)l: 16 T:e05 : 53
67000 RESP:2001(RSP:OK)l: 12 T:e05
loop:67019 CMD: 1009(GET_OBJECT)l: 16 T:e06 : 54
67023 RESP:2001(RSP:OK)l: 12 T:e06
loop:67045 CMD: 1009(GET_OBJECT)l: 16 T:e07 : 55
67050 RESP:2001(RSP:OK)l: 12 T:e07
loop:67071 CMD: 1009(GET_OBJECT)l: 16 T:e08 : 56
67076 RESP:2001(RSP:OK)l: 12 T:e08
loop:67097 CMD: 1009(GET_OBJECT)l: 16 T:e09 : 57
67101 RESP:2001(RSP:OK)l: 12 T:e09
loop:67138 CMD: 1009(GET_OBJECT)l: 16 T:e0a : 58
67142 RESP:2001(RSP:OK)l: 12 T:e0a
loop:67162 CMD: 1009(GET_OBJECT)l: 16 T:e0b : 59
67167 RESP:2001(RSP:OK)l: 12 T:e0b
loop:67186 CMD: 1009(GET_OBJECT)l: 16 T:e0c : 5a
67190 RESP:2001(RSP:OK)l: 12 T:e0c
loop:67209 CMD: 1009(GET_OBJECT)l: 16 T:e0d : 5b
67213 RESP:2001(RSP:OK)l: 12 T:e0d
loop:67232 CMD: 1009(GET_OBJECT)l: 16 T:e0e : 5c
67236 RESP:2001(RSP:OK)l: 12 T:e0e
loop:67256 CMD: 1009(GET_OBJECT)l: 16 T:e0f : 5d
67261 RESP:2001(RSP:OK)l: 12 T:e0f
loop:67280 CMD: 1009(GET_OBJECT)l: 16 T:e10 : 5e
67285 RESP:2001(RSP:OK)l: 12 T:e10
loop:67304 CMD: 1009(GET_OBJECT)l: 16 T:e11 : 5f
67309 RESP:2001(RSP:OK)l: 12 T:e11
loop:67327 CMD: 1009(GET_OBJECT)l: 16 T:e12 : 60
67338 RESP:2001(RSP:OK)l: 12 T:e12
loop:67359 CMD: 1009(GET_OBJECT)l: 16 T:e13 : 61
67369 RESP:2001(RSP:OK)l: 12 T:e13
loop:67390 CMD: 1009(GET_OBJECT)l: 16 T:e14 : 62
67400 RESP:2001(RSP:OK)l: 12 T:e14
loop:67418 CMD: 1009(GET_OBJECT)l: 16 T:e15 : 63
67428 RESP:2001(RSP:OK)l: 12 T:e15
loop:67445 CMD: 1009(GET_OBJECT)l: 16 T:e16 : 64
67456 RESP:2001(RSP:OK)l: 12 T:e16
loop:67472 CMD: 1009(GET_OBJECT)l: 16 T:e17 : 65
67482 RESP:2001(RSP:OK)l: 12 T:e17
loop:67672 CMD: 1009(GET_OBJECT)l: 16 T:e18 : 66
67685 RESP:2001(RSP:OK)l: 12 T:e18
loop:67699 CMD: 1009(GET_OBJECT)l: 16 T:e19 : 67
67709 RESP:2001(RSP:OK)l: 12 T:e19
loop:67766 CMD: 1009(GET_OBJECT)l: 16 T:e1a : 68
67777 RESP:2001(RSP:OK)l: 12 T:e1a
loop:67804 CMD: 1009(GET_OBJECT)l: 16 T:e1b : 69
67819 RESP:2001(RSP:OK)l: 12 T:e1b
loop:67843 CMD: 1009(GET_OBJECT)l: 16 T:e1c : 6a
67854 RESP:2001(RSP:OK)l: 12 T:e1c
loop:67876 CMD: 1009(GET_OBJECT)l: 16 T:e1d : 6b
67886 RESP:2001(RSP:OK)l: 12 T:e1d
loop:67913 CMD: 1009(GET_OBJECT)l: 16 T:e1e : 6c
67925 RESP:2001(RSP:OK)l: 12 T:e1e
loop:67949 CMD: 1009(GET_OBJECT)l: 16 T:e1f : 6d
67959 RESP:2001(RSP:OK)l: 12 T:e1f
loop:67988 CMD: 1009(GET_OBJECT)l: 16 T:e20 : 6e
68000 RESP:2001(RSP:OK)l: 12 T:e20
loop:68023 CMD: 1009(GET_OBJECT)l: 16 T:e21 : 6f
68034 RESP:2001(RSP:OK)l: 12 T:e21
loop:68056 CMD: 1009(GET_OBJECT)l: 16 T:e22 : 70
68066 RESP:2001(RSP:OK)l: 12 T:e22
loop:68087 CMD: 1009(GET_OBJECT)l: 16 T:e23 : 71
68097 RESP:2001(RSP:OK)l: 12 T:e23
loop:68122 CMD: 1009(GET_OBJECT)l: 16 T:e24 : 72
68132 RESP:2001(RSP:OK)l: 12 T:e24
loop:68158 CMD: 1009(GET_OBJECT)l: 16 T:e25 : 73
68168 RESP:2001(RSP:OK)l: 12 T:e25
loop:68187 CMD: 1009(GET_OBJECT)l: 16 T:e26 : 74
68197 RESP:2001(RSP:OK)l: 12 T:e26
loop:68218 CMD: 1009(GET_OBJECT)l: 16 T:e27 : 75
68231 RESP:2001(RSP:OK)l: 12 T:e27
loop:68253 CMD: 1009(GET_OBJECT)l: 16 T:e28 : 76
68264 RESP:2001(RSP:OK)l: 12 T:e28
loop:68285 CMD: 1009(GET_OBJECT)l: 16 T:e29 : 77
68295 RESP:2001(RSP:OK)l: 12 T:e29
loop:68317 CMD: 1009(GET_OBJECT)l: 16 T:e2a : 78
68328 RESP:2001(RSP:OK)l: 12 T:e2a
loop:68347 CMD: 1009(GET_OBJECT)l: 16 T:e2b : 79
68358 RESP:2001(RSP:OK)l: 12 T:e2b
loop:68378 CMD: 1009(GET_OBJECT)l: 16 T:e2c : 7a
68388 RESP:2001(RSP:OK)l: 12 T:e2c
loop:68408 CMD: 1009(GET_OBJECT)l: 16 T:e2d : 7b
68419 RESP:2001(RSP:OK)l: 12 T:e2d
loop:68439 CMD: 1009(GET_OBJECT)l: 16 T:e2e : 7c
68449 RESP:2001(RSP:OK)l: 12 T:e2e
loop:68470 CMD: 1009(GET_OBJECT)l: 16 T:e2f : 7d
68480 RESP:2001(RSP:OK)l: 12 T:e2f
loop:68500 CMD: 1009(GET_OBJECT)l: 16 T:e30 : 7e
68510 RESP:2001(RSP:OK)l: 12 T:e30
loop:68529 CMD: 1009(GET_OBJECT)l: 16 T:e31 : 7f
68539 RESP:2001(RSP:OK)l: 12 T:e31
loop:68559 CMD: 1009(GET_OBJECT)l: 16 T:e32 : 80
68569 RESP:2001(RSP:OK)l: 12 T:e32
loop:68585 CMD: 1009(GET_OBJECT)l: 16 T:e33 : 81
68595 RESP:2001(RSP:OK)l: 12 T:e33
loop:68816 CMD: 1009(GET_OBJECT)l: 16 T:e34 : 82
68826 RESP:2001(RSP:OK)l: 12 T:e34
loop:68845 CMD: 1009(GET_OBJECT)l: 16 T:e35 : 83
68855 RESP:2001(RSP:OK)l: 12 T:e35
loop:68921 CMD: 1009(GET_OBJECT)l: 16 T:e36 : 84
68933 RESP:2001(RSP:OK)l: 12 T:e36
loop:68957 CMD: 1009(GET_OBJECT)l: 16 T:e37 : 85
68967 RESP:2001(RSP:OK)l: 12 T:e37
loop:68989 CMD: 1009(GET_OBJECT)l: 16 T:e38 : 86
68989 RESP:2001(RSP:OK)l: 12 T:e38
loop:68993 CMD: 1009(GET_OBJECT)l: 16 T:e39 : 86
68993 RESP:2001(RSP:OK)l: 12 T:e39

Note: the last part is when it finally started to download the files. I see some of them generated ZLP files.
What is interesting at the end is it appears like it asked for file #86 twice when it put up that message.

The other information that was interesting is when I dumped the storage index list:
Code:
Dump Storage list(1)
store:0 storage:10001 name:SD Card fs:20000dd4

Dump Index List
0: 0 1 1 65535 0 27 0 0 /
16: 0 1 1 0 0 356 1652873020 1652873020 System Volume Information
17: 0 1 1 0 16 76 1652873266 1652873266 D0.20
18: 0 1 1 0 17 209 1652873266 1652873266 D0.40
19: 0 1 1 0 18 279 1652873270 1652873270 D0.60
20: 0 1 1 0 19 159 1652873280 1652873280 D0.30
21: 0 1 1 0 20 292 1652873280 1652873280 ManyD10
22: 0 1 1 0 21 28 1652873282 1652873282 TEST
23: 0 1 1 0 22 129 1652873284 1652873284 D0.28
24: 0 1 1 0 23 101 1652873284 1652873284 D0.25
25: 0 1 1 0 24 281 1652873284 1652873284 Huge
26: 0 0 0 0 25 0 1652956898 1652956898 mtpindex.dat
27: 0 1 1 0 26 280 1652873716 1652873716 FOUND.000
28: 0 1 1 22 0 56 1652873282 1652873282 D0.28
29: 0 0 0 28 0 495 1652873282 1652873282 495.txt
30: 0 0 0 28 29 496 1652873282 1652873282 496.txt
31: 0 0 0 28 30 497 1652873282 1652873282 497.txt
32: 0 0 0 28 31 498 1652873282 1652873282 498.txt
33: 0 0 0 28 32 499 1652873282 1652873282 499.txt
34: 0 0 0 28 33 500 1652873282 1652873282 500.txt
35: 0 0 0 28 34 501 1652873282 1652873282 501.txt
36: 0 0 0 28 35 502 1652873282 1652873282 502.txt
37: 0 0 0 28 36 503 1652873282 1652873282 503.txt
38: 0 0 0 28 37 504 1652873282 1652873282 504.txt
39: 0 0 0 28 38 505 1652873282 1652873282 505.txt
40: 0 0 0 28 39 506 1652873282 1652873282 506.txt
41: 0 0 0 28 40 507 1652873282 1652873282 507.txt
42: 0 0 0 28 41 508 1652873282 1652873282 508.txt
43: 0 0 0 28 42 509 1652873282 1652873282 509.txt
44: 0 0 0 28 43 510 1652873282 1652873282 510.txt
45: 0 0 0 28 44 511 1652873282 1652873282 511.txt
46: 0 0 0 28 45 512 1652873282 1652873282 512.txt
47: 0 0 0 28 46 513 1652873282 1652873282 513.txt
48: 0 0 0 28 47 514 1652873282 1652873282 514.txt
49: 0 0 0 28 48 515 1652873282 1652873282 515.txt
50: 0 0 0 28 49 516 1652873282 1652873282 516.txt
51: 0 0 0 28 50 517 1652873282 1652873282 517.txt
52: 0 0 0 28 51 518 1652873282 1652873282 518.txt
53: 0 0 0 28 52 519 1652873282 1652873282 519.txt
54: 0 0 0 28 53 520 1652873282 1652873282 520.txt
55: 0 0 0 28 54 521 1652873284 1652873284 521.txt
56: 0 0 0 28 55 522 1652873284 1652873284 522.txt
57: 0 0 0 17 0 4096 1652873266 1652873266 4096_1.txt
58: 0 0 0 17 57 4096 1652873266 1652873266 4096_2.txt
59: 0 0 0 17 58 4096 1652873266 1652873266 4096_3.txt
60: 0 0 0 17 59 4096 1652873266 1652873266 4096_4.txt
61: 0 0 0 17 60 4096 1652873266 1652873266 4096_5.txt
62: 0 0 0 17 61 4096 1652873266 1652873266 4096_6.txt
63: 0 0 0 17 62 4096 1652873266 1652873266 4096_7.txt
64: 0 0 0 17 63 4096 1652873266 1652873266 4096_8.txt
65: 0 0 0 17 64 4096 1652873266 1652873266 4096_9.txt
66: 0 0 0 17 65 4096 1652873266 1652873266 4096_10.txt
67: 0 0 0 17 66 4096 1652873266 1652873266 4096_11.txt
68: 0 0 0 17 67 4096 1652873266 1652873266 4096_12.txt
69: 0 0 0 17 68 4096 1652873266 1652873266 4096_13.txt
70: 0 0 0 17 69 4096 1652873266 1652873266 4096_14.txt
71: 0 0 0 17 70 4096 1652873266 1652873266 4096_15.txt
72: 0 0 0 17 71 4096 1652873266 1652873266 4096_16.txt
73: 0 0 0 17 72 4096 1652873266 1652873266 4096_17.txt
74: 0 0 0 17 73 4096 1652873266 1652873266 4096_18.txt
75: 0 0 0 17 74 4096 1652873266 1652873266 4096_19.txt
76: 0 0 0 17 75 4096 1652873266 1652873266 4096_20.txt
77: 0 0 0 24 0 500 1652873284 1652873284 500.txt
78: 0 0 0 24 77 501 1652873284 1652873284 501.txt
79: 0 0 0 24 78 502 1652873284 1652873284 502.txt
80: 0 0 0 20 143 31744 1652873280 1652873280 31744_135.txt
81: 0 0 0 20 144 31744 1652873280 1652873280 31744_136.txt
82: 0 0 0 20 145 31744 1652873280 1652873280 31744_137.txt
83: 0 0 0 20 146 31744 1652873280 1652873280 31744_138.txt
84: 0 0 0 20 147 31744 1652873280 1652873280 31744_139.txt
85: 0 0 0 20 148 31744 1652873280 1652873280 31744_140.txt
86: 0 0 0 20 149 31744 1652873280 1652873280 31744_141.txt
87: 0 0 0 20 150 31744 1652873280 1652873280 31744_142.txt
88: 0 0 0 20 151 31744 1652873280 1652873280 31744_143.txt
89: 0 0 0 20 152 31744 1652873280 1652873280 31744_144.txt
90: 0 0 0 20 153 31744 1652873280 1652873280 31744_145.txt
91: 0 0 0 20 154 31744 1652873280 1652873280 31744_146.txt
92: 0 0 0 20 155 31744 1652873280 1652873280 31744_147.txt
93: 0 0 0 20 156 31744 1652873280 1652873280 31744_148.txt
94: 0 0 0 20 157 31744 1652873280 1652873280 31744_149.txt
95: 0 0 0 20 158 31744 1652873280 1652873280 31744_150.txt
96: 0 0 0 18 0 124928 1652873266 1652873266 124928_21.txt
97: 0 0 0 18 160 124928 1652873266 1652873266 124928_22.txt
98: 0 0 0 18 161 124928 1652873266 1652873266 124928_23.txt
99: 0 0 0 18 162 124928 1652873266 1652873266 124928_24.txt
100: 0 0 0 18 163 124928 1652873266 1652873266 124928_25.txt
101: 0 0 0 18 164 124928 1652873266 1652873266 124928_26.txt
102: 0 0 0 18 165 124928 1652873266 1652873266 124928_27.txt
103: 0 0 0 18 166 124928 1652873266 1652873266 124928_28.txt
104: 0 0 0 18 167 124928 1652873266 1652873266 124928_29.txt
105: 0 0 0 18 168 124928 1652873266 1652873266 124928_30.txt
106: 0 0 0 18 169 124928 1652873266 1652873266 124928_31.txt
107: 0 0 0 18 170 124928 1652873266 1652873266 124928_32.txt
108: 0 0 0 18 171 124928 1652873266 1652873266 124928_33.txt
109: 0 0 0 18 172 124928 1652873266 1652873266 124928_34.txt
110: 0 0 0 18 173 124928 1652873266 1652873266 124928_35.txt
111: 0 0 0 18 174 124928 1652873266 1652873266 124928_36.txt
112: 0 0 0 18 175 124928 1652873266 1652873266 124928_37.txt
113: 0 0 0 18 176 124928 1652873266 1652873266 124928_38.txt
114: 0 0 0 18 177 124928 1652873266 1652873266 124928_39.txt
115: 0 0 0 18 178 124928 1652873266 1652873266 124928_40.txt
116: 0 0 0 18 179 124928 1652873266 1652873268 124928_41.txt
117: 0 0 0 18 180 124928 1652873268 1652873268 124928_42.txt
118: 0 0 0 18 181 124928 1652873268 1652873268 124928_43.txt
119: 0 0 0 18 182 124928 1652873268 1652873268 124928_44.txt
120: 0 0 0 18 183 124928 1652873268 1652873268 124928_45.txt
121: 0 0 0 18 184 124928 1652873268 1652873268 124928_46.txt
122: 0 0 0 18 185 124928 1652873268 1652873268 124928_47.txt
123: 0 0 0 18 186 124928 1652873268 1652873268 124928_48.txt
124: 0 0 0 18 187 124928 1652873268 1652873268 124928_49.txt
125: 0 0 0 18 188 124928 1652873268 1652873268 124928_50.txt
126: 0 0 0 18 189 124928 1652873268 1652873268 124928_51.txt
127: 0 0 0 18 190 124928 1652873268 1652873268 124928_52.txt
128: 0 0 0 18 191 124928 1652873268 1652873268 124928_53.txt
129: 0 0 0 18 192 124928 1652873268 1652873268 124928_54.txt
130: 0 0 0 18 193 124928 1652873268 1652873268 124928_55.txt
131: 0 0 0 18 194 124928 1652873268 1652873268 124928_56.txt
132: 0 0 0 18 195 124928 1652873268 1652873268 124928_57.txt
133: 0 0 0 18 196 124928 1652873268 1652873270 124928_58.txt
< Skiped 134 - 143 >
144: 0 0 0 19 261 64512 1652873278 1652873278 64512_113.txt
145: 0 0 0 19 272 64512 1652873278 1652873280 64512_114.txt
146: 0 0 0 19 273 64512 1652873280 1652873280 64512_115.txt
147: 0 0 0 19 274 64512 1652873280 1652873280 64512_116.txt
148: 0 0 0 19 275 64512 1652873280 1652873280 64512_117.txt
149: 0 0 0 19 276 64512 1652873280 1652873280 64512_118.txt
150: 0 0 0 19 277 64512 1652873280 1652873280 64512_119.txt
151: 0 0 0 19 278 64512 1652873280 1652873280 64512_120.txt
152: 0 0 0 27 0 131072 1652873716 1652873716 FILE0000.CHK
153: 0 1 1 25 0 291 1652873284 1652873284 D0.10
154: 0 0 0 281 0 400000 1652873284 1652873284 400000_282.txt
155: 0 0 0 281 282 400000 1652873284 1652873284 400000_283.txt
156: 0 0 0 281 283 400000 1652873284 1652873284 400000_284.txt
157: 0 0 0 281 284 400000 1652873284 1652873284 400000_285.txt
158: 0 0 0 281 285 400000 1652873284 1652873284 400000_286.txt
159: 0 0 0 281 286 400000 1652873284 1652873284 400000_287.txt
160: 0 0 0 281 287 400000 1652873284 1652873284 400000_288.txt
161: 0 0 0 281 288 400000 1652873284 1652873284 400000_289.txt
162: 0 0 0 281 289 400000 1652873284 1652873286 400000_290.txt
163: 0 0 0 281 290 400000 1652873286 1652873286 400000_291.txt
164: 0 1 1 21 0 298 1652873280 1652873280 D0.5
165: 0 0 0 292 0 500 1652873280 1652873280 500.txt
166: 0 0 0 292 293 1012 1652873280 1652873280 1012.txt
167: 0 0 0 292 294 1524 1652873280 1652873280 1524.txt
168: 0 0 0 292 295 2036 1652873280 1652873280 2036.txt
169: 0 0 0 292 296 2548 1652873280 1652873280 2548.txt
170: 0 1 1 292 297 304 1652873280 1652873280 D1.5
171: 0 0 0 298 0 500 1652873280 1652873280 500.txt
172: 0 0 0 298 299 1012 1652873280 1652873280 1012.txt
173: 0 0 0 298 300 1524 1652873280 1652873280 1524.txt
174: 0 0 0 298 301 2036 1652873280 1652873280 2036.txt
175: 0 0 0 298 302 2548 1652873280 1652873280 2548.txt
176: 0 1 1 298 303 310 1652873280 1652873280 D2.5
177: 0 0 0 304 0 500 1652873280 1652873280 500.txt
178: 0 0 0 304 305 1012 1652873280 1652873280 1012.txt
179: 0 0 0 304 306 1524 1652873280 1652873280 1524.txt
180: 0 0 0 304 307 2036 1652873280 1652873280 2036.txt
181: 0 0 0 304 308 2548 1652873280 1652873280 2548.txt
182: 0 1 1 304 309 316 1652873280 1652873280 D3.5
183: 0 0 0 310 0 500 1652873280 1652873280 500.txt
184: 0 0 0 310 311 1012 1652873280 1652873280 1012.txt
185: 0 0 0 310 312 1524 1652873280 1652873280 1524.txt
186: 0 0 0 310 313 2036 1652873280 1652873280 2036.txt
187: 0 0 0 310 314 2548 1652873280 1652873280 2548.txt
188: 0 1 1 310 315 322 1652873280 1652873280 D4.5
189: 0 0 0 316 0 500 1652873280 1652873280 500.txt
190: 0 0 0 316 317 1012 1652873280 1652873280 1012.txt
191: 0 0 0 316 318 1524 1652873280 1652873280 1524.txt
192: 0 0 0 316 319 2036 1652873280 1652873280 2036.txt
193: 0 0 0 316 320 2548 1652873280 1652873280 2548.txt
194: 0 1 1 316 321 328 1652873280 1652873280 D5.5
195: 0 0 0 322 0 500 1652873280 1652873280 500.txt
196: 0 0 0 322 323 1012 1652873282 1652873282 1012.txt
197: 0 0 0 322 324 1524 1652873282 1652873282 1524.txt
198: 0 0 0 322 325 2036 1652873282 1652873282 2036.txt
199: 0 0 0 322 326 2548 1652873282 1652873282 2548.txt
200: 0 1 1 322 327 337 1652873282 1652873282 D6.5
201: 0 0 0 328 0 500 1652873282 1652873282 500.txt
202: 0 0 0 328 329 1012 1652873282 1652873282 1012.txt
203: 0 0 0 328 330 1524 1652873282 1652873282 1524.txt
204: 0 0 0 328 331 2036 1652873282 1652873282 2036.txt
< Skiped 205 - 207 >
208: 0 0 0 328 332 2548 1652873282 1652873282 2548.txt
209: 0 1 1 328 336 343 1652873282 1652873282 D7.5
210: 0 0 0 337 0 500 1652873282 1652873282 500.txt
211: 0 0 0 337 338 1012 1652873282 1652873282 1012.txt
212: 0 0 0 337 339 1524 1652873282 1652873282 1524.txt
213: 0 0 0 337 340 2036 1652873282 1652873282 2036.txt
214: 0 0 0 337 341 2548 1652873282 1652873282 2548.txt
215: 0 1 1 337 342 349 1652873282 1652873282 D8.5
216: 0 0 0 343 0 500 1652873282 1652873282 500.txt
217: 0 0 0 343 344 1012 1652873282 1652873282 1012.txt
218: 0 0 0 343 345 1524 1652873282 1652873282 1524.txt
219: 0 0 0 343 346 2036 1652873282 1652873282 2036.txt
220: 0 0 0 343 347 2548 1652873282 1652873282 2548.txt
221: 0 1 1 343 348 354 1652873282 1652873282 D9.5
222: 0 0 0 349 0 500 1652873282 1652873282 500.txt
223: 0 0 0 349 350 1012 1652873282 1652873282 1012.txt
224: 0 0 0 349 351 1524 1652873282 1652873282 1524.txt
225: 0 0 0 349 352 2036 1652873282 1652873282 2036.txt
226: 0 0 0 349 353 2548 1652873282 1652873282 2548.txt
227: 0 0 0 16 0 12 1652873020 1652873022 WPSettings.dat
228: 0 0 0 16 355 76 1652873020 1652873022 IndexerVolumeGuid
$$$ Failed to read Index record: 4 bytes Read: 0
< Skiped 229 - 271 >
272: 0 1 1 0 0 356 1652873020 1652873020 System Volume Information
273: 0 1 1 0 16 76 1652873266 1652873266 D0.20
274: 0 1 1 0 17 209 1652873266 1652873266 D0.40
275: 0 1 1 0 18 279 1652873270 1652873270 D0.60
276: 0 1 1 0 19 159 1652873280 1652873280 D0.30
277: 0 1 1 0 20 292 1652873280 1652873280 ManyD10
278: 0 1 1 0 21 28 1652873282 1652873282 TEST
279: 0 1 1 0 22 129 1652873284 1652873284 D0.28
280: 0 1 1 0 23 101 1652873284 1652873284 D0.25
281: 0 1 1 0 24 281 1652873284 1652873284 Huge
282: 0 0 0 0 25 0 1652956898 1652956898 mtpindex.dat
283: 0 1 1 0 26 280 1652873716 1652873716 FOUND.000
284: 0 1 1 22 0 56 1652873282 1652873282 D0.28
285: 0 0 0 28 0 495 1652873282 1652873282 495.txt
286: 0 0 0 28 29 496 1652873282 1652873282 496.txt
287: 0 0 0 28 30 497 1652873282 1652873282 497.txt
288: 0 0 0 28 31 498 1652873282 1652873282 498.txt
289: 0 0 0 28 32 499 1652873282 1652873282 499.txt
290: 0 0 0 28 33 500 1652873282 1652873282 500.txt
291: 0 0 0 28 34 501 1652873282 1652873282 501.txt
292: 0 0 0 28 35 502 1652873282 1652873282 502.txt
293: 0 0 0 28 36 503 1652873282 1652873282 503.txt
294: 0 0 0 28 37 504 1652873282 1652873282 504.txt
295: 0 0 0 28 38 505 1652873282 1652873282 505.txt
296: 0 0 0 28 39 506 1652873282 1652873282 506.txt
297: 0 0 0 28 40 507 1652873282 1652873282 507.txt
298: 0 0 0 28 41 508 1652873282 1652873282 508.txt
299: 0 0 0 28 42 509 1652873282 1652873282 509.txt
300: 0 0 0 28 43 510 1652873282 1652873282 510.txt
301: 0 0 0 28 44 511 1652873282 1652873282 511.txt
302: 0 0 0 28 45 512 1652873282 1652873282 512.txt
303: 0 0 0 28 46 513 1652873282 1652873282 513.txt
304: 0 0 0 28 47 514 1652873282 1652873282 514.txt
305: 0 0 0 28 48 515 1652873282 1652873282 515.txt
306: 0 0 0 28 49 516 1652873282 1652873282 516.txt
307: 0 0 0 28 50 517 1652873282 1652873282 517.txt
308: 0 0 0 28 51 518 1652873282 1652873282 518.txt
309: 0 0 0 28 52 519 1652873282 1652873282 519.txt
310: 0 0 0 28 53 520 1652873282 1652873282 520.txt
311: 0 0 0 28 54 521 1652873284 1652873284 521.txt
312: 0 0 0 28 55 522 1652873284 1652873284 522.txt
313: 0 0 0 17 0 4096 1652873266 1652873266 4096_1.txt
314: 0 0 0 17 57 4096 1652873266 1652873266 4096_2.txt
315: 0 0 0 17 58 4096 1652873266 1652873266 4096_3.txt
316: 0 0 0 17 59 4096 1652873266 1652873266 4096_4.txt
317: 0 0 0 17 60 4096 1652873266 1652873266 4096_5.txt
318: 0 0 0 17 61 4096 1652873266 1652873266 4096_6.txt
319: 0 0 0 17 62 4096 1652873266 1652873266 4096_7.txt
320: 0 0 0 17 63 4096 1652873266 1652873266 4096_8.txt
321: 0 0 0 17 64 4096 1652873266 1652873266 4096_9.txt
322: 0 0 0 17 65 4096 1652873266 1652873266 4096_10.txt
323: 0 0 0 17 66 4096 1652873266 1652873266 4096_11.txt
324: 0 0 0 17 67 4096 1652873266 1652873266 4096_12.txt
325: 0 0 0 17 68 4096 1652873266 1652873266 4096_13.txt
326: 0 0 0 17 69 4096 1652873266 1652873266 4096_14.txt
327: 0 0 0 17 70 4096 1652873266 1652873266 4096_15.txt
328: 0 0 0 17 71 4096 1652873266 1652873266 4096_16.txt
329: 0 0 0 17 72 4096 1652873266 1652873266 4096_17.txt
330: 0 0 0 17 73 4096 1652873266 1652873266 4096_18.txt
331: 0 0 0 17 74 4096 1652873266 1652873266 4096_19.txt
332: 0 0 0 17 75 4096 1652873266 1652873266 4096_20.txt
333: 0 0 0 24 0 500 1652873284 1652873284 500.txt
334: 0 0 0 24 77 501 1652873284 1652873284 501.txt
335: 0 0 0 24 78 502 1652873284 1652873284 502.txt
$$$ Failed to read Index record: 5 bytes Read: 0
336: 0 0 0 20 143 31744 1652873280 1652873280 31744_135.txt
337: 0 0 0 20 144 31744 1652873280 1652873280 31744_136.txt
338: 0 0 0 20 145 31744 1652873280 1652873280 31744_137.txt
339: 0 0 0 20 146 31744 1652873280 1652873280 31744_138.txt
340: 0 0 0 20 147 31744 1652873280 1652873280 31744_139.txt
341: 0 0 0 20 148 31744 1652873280 1652873280 31744_140.txt
342: 0 0 0 20 149 31744 1652873280 1652873280 31744_141.txt
343: 0 0 0 20 150 31744 1652873280 1652873280 31744_142.txt
344: 0 0 0 20 151 31744 1652873280 1652873280 31744_143.txt
345: 0 0 0 20 152 31744 1652873280 1652873280 31744_144.txt
346: 0 0 0 20 153 31744 1652873280 1652873280 31744_145.txt
347: 0 0 0 20 154 31744 1652873280 1652873280 31744_146.txt
348: 0 0 0 20 155 31744 1652873280 1652873280 31744_147.txt
349: 0 0 0 20 156 31744 1652873280 1652873280 31744_148.txt
350: 0 0 0 20 157 31744 1652873280 1652873280 31744_149.txt
351: 0 0 0 20 158 31744 1652873280 1652873280 31744_150.txt
352: 0 0 0 18 0 124928 1652873266 1652873266 124928_21.txt
353: 0 0 0 18 160 124928 1652873266 1652873266 124928_22.txt
354: 0 0 0 18 161 124928 1652873266 1652873266 124928_23.txt
355: 0 0 0 18 162 124928 1652873266 1652873266 124928_24.txt
356: 0 0 0 18 163 124928 1652873266 1652873266 124928_25.txt

There were a couple of errors printed out, like: $$$ Failed to read Index record: 5 bytes Read: 0
This only happened twice, but makes me wonder if there were other times when reads failed or read or wrote the wrong data.
 
[QUOTE-defragster]Maybe I need a fresh IDE 1.8.19 with TD 1.57b1? Not sure if there are any holdover issues from using IDE 2.0? As noted I killed that TD 1.56subset in %appdata% when the Beta 1 released.

Did disk check on SD card and all good. With SD on PC opening the 500B files in 'G:\ManyD10\D0.5' works fine. Doing a DOS dir in that folder indicates proper Byte counts.[/QUOTE]

Not sure you need to at this point. I was playing around a bit more to see if I could duplicate what you were experiencing and I was finally able to duplicate the failures.

First I was running with MTP.begin being run. I was running MTP+SERIAL so the following MTP.begin would never be set:
Code:
#ifdef USB_MTPDISK
  MTP.begin();
#endif
If I switched to MTP+DISK I would start seeing the errors in file transfers - would hang or seem to hang - I ran out of patience so I hit cancel :)

As another data point I switched over to MTP_TEST_INTEGRITY sketch, with MTP.begin uncommented this time and was able to transfer all the files to back to the PC from the SD Card without hangs of any sort or issues. This was MTP_Disk or MTP_Serial but I am using prgm mem for the index file. Been testing along with Kurt but been side tracked having to do a few other things.
 
Maybe... I uninstalled the Teensy boards from the IDE for now...

Note: I am running my own simple sketch for SD to see if anything pops up: I am running it on T4.1 that has PSRAM... Using the previously generated SD card.

...

There were a couple of errors printed out, like: $$$ Failed to read Index record: 5 bytes Read: 0
This only happened twice, but makes me wonder if there were other times when reads failed or read or wrote the wrong data.

Thanks Kurt, built that sample and it ran until it hit the 'pool' ERROR, will need to add the LFS_PROG.

Enabled the debug in MTP.cpp

If I navigate to "This PC\Teensy\SD Card\ManyD10\D0.5" those 500 Byte files READ PROPERLY! : Popped up in a flash to Notepad.
> same SD card of data and Win 11 - no other changes in building ???
> will review the Makefiles.ino for some anomaly - except Mike says that works fine there ???

Will work with that and see if goodness shows up.
 
Not sure you need to at this point. I was playing around a bit more to see if I could duplicate what you were experiencing and I was finally able to duplicate the failures.

First I was running with MTP.begin being run. I was running MTP+SERIAL so the following MTP.begin would never be set:
...
As another data point I switched over to MTP_TEST_INTEGRITY sketch, with MTP.begin uncommented this time and was able to transfer all the files to back to the PC from the SD Card without hangs of any sort or issues. This was MTP_Disk or MTP_Serial but I am using prgm mem for the index file. Been testing along with Kurt but been side tracked having to do a few other things.

Looking at Kurt's sample I see:
Code:
  // mandatory to begin the MTP session.
  //MTP.begin();

So the problem is that MTP.begin()?
 
So the problem is that MTP.begin()?

Probably not. All MTP.begin is doing is starting the interval timer handling the first few messages to quote Kurt. Why it works not with MTP Commented out with MTP_Serial not sure. More investigation is needed
 
Probably not. All MTP.begin is doing is starting the interval timer handling the first few messages to quote Kurt. Why it works not with MTP Commented out with MTP_Serial not sure. More investigation is needed

Rebuilt MakeFiles.ino without the MTP.begin() :: // MTP.begin();
But using the LFS_Prog :: MTP.addFilesystem(lfsProg, "PgmIndx");

Full SD from MTP to PC completed VERY QUICKLY!

Full SD from MTP to PC completed WITHOUT FILE miscompare

And open of MTP 500 Byte TXT files to Notepad was Instant.
 
@defragster - @KurtE

Here is the integrity sketch with only 2 drives set up (Builtin sd card and Program Mem). It seems to work for MTP+DISK with Index in Progam Mem - you might what to give it a try.

View attachment mtp-test-integrity-220518a.zip

Oh its been updated for the latest stuff for MSC as well. Haven't had a chance to push it yet.
 
Quick note: I am having File writes and reads fail... And maybe more related index_seek(block_addr, ...) is failing

The current SDFat may not be allowing seek to go beyond the current size of the file.
So my guess is that the cache is getting corrupted.

That is I currently caching 4 blocks of indexes... Suppose that I decide that after the cache is full that I want to first write out the 2nd block.
So far I have not output any blocks, so I try to seek(2 * 2048) and it is now failing as the file size is currently 0... (I Think that is what is going on)

So I am going to try a few things to see if it helps. Like: if I trying write out block 2 and last block written was None) then maybe I will go ahead
and output blocks 0, 1 first and then output 2 and mark all three of them as not dirty... And remember that the largest block number that has been output is now 2...

Will see if that helps it out.
 
@defragster - @KurtE

Here is the integrity sketch with only 2 drives set up (Builtin sd card and Program Mem). It seems to work for MTP+DISK with Index in Progam Mem - you might what to give it a try.

View attachment 28416

Oh its been updated for the latest stuff for MSC as well. Haven't had a chance to push it yet.

That built and ran. I see it uses MTP.begin().
> in makefiles.ino the MTP.begin is first in setup() before Serial.begin wait
> in mtp-test-integrity.ino it is the other way around ... the MTP.begin() will not be called for up to FIVE seconds, after Serial is online - so the MTP.begin() may not do anything if the MTP startup is already underway?

Maybe a bit slower, but only 35 seconds and I didn't measure the time for transfer with Kurt's sample ... seemed faster ... 35 seconds not bad.

However when completed there was a miscompare of : 1_PRIMES\P3B391.160.BIN
 
That built and ran. I see it uses MTP.begin().
> in makefiles.ino the MTP.begin is first in setup() before Serial.begin wait
> in mtp-test-integrity.ino it is the other way around ... the MTP.begin() will not be called for up to FIVE seconds, after Serial is online - so the MTP.begin() may not do anything if the MTP startup is already underway?

Maybe a bit slower, but only 35 seconds and I didn't measure the time for transfer with Kurt's sample ... seemed faster ... 35 seconds not bad.

However when completed there was a miscompare of : 1_PRIMES\P3B391.160.BIN

I tend to always startup serial first then MTP.begin - just habit. For sake of transparency I only tested with your makefiles2204 - didn't try the primes test. Just ran another series of tests as well using the mtp_test_integrity sketch just for fun:
Using only single usb drive with 2 partitions set up.
1. MTPIndex onMSC0. Transferring riles to MSCO saw the same errors that Kurt mentioned, $$$ Failed to read Index record: x bytes Read: 0, only once.
2. Transferring to MSC1 (exFAT) and saw $$$ Failed to read Index record: x bytes Read: 0 several times.

Now if I reconfigured to use the index file in program mem all files transferred successfully from PC to MSC0 and MSC1 and vice versa

Will have to try with the primes files.
 
I tend to always startup serial first then MTP.begin - just habit. For sake of transparency I only tested with your makefiles2204 - didn't try the primes test. Just ran another series of tests as well using the mtp_test_integrity sketch just for fun:
Using only single usb drive with 2 partitions set up.
1. MTPIndex onMSC0. Transferring riles to MSCO saw the same errors that Kurt mentioned, $$$ Failed to read Index record: x bytes Read: 0, only once.
2. Transferring to MSC1 (exFAT) and saw $$$ Failed to read Index record: x bytes Read: 0 several times.

Now if I reconfigured to use the index file in program mem all files transferred successfully from PC to MSC0 and MSC1 and vice versa

Will have to try with the primes files.

Just tried it with the usb drive and partition files transferred no problems will try again with the SD Card

UPDATE: Just tried primes with sd card and had no issues
 
Quick update: You might try this storage.cpp and see if it resolves the issues.

It appeared to work for my copy of all of those files with just the one Storage on SD...

I need to remove/ comment out the debug statements,

but first would be interesting to see if it helps with your test cases.
 

Attachments

  • MTP_Storage.zip
    11.7 KB · Views: 33
Quick update: You might try this storage.cpp and see if it resolves the issues.

It appeared to work for my copy of all of those files with just the one Storage on SD...

I need to remove/ comment out the debug statements,

but first would be interesting to see if it helps with your test cases.

Kurt, using that and your sample with no LFS_Prog.
> it got further along with FULL SD_MTP copy to PC_HDD.
--> 8 directories done (3 to go) instead of just 4 (IIRC) - but more dirs copied before 'pool' error
Not sure if that means it is better by chance - or mostly fixed?

Some debug output:
Code:
...
loop:26859 CMD: 1009(GET_OBJECT)l: 16 T:e6b : 1c7
26868 RESP:2001(RSP:OK)l: 12 T:e6b
loop:26912 CMD: 1009(GET_OBJECT)l: 16 T:e6c : 1c8
26912 RESP:2001(RSP:OK)l: 12 T:e6c
loop:26914 CMD: 1009(GET_OBJECT)l: 16 T:e6d : 1c8
26914 RESP:2001(RSP:OK)l: 12 T:e6d
loop:38442 CMD: 1007(GET_OBJECT_HANDLES)l: 24 T:e6e : 10001 0 1d
[B]$$$ Failed to read Index record: 8 bytes Read: 0
$$$ Failed to read Index record: 8 bytes Read: 0
[/B]38455 RESP:2001(RSP:OK)l: 12 T:e6e
loop:38455 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:e6f : 1bf dc01 (STORAGE_ID)
38455 RESP:2001(RSP:OK)l: 12 T:e6f
loop:38455 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:e70 : 1bf dc0b (PARENT)
38455 RESP:2001(RSP:OK)l: 12 T:e70
...
 
Next steps:
Using SD with 1Primes folder and 't' I did 'b':
t - Test Files write 2204
b - Test Files write BIG

About 2+ minutes to copy, said it would take much longer, so I looked away and missed completion time. Src SD to PC copy under 30 seconds.

Did check produced:
Code:
 Directory of G:\found.000

05/18/2022  04:49 PM           131,072 FILE0000.CHK
05/18/2022  04:49 PM           131,072 FILE0001.CHK

Compare of SD source on PC to the copied files again had issue with a single file missing 0.5KB: D:\tmp\TD_1.57\18M_KEsdMTP\1_PRIMES\P3B391.2.BIN
Code:
01/01/2021  01:00 AM           397,312 P3B391.198.BIN
01/01/2021  01:00 AM           397,312 P3B391.199.BIN
[B][U]01/01/2021  01:00 AM           396,800 P3B391.2.BIN[/U][/B]
01/01/2021  01:00 AM           397,312 P3B391.20.BIN
01/01/2021  01:00 AM           397,312 P3B391.200.BIN

Now to DELETE SD files and put on T_4.1 and copy the files over and 'v'erify.

**NOTE: this is MakeFiles with no MTP.begin() and it is using LFS_Prog for mtpindex and the updated MTP_Storage.cpp

Put SD into T_4.1 and did 'v'erify to confirm what was there was still good.
> removed all files and restarted T_4.1
Copy of the larger file set from PC_HDD to T_4.1_MTP in time of 2 min 10 seconds { estimate was HOURS }

'v'erify internal test of 'signed' files verified good.

Returned SD to PC and copied the files off for CodeCompare and ONE FILE is ZERO size:
Code:
 Directory of G:\ManyF\333.128

01/01/2019  12:01 AM    <DIR>          .
01/01/2019  12:01 AM    <DIR>          ..
05/19/2022  04:41 PM               100 100.txt
05/19/2022  04:41 PM               101 101.txt
05/19/2022  04:41 PM               102 102.txt
05/19/2022  04:41 PM               103 103.txt
05/19/2022  04:41 PM               104 104.txt
[B][U]01/01/2019  12:01 AM                 0 105.txt[/U][/B]
05/19/2022  04:41 PM               106 106.txt

ChkDsk reported it had to fix something.

Dir info of SD media:
Code:
     Total Files Listed:
            1375 File(s)    103,713,923 bytes
             153 Dir(s)  124,783,296,512 bytes free

I'll have to run again in case the file delete on the T_4.1 left the media unstable as done.
 
Last edited:
@KurtE - @defragster used my MTP_TEST_INTEGRITY sketch with the following configuration
1. BuiltinSDCard only
2. Index file on sd card.

Copied files from PC to SD Card, including primes directory - took about 1 minute for Primes to get copied and another minute to copy the files generated from Tims sketch. Then copied all directories including primes back to PC.

opening the 500.txt file in directory /manyD10/......./d9.5 opened in notepad almost immediately
Did a code compare of what I copied to the SDCard with what I transferred back to the PC. NO DIFFERENCES FOUND!
 
Kurt, using that and your sample with no LFS_Prog.
> it got further along with FULL SD_MTP copy to PC_HDD.
--> 8 directories done (3 to go) instead of just 4 (IIRC) - but more dirs copied before 'pool' error
Not sure if that means it is better by chance - or mostly fixed?

Some debug output:
Code:
...
loop:26859 CMD: 1009(GET_OBJECT)l: 16 T:e6b : 1c7
26868 RESP:2001(RSP:OK)l: 12 T:e6b
loop:26912 CMD: 1009(GET_OBJECT)l: 16 T:e6c : 1c8
26912 RESP:2001(RSP:OK)l: 12 T:e6c
loop:26914 CMD: 1009(GET_OBJECT)l: 16 T:e6d : 1c8
26914 RESP:2001(RSP:OK)l: 12 T:e6d
loop:38442 CMD: 1007(GET_OBJECT_HANDLES)l: 24 T:e6e : 10001 0 1d
[B]$$$ Failed to read Index record: 8 bytes Read: 0
$$$ Failed to read Index record: 8 bytes Read: 0
[/B]38455 RESP:2001(RSP:OK)l: 12 T:e6e
loop:38455 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:e6f : 1bf dc01 (STORAGE_ID)
38455 RESP:2001(RSP:OK)l: 12 T:e6f
loop:38455 CMD: 9803(GET_OBJECT_PROP_VALUE)l: 20 T:e70 : 1bf dc0b (PARENT)
38455 RESP:2001(RSP:OK)l: 12 T:e70
...
I am sort of confused here..

You show the old style of the error messages: $$$ Failed to read Index record: 8 bytes Read: 0


The code that shows read failure:
Code:
		uint64_t seek_pos = block_index * sizeof(RecordBlock);
		bool seek_ok = index_.seek(seek_pos, SeekSet);
		if (!seek_ok) {
			MTP_class::PrintStream()->printf(F("$$$ Failed to seek for read Index record: %u addr:%llu Cur: %llu\n"), 
				recordBlocksInfo_[biIndex].block_index, seek_pos, index_.position());
		}
		size_t bytes_read = index_.read((char *)&recordBlocks_[biIndex], sizeof(RecordBlock));
		if (!seek_ok || (bytes_read != sizeof(RecordBlock))) {
			MTP_class::PrintStream()->printf(F("$$$ Failed to read Index record: %u seek:%u bytes Read: %u\n"), block_index, seek_ok, bytes_read);
		}
So your output is not showing the seek: value...
 
As a second test I ran Tim's MakeFiles sketch using MTPDisk, MTP.begin and index file on sd card.

Copied Primes folder to SDCard. Didn't see any $$Fail messages but did see several messages like the following:
Code:
26: 0 1 1 0 25 285 1652991604 1652991604 1_PRIMES
285: 0 0 1 26 284 0 0 0 P3B391.BIN
0: 0 1 1 65535 0 26 0 0 /

CODE COMPARED SHOWED NO DIFFERENCES BETWEEN WHAT WAS COPIED TO THE SD CARD AND WHAT WAS ON THE PC FOR PRIMES.


Coping the all the files made with Makefiles2204 is taking an excessive about of time. Seems to be hung in transferring ManyD10 directory and shows 1 hour 25 minutes to complete but nothing is shows in serial monitor as contining the transfer, so I cancelled - something not right.

Seeing things like this
Code:
>> cache write: 3 3 2 6144
>> cache write: 2 5 3 10240
	Extend index
 
Back
Top