Open ithinu opened 1 month ago
My IDE and all my libraries are the same versions, with one exception-- I'm using v. 5.0.2 of the MIDI library, without any issues compiling. Do you have the #define RELEASE line commented out? If so, you may need to have a driver installed. I'm not sure what the -110 error means exactly, but it sounds like it can be related to drivers.
What compilation error do you get with 5.0.2 of the MIDI library? I remember issues with previous releases but this one seems to work for me.
I attach the compiler output at the end of this post (there is also a more completed list of library versions). It is about this fragment in serialMIDI.h:
// Initialise the Serial port
#if defined(AVR_CAKE)
mSerial. template open<Settings::BaudRate>();
#else
mSerial.begin(Settings::BaudRate);
#endif
}
Compiling sketch...
/home/.arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Werror=return-type -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_NRF52840_ITSYBITSY -DARDUINO_NRF52_ITSYBITSY -DARDUINO_ARCH_NRF52 "-DARDUINO_BSP_VERSION=\"1.6.1\"" -DNRF52840_XXAA -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x239A -DUSB_PID=0x8053 "-DUSB_MANUFACTURER=\"Mowry Stringed Instruments\"" "-DUSB_PRODUCT=\"WARBL\"" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -DCFG_LOGGER=0 -DCFG_SYSVIEW=0 -I/home/.arduino15/packages/adafruit/tools/CMSIS/5.7.0/CMSIS/Core/Include/ -I/home/.arduino15/packages/adafruit/tools/CMSIS/5.7.0/CMSIS/DSP/Include/ -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/nrfx -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/nrfx/hal -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/nrfx/mdk -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/nrfx/soc -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/nrfx/drivers/include -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/nrfx/drivers/src -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include/nrf52 -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/freertos/Source/include -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/freertos/config -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/freertos/portable/GCC/nrf52 -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/freertos/portable/CMSIS/nrf52 -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/sysview/SEGGER -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5/sysview/Config -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_TinyUSB_Arduino/src/arduino -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/cores/nRF5 -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/variants/itsybitsy_nrf52840_express -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Bluefruit52Lib/src -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_nRFCrypto/src -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_TinyUSB_Arduino/src -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/SPI -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Wire -I/home/Arduino/libraries/MIDI_Library/src -I/home/Arduino/libraries/Adafruit_LSM6DS -I/home/Arduino/libraries/Adafruit_BusIO -I/home/Arduino/libraries/Adafruit_Unified_Sensor -I/home/Arduino/libraries/SensorFusion/src -I/home/Arduino/libraries/ResponsiveAnalogRead/src -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_LittleFS/src -I/home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/InternalFileSytem/src /tmp/arduino/sketches/7941F34557B3DA7F31EF589CB4FC003B/sketch/warbl2_firmware.ino.cpp -o /tmp/arduino/sketches/7941F34557B3DA7F31EF589CB4FC003B/sketch/warbl2_firmware.ino.cpp.o
In file included from /home/Arduino/libraries/MIDI_Library/src/MIDI.h:35,
from /home/src/WARBL2-main/warbl2_firmware/warbl2_firmware.ino:46:
/home/Arduino/libraries/MIDI_Library/src/serialMIDI.h: In instantiation of 'void midi::SerialMIDI<SerialPort, _Settings>::begin() [with SerialPort = Adafruit_USBD_MIDI; _Settings = MySettings]':
/home/Arduino/libraries/MIDI_Library/src/MIDI.hpp:75:5: required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::begin(midi::Channel) [with Transport = midi::SerialMIDI<Adafruit_USBD_MIDI, MySettings>; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/src/WARBL2-main/warbl2_firmware/warbl2_firmware.ino:378:33: required from here
/home/Arduino/libraries/MIDI_Library/src/serialMIDI.h:62:13: error: 'BaudRate' is not a member of 'midi::SerialMIDI<Adafruit_USBD_MIDI, MySettings>::Settings' {aka 'MySettings'}
62 | mSerial.begin(Settings::BaudRate);
| ^~~~~~~
/home/Arduino/libraries/MIDI_Library/src/serialMIDI.h: In instantiation of 'void midi::SerialMIDI<SerialPort, _Settings>::begin() [with SerialPort = BLEMidi; _Settings = MySettings]':
/home/Arduino/libraries/MIDI_Library/src/MIDI.hpp:75:5: required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::begin(midi::Channel) [with Transport = midi::SerialMIDI<BLEMidi, MySettings>; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/src/WARBL2-main/warbl2_firmware/warbl2_firmware.ino:410:36: required from here
/home/Arduino/libraries/MIDI_Library/src/serialMIDI.h:62:13: error: 'BaudRate' is not a member of 'midi::SerialMIDI<BLEMidi, MySettings>::Settings' {aka 'MySettings'}
Using library Adafruit Bluefruit nRF52 Libraries at version 0.21.0 in folder: /home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Bluefruit52Lib
Using library Adafruit nRFCrypto at version 0.1.2 in folder: /home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_nRFCrypto
Using library Adafruit TinyUSB Library at version 3.1.3 in folder: /home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_TinyUSB_Arduino
Using library SPI at version 1.0 in folder: /home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/SPI
Using library Wire at version 1.0 in folder: /home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Wire
Using library MIDI Library at version 5.0.2 in folder: /home/Arduino/libraries/MIDI_Library
Using library Adafruit LSM6DS at version 4.7.3 in folder: /home/Arduino/libraries/Adafruit_LSM6DS
Using library Adafruit BusIO at version 1.16.1 in folder: /home/Arduino/libraries/Adafruit_BusIO
Using library Adafruit Unified Sensor at version 1.1.14 in folder: /home/Arduino/libraries/Adafruit_Unified_Sensor
Using library SensorFusion at version 1.0.6 in folder: /home/Arduino/libraries/SensorFusion
Using library ResponsiveAnalogRead at version 1.2.1 in folder: /home/Arduino/libraries/ResponsiveAnalogRead
Using library Adafruit Little File System Libraries at version 0.11.0 in folder: /home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_LittleFS
Using library Adafruit Internal File System on Bluefruit nRF52 at version 0.11.0 in folder: /home/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/InternalFileSytem
exit status 1
Compilation error: exit status 1
I narrowed down the problem. First of all, WARBL2_firmware_4.1.uf2 and the snapshot's flash.uf2 are identical. It's a bit strange because I commented out #define RELEASE and as I said, I use the MIDI library from the snapshot.
Anyways, I uploaded flash.uf2 manually using the copy to drive method from the manual. No more -110 errors, WARBL connects instantly. I repeated it several times and it was always the same: uploading via Arduino IDE results in the -110 error when connecting, copying exactly the same binary file to the drive doesn't.
The IDE doesn't create a UF2 file when you compile the binary, so you may still be looking at the UF2 file that I created?
It turned out that my board package was outdated. I was running 1.3.0. When I upgrade to 1.6.1 I see some strange behavior-- I'm not getting an error on Windows, but there seems to be a delay before the WARBL connects by USB. When I downgrade the board to 1.6.0 that behavior seems to go away. You might try that and see if the error disappears. I'll need to look at the changes Adafruit made and possibly ask them about this. I suspect it's something with TinyUSB.
Yes, in that case I did in fact use your release UF2.
As of the connection delay, I downgraded to 1.6.0 and it is gone in Linux as well. Thanks.
Okay, thanks. I'm not sure how to track down the issue with TinyUSB but for now I'll make a note in the ReadMe here to use the 1.6.0 package.
Arduino 2.3.2 Adafruit LSM6DS 4.7.3 DIO2 1.6.0 MIDI Library latest snapshot (5.0.2 causes compilation error) ResponsiveAnalogRead 1.2.1 SensorFusion 1.0.6 Adafruit BusIO 1.16.1 Sparkfun LSM6DS Breakout 1.0.1
After upload, everything seems to work fine but each time the device connects it takes a while and a -110 timeout is signaled:
After reinstalling the official firmware 4.1, the problem is gone, the device connects immediately: