Micropython stm32 USB dependencies

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
ajie_dirgantara
Posts: 81
Joined: Fri Sep 02, 2016 9:26 am

Micropython stm32 USB dependencies

Post by ajie_dirgantara » Mon Sep 18, 2017 6:55 am

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.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Micropython stm32 USB dependencies

Post by pythoncoder » Mon Sep 18, 2017 8:18 am

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.

ajie_dirgantara
Posts: 81
Joined: Fri Sep 02, 2016 9:26 am

Re: Micropython stm32 USB dependencies

Post by ajie_dirgantara » Mon Sep 18, 2017 9:31 am

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.?
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..

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..

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Micropython stm32 USB dependencies

Post by dhylands » Mon Sep 18, 2017 5:46 pm

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.

Post Reply