Repository navigation
mbed HAL #11
Description
Activity
I have actually been in contact with ARM, and I visited them to discuss this exact point. I think it would be great to support their HAL. Their HAL work is still in progress, but we can start to get it working. This would be classified as a port of Micro Python, the "mbed HAL port".
Actually, this was going to be one of my first tasks before the board arrives - putting the micropython source in an mbed project for testing. I have done a lot of work with Pawn - a C-like abstract machine - but I would love to use Python instead if possible.
Closing because this is not a real issue and no-one is working on an mbed port. Also, the uPy stmhal port is now quite rich with peripheral features and the mbed hal is no longer sophisticated enough for our purposes.
- added a commit that references this issue
on Oct 31, 2016 - added a commit that references this issue
on Jan 22, 2017 - added a commit that references this issue
on Sep 27, 2018 - added a commit that references this issue
on Jul 21, 2020 - added a commit that references this issue
on Feb 14, 2021 - added a commit that references this issue
on Jan 13, 2026
Some of the work from the mbed HAL (Hardware Abstraction Layer) could be leveraged by the Micro Python project.
https://github.com/mbedmicro/mbed/tree/master/libraries/mbed/targets/hal
https://github.com/mbedmicro/mbed/tree/master/libraries/mbed/hal
The mbed C API supports basic functionality for GPIO, UART, SPI, I2C, ADC, DAC, RTC, PWM, Ethernet and other I/O peripherals. Drivers have been implemented for ARM Cortex-M MCUs from NXP, Freescale and ST Micro. All code is freely available and open source (using an Apache 2.0 license). ARM Ltd has significantly increased the resources available to mbed as part of its Internet of Things strategy. Several external developers are also involved with new mbed ports and extensions. Using the mbed C APIs would leverage these efforts and simplify porting Micro Python to different ARM Cortex-M MCUs.
Would there be interest in work using the mbed C API as an I/O layer alternative? Micromint worked with the mbed port to the NXP LPC43xx MCUs. I could start work on a preliminary implementation when I'm back from the holidays (Jan-2). Some mbed developers may also get involved. At ARM Techcon they expressed interest in promoting the use of the mbed framework as a low level I/O foundation for Python, Basic and other interpreters.