RTEMS | Implementing MicroPython Support and Packaging It For RTEMS (#22)

Sameer Srivastava (@l1zard) gitlab at rtems.org
Mon Jul 14 12:59:35 UTC 2025




Sameer Srivastava commented: https://gitlab.rtems.org/groups/rtems/-/work_items/22#note_126444


Updates on modules:

I have been able to get all three modules listed in the last mid-term deliverable working. `time` and `random` are fully supported and I'm looking for feedback on their implementation. `machine` has many classes like `Pin`, `I2S`, `PWM`, etc. that I can't enable right now because we are using the pc686 BSP with QEMU. So currently the only implemented `machine` functions are `reset` and `soft_reset` (which make up its basic functionality outside of those protocols and GPIO).  

Reference for MicroPython libraries can be found [here](https://docs.micropython.org/en/latest/library/index.html#).  

Implemented features for each module:
1. `random`: all functions available after simply enabling the module
2. `time`: all functions implemented.
        - `sleep()`
        - `sleep_ms()`
        - `sleep_us()`
        - `time()`
        - all ["ticks"](https://docs.micropython.org/en/latest/library/time.html#time.ticks_ms) functions: `ticks_cpu()`, `ticks_ms()`, `ticks_us()`, `ticks_add()`, `ticks_diff()`, with RTEMS MICROSECONDS_PER_TICK set to 1000
3. `machine`:
        - `mem8`, `mem16`, `mem32`: allow direct memory access
        - `reset()`
        - `soft_reset()`
        - remaining: 
                - `reset_cause()`
                - `bootloader()`
                - [interrupt related](https://docs.micropython.org/en/latest/library/machine.html#interrupt-related-functions) and [power related](https://docs.micropython.org/en/latest/library/machine.html#power-related-functions) functions
                - classes for various peripherals like `machine.Pin` for GPIO, `machine.I2C`, `machine.I2S`, etc. Potential candidates for implementation on the current pc686 BSP are `Timer` and `WDT` (watchdog timer).

-- 
View it on GitLab: https://gitlab.rtems.org/groups/rtems/-/work_items/22#note_126444
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250714/0499498d/attachment-0001.htm>


More information about the bugs mailing list