2022-12-26 01:51 AM
I found a slightly old project, and I would like to compile it with STM32CubeIDE.
It is to add HUB function in USB Host:
https://github.com/mori-br/STM32F4HUB
Does anyone know how to adapt this project to compile in STM32CubeIDE?
Or how to compile the original project?
Solved! Go to Solution.
2022-12-26 04:48 AM
Hello @RhSilicon and welcome to the Community :)
I advise you to refer to the Migration guide for STM32CubeIDE
UM2579: Migration guide from System Workbench to STM32CubeIDE
Imen
2022-12-26 04:48 AM
Hello @RhSilicon and welcome to the Community :)
I advise you to refer to the Migration guide for STM32CubeIDE
UM2579: Migration guide from System Workbench to STM32CubeIDE
Imen
2022-12-26 11:24 AM
Hello @Imen DAHMEN ,
Thanks for the support, the project has been successfully converted and tested with STM32F407VGT6 on the Diymore board, together with a Mini Keyboard with Integrated Mouse.
Project available in this repository:
https://github.com/rtek1000/STM32F4HUB/tree/master/Project-STM32CubeIDE
Note: For some reason the X axis of the touchpad was not recognized (always show value 0), I will try to create a new project with STM32CubeIDE and insert this HUB function.
Thank you.
2022-12-26 12:21 PM
> https://github.com/mori-br/STM32F4HUB
We've tried to use this several years ago. It is a nice try IMHO, maybe useful to understand how a hub works, but incomplete and abandoned.
There are better alternatives.
By the way the Eclipse there is an old version of SW4STM32. Try to import it as SW4STM32.
2022-12-26 01:39 PM
Interesting, and how do I find these other alternatives? Are there references?
2022-12-28 07:22 PM
Hello @Imen DAHMEN ,
I compared the HUB code with a current code generated by STM32CubeIDE.
Both basic codes are similar, but I still haven't managed to adapt the HUB function in the new code.
The new code seems to operate with an interrupt function, and the HUB code appears to be simpler.
Would it be possible for your team to make a tutorial to add this HUB function, and make it available along with the other tutorials on this subject?
Thank you.
[STM32 USB training - 10 STM32 USB Host library]
https://m.youtube.com/watch?v=Bsnl8BAFSOk
2022-12-29 02:48 AM
Segger ...
Note that there's some errata for hub functionality. IIRC it is mentioned in Segger's USB lib documentation.
2022-12-29 04:07 AM
Hi,
Thanks for the feedback. That library looks very promising. However it should not be compatible with STM32CubeIDE.
TinyUSB is currently used by these other projects:
- Adafruit nRF52 Arduino
- Adafruit nRF52 Bootloader
- Adafruit SAMD Arduino
- CircuitPython
- Espressif IDF
- MicroPython
- mynewt
- openinput
- Raspberry Pi Pico SDK
- TinyUF2 Bootloader
- TinyUSB Arduino Library
https://docs.tinyusb.org/en/latest/info/uses.html
Of those supported Cores, it might be easier to implement with Arduino, however STM32 still appears to be unsupported.
Supported Cores:
[Cores with built-in support]:
- adafruit/Adafruit_nRF52_Arduino
- adafruit/ArduinoCore-samd
- earlephilhower/arduino-pico
- espressif/arduino-esp32
[Cores without built-in support]:
- mbed_rp2040
Perhaps the mynewt operating system might be the most interesting for me, as it seems to already support the STM32F4Discovery (STM32F407VG) that I currently use for the ongoing project.
Even so, I believe it will be very helpful if the ST team can add this old HUB library code to the STM32CubeIDE, as this IDE is already quite usable and quite stable.
2022-12-29 11:25 AM
> I believe it will be very helpful if the ST team can add this old HUB library code to the STM32CubeIDE
They've promised hub support long ago, but it is unlikely to happen since adopting ThreadX aka Azure RTOS.