9:36am
First bit of good news… v.1.21 works, v1.3.0 does not. Let’s bisect!
9:45am
The results are in!
dfc5827cf6bd90824eab3279b1507852d5305c5e is the first bad commit
commit dfc5827cf6bd90824eab3279b1507852d5305c5e
Author: brian crabtree <tehn@monome.org>
Date: Thu Dec 8 17:12:07 2016 -0500
new ii ansible ops
:160000 160000 93241edf5eeb40b839ddf162c76d1aebce9f602c e189811766ad4e8d7b2721b232117a7be3940943 M libavr32
:040000 040000 add2c6c5adab9a0e2667d211305be95c0fa8ee31 34839d4f174f735c97142791fff4d8e401eb0524 M module
:040000 040000 e2e134bb6a329a3dbef2fe552e7dac15da82e117 41c9a97c07c8514920abfadad0a895d63e2ecb43 M simulator
:040000 040000 cac5d6827f5d8f7ae3df47610c66750afbbf9a14 d6acf1f429d9db75564ff7b441faac6590b74afc M src
As suspected, I think the issue is within libavr32. I’m going to try and bisect in there…
10.04am
Getting kinda of weird…
1f20226ed81ecb40e5bbaa46b2ba5b8109f3c557 is the first bad commit
commit 1f20226ed81ecb40e5bbaa46b2ba5b8109f3c557
Author: brian crabtree <tehn@monome.org>
Date: Fri Dec 2 10:00:55 2016 -0500
disable uhi_midi debug prints
:040000 040000 06d4f5bf4646b1252e4ba6c0ed93ac94a44a9726 a87d7b1b214bc0ad91b47cd0b6b74ad46eaaefb9 M src
10.07am
So… if I make the following change in libavr32, the master branch reads and writes USB sticks properly:
diff --git a/src/usb/midi/uhi_midi.c b/src/usb/midi/uhi_midi.c
index 25278b6..8a7f552 100644
--- a/src/usb/midi/uhi_midi.c
+++ b/src/usb/midi/uhi_midi.c
@@ -21,7 +21,7 @@
#include "usb_protocol_midi.h"
#include "uhi_midi.h"
-#define UHI_MIDI_PRINT_DBG 0
+#define UHI_MIDI_PRINT_DBG 1
#define UHI_MIDI_TIMEOUT 20000
// looks like we need to get class-specific endpoint descriptors,
Looking through the code, there is no reason why it should make any such difference. My suspicion, is that all the extra debug printing is in effect an increase to the delayed start up. Time for a break, then I’ll test my theory.
10.33am
Aaarrrgggghhhhh. Delays seem to make no difference, even adding a 5s predelay. Nothing. But when I re-enable UHI_MIDI_PRINT_DBG. Everything works.
Paging @ngwese, any ideas?
I’m going to fiddle with uhi_midi.c and see if I can figure out what’s going on in there…
10.52am
My descent into insanity continues… removing all the midi code from the Teletype does not fix the problem.
12:37pm
I think I’ve got to the bottom of it. Basically the logic in tele_usb_disk is a bit wonky. Enabling the midi debugging code, fiddles with the timing somehow and makes it work. I’m trying to tweak it to get it working. But my Teletype is on the floor next to my desk and bending over constantly to change USB cables is getting tiring… time for a lunch break.
12:58pm
Last entry. Fed up of bodging code. I’m going to park this for a few days and then do it properly. I’ll start posting some 2.0 beta hexes in the next few days and I’ll make sure that I use the UHI_MIDI_PRINT_DBG hack to get flash drives working.