scherbakov.al Have you tried Platformio? It seems to me that it is possible to generate a starter project in a cube,
Thanks for your suggestions.
I have not tried Platformio and I do not intend to do so. If I had to use something non-standard, it would be my favorite "plain-vanilla" gcc toolchain. Sadly that (like Platformio) still needs to rely on CubeIDE for hardware setup and code generation, and that is the problem (as I hinted in an earlier message in this conversation).
In fact, the major problems in CubeIDE happen at the beginning of the project or when one wants to change something for code generation (that was what caused the aforementioned crash: changing the label for a damn LED). For example, at the moment I am banging my head on the keyboard to find how to correctly port your (I assume is yours) very nice https://github.com/ScherbakovAl/midi_for_stm32h7 to my nucleo board, which has the same MCU but with a different package (number of pins and hence functionalities that in your 100-pin packages are hidden/unavailable).
First, I spent an hour just trying to open your project in CubeIDE, because CubeIDE would attempt opening and then everything would disappear without any error message or any other clue. Only with determination and sleuthing I figured out that you renamed the directory from h7_usb_test to midi_for_stm32h7 and that was the problem. Changing back to the original name the project loaded normally. Changing the name of that directory to anything else, continued with the same issue. And the guys at ST are even proud of this product!!! Hell, at least spit a damn error message, about what you don't like, you stupid software IDE programmers 😬😡🤬☠️😤🤬 I hope I don't meet any of them in person when I have a heavy 🔨 or blunt object in my hands….
I guess I'll go for a walk to recompose myself….
[temporarily recomposing myself to conclude more decently this message]
The byte which you have in txbuf[] in the file USB_DEVICE/App/usb_device.c with a double question mark in the comments is made of the two nibbles "Cable Number" (aka CN) and "Code Index Number" (aka CIN) which are part of the USB-MIDI event packages specifications (basically, MIDI packages sent via USB need to have that prefix). Search for the "Universal Serial Bus Device Class Definition for MIDI Devices" document (or ask here) if you care about the details.