feat: ESP32-S3 & RP2040/RP2350 examples + TinyUSB >= 0.16 compat fixes#11
feat: ESP32-S3 & RP2040/RP2350 examples + TinyUSB >= 0.16 compat fixes#11sauloverissimo wants to merge 7 commits intomidi2-dev:mainfrom
Conversation
…alongside current tinyusb with "midi.h"
- Remove ROADMAP.md (internal planning) - Remove .mp4 videos (YouTube links in CHANGES.md instead) - Remove test.sh (internal tooling) - Clear author fields in library.json/properties (leave for maintainers)
|
@sauloverissimo I have merged the old PR with MIDI1 rename. I however am hesitant to merge the latest PR by (@fdetro) with the extra include. I will comment in that PR, but in my integration in a new project just now, the extra include was not needed nor does it exist in any of the included class drivers. For the updates to the function calls, I prefer to have the #defines to make adjustment based on tinyUSB version. I will look at adding this detail specifically in next couple days after I release my current project, after which would like to get you to merge in latest updates. Can you please confirm that you feel for sure you need PR#10 or is it just you do not have proper include paths? Again, I found it was not needed, but do not want to exclude it if it is really needed. Again, other drivers do not have this include. |
|
Hi @AmeNote-Michael, thanks for merging the MIDI1 rename and for reviewing. About PR #10 — yes, I do believe the The Including Your integration probably works without it because you're building inside the TinyUSB source tree or with a version where the config flags are already in scope. For external projects pulling tusb_ump as a library with different TinyUSB versions (which is my case with ESP-IDF and arduino-pico), the include is needed to compile correctly. In my PR #11 I included this same fix along with the version-guarded macros for |
- processRxUMP: check all words available before processing multi-word UMP packets, preventing truncated data reaching umpStreamHandleRx - library.json: add raspberrypi to platforms (RP2040/RP2350 support) - platformio.ini: remove hardcoded /c/pio/ build paths - ump_stream_handler.h: mark umpStreamLabel unused to suppress warnings - ump.h: fix Doxygen group from CDC copy-paste to MIDI/UMP
Hi @AmeNote-Michael & team,
Here's the PR I mentioned in #6. It brings ESP32-S3 and RP2040/RP2350 support to tusb_ump, with working examples and compatibility fixes for TinyUSB >= 0.16.
What's included:
TinyUSB >= 0.16 compatibility fixes -
usbd_edpt_xfer()now requires a 5th parameter (is_isr), andtu_fifo_config()dropped theitem_sizeargument in upstream TinyUSB. Version-guarded macros keep backward and forward compatibility without breaking anything. This also includes the#include "tusb.h"fix from PR #10 (@fdetro) and the MIDI_ to MIDI_1_ rename from PR #9 (@TrevorCash), both of which were needed to compile. Full credit to them. If you'd rather merge theirs first and have me rebase on top, I think that's valid and I respect whatever you decide.ESP32-S3 example (T-Display-S3) for both Arduino IDE and PlatformIO. USB MIDI 2.0 device with Alt Setting 0/1 negotiation, UMP Endpoint Discovery, real-time display showing alt setting and UMP packets. One interesting challenge was
--gc-sectionsin the linker silently discarding USB descriptor callbacks. Solved with__attribute__((used))on the callbacks andbuild_unflags = --gc-sectionsin PlatformIO.RP2040/RP2350 examples (T-PicoC3, Pico, Pico 2) for PlatformIO, using arduino-pico. The RP2040 runs upstream TinyUSB natively, no ESP-IDF fork quirks.
Arduino/PlatformIO metadata -
library.json,library.properties,keywords.txtfor Library Manager installation.What the examples demonstrate (compliance-wise):
Demo on real hardware:
Thanks to Mike Kent for the guidance on Network MIDI 2.0. I'm studying the spec and interested in working on that as a next step.
Saulo