Ok, disable USB entirely in micropython from STM32 is considered difficult task for now.
I've try many time to look for ENABLE/DISABLE USB preprocessors, but it seems micropython is heavily dependent on it (latest release version 1.9.2). Some codes even make the PCD module/USB mandatory to compile. I know USB VCP + USB MS is very good in term of usability and availability, so people could get down to code python in no time. But, for cost-effective and real-world implementation of micropython in real device, this could lead to problems.
There are some devices like stm32l451 which has great price to value ratio, bigger RAM than L476, but without USB. And currently the way I make it to works are using "hacked" L476 HAL drivers, which is inconvenient if there are some updates in the drivers code.
Just a suggestion for micropython developer, to make it available (USB enabling/disabling) for next release, to open up to more possibilities for more device out there in the wild.
Micropython stm32 USB dependencies
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Micropython stm32 USB dependencies
I'm no expert on the build system but MicroPython works fine on ESP8266 devices lacking USB such as the Adafruit Huzzah https://www.adafruit.com/product/2471. Perhaps something can be gleaned from its makefile etc.?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 81
- Joined: Fri Sep 02, 2016 9:26 am
Re: Micropython stm32 USB dependencies
I am not familiar with esp port, but as I've mentioned above, the stm32 port is heavily dependent on USB... it is not on micropython core though.. it is about the bsp/hal porting. So it might worth to mentioned to be able to included in future stm32 ports..pythoncoder wrote:I'm no expert on the build system but MicroPython works fine on ESP8266 devices lacking USB such as the Adafruit Huzzah https://www.adafruit.com/product/2471. Perhaps something can be gleaned from its makefile etc.?
currently, no.. I couldn't make it works just rely on mpconfig and makefile alone, without touching the stm32 ports .c codes... there are many USB dependencies implementation in the codes..
Re: Micropython stm32 USB dependencies
I think that its mostly the case that nobody has wanted a non-USB version of the stm32 port badly enough to make the required changes.