Anyone have any luck getting MIDI 2.0 working on espressif32 MCU’s? There’s a number of libraries meant to help from midi2-dev, namely tsub_ump and AM MIDI 2.0 Lib, but these generate what I believe are linker errors. I’m relatively new to C programming and platformio in general, so I’m unsure how to resolve these:
c:/users/<user>/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld.exe: .pio\build\lolin_s2_mini\src\main.cpp.o:(.literal._Z11sendMidi2CChht+0x8): undefined reference to `tud_ump_n_mounted'
c:/users/<user>/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld.exe: .pio\build\lolin_s2_mini\src\main.cpp.o:(.literal._Z11sendMidi2CChht+0xc): undefined reference to `tud_ump_write'
c:/users/<user>/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld.exe: .pio\build\lolin_s2_mini\src\main.cpp.o: in function `sendMidi2CC(unsigned char, unsigned char, unsigned short)':
C:\Users\<user>\My Drive\MCUBasedProjects\MIDI2Ctrl/src/main.cpp:31: undefined reference to `tud_ump_n_mounted'
c:/users/<user>/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld.exe: C:\Users\<user>\My Drive\MCUBasedProjects\MIDI2Ctrl/src/main.cpp:32: undefined reference to `tud_ump_write'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\lolin_s2_mini\firmware.elf] Error 1
These functions are missing because they’re wrapped inside a compile-time if statement
So since the macro CFG_TUD_UMP (and later on CFG_TUD_UMP_RX_BUFSIZE and CFG_TUD_UMP_TX_BUFSIZE) are not defined, it won’t build those functions. So you need to at least add