1
0
forked from pool/micropython

57 Commits

Author SHA256 Message Date
Dominik Heidler
a2de50f788 Build with mbedtls-3.6.5 instead of bundled 3.6.2 to fix CVE-2025-59438 2025-10-22 14:33:37 +02:00
0fe9d7b526 Accepting request 1299777 from devel:languages:python
- Version 1.26.0
  * Added machine.I2CTarget for creating I2C target devices on multiple ports.
  * New MCU support: STM32N6xx (800 MHz, ML accel) & ESP32-C2 (WiFi + BLE).
  * Major float accuracy boost (~28% → ~98%), constant folding in compiler.
  * Optimized native/Viper emitters; reduced heap use for slices.
  * Time functions standardized (1970–2099); new boards across ESP32, SAMD, STM32, Zephyr.
  * ESP32: ESP-IDF 5.4.2, flash auto-detect, PCNT class, LAN8670 PHY.
  * RP2: compressed errors, better lightsleep, hard IRQ timers.
  * Zephyr v4.0.0: PWM, SoftI2C/SPI, BLE runtime services, boot.py/main.py support.
  * mpremote adds fs tree, improved df, portable config paths.
  * Updated lwIP, LittleFS, libhydrogen, stm32lib; expanded hardware/CI tests.
- Removed micropython-gcc15-string-initialization.patch as included upstream

OBS-URL: https://build.opensuse.org/request/show/1299777
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=22
2025-08-15 19:52:37 +00:00
2b994e87b2 - Removed micropython-gcc15-string-initialization.patch as included upstream
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=54
2025-08-15 09:15:21 +00:00
4c23be5abb - Version 1.26.0
* Added machine.I2CTarget for creating I2C target devices on multiple ports.
  * New MCU support: STM32N6xx (800 MHz, ML accel) & ESP32-C2 (WiFi + BLE).
  * Major float accuracy boost (~28% → ~98%), constant folding in compiler.
  * Optimized native/Viper emitters; reduced heap use for slices.
  * Time functions standardized (1970–2099); new boards across ESP32, SAMD, STM32, Zephyr.
  * ESP32: ESP-IDF 5.4.2, flash auto-detect, PCNT class, LAN8670 PHY.
  * RP2: compressed errors, better lightsleep, hard IRQ timers.
  * Zephyr v4.0.0: PWM, SoftI2C/SPI, BLE runtime services, boot.py/main.py support.
  * mpremote adds fs tree, improved df, portable config paths.
  * Updated lwIP, LittleFS, libhydrogen, stm32lib; expanded hardware/CI tests.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=53
2025-08-15 08:25:38 +00:00
209a792453 Accepting request 1291954 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1291954
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=21
2025-07-11 19:30:41 +00:00
fd9b66dca5 Accepting request 1282363 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1282363
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=20
2025-06-03 17:10:48 +00:00
448bf44040 Delete even more libs
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=47
2025-05-27 13:16:18 +00:00
a6a24b635e Tinyusb is not needed on linux
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=46
2025-05-26 13:11:17 +00:00
7006890406 Don't include all ports
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=45
2025-05-26 12:56:32 +00:00
01b131cf61 Drop more unneeded libs
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=44
2025-05-26 12:34:40 +00:00
43f67de9dc Mention prepare.sh in spec file
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=43
2025-05-26 12:22:43 +00:00
57c1014676 - Add script to delete some 3rd party libraries from the src tar
that are not needed to build the unix port in order to
  make the legal review easier

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=42
2025-05-26 11:55:32 +00:00
29940afbcc Accepting request 1270586 from devel:languages:python
- Update to 1.25.0
  * Add ROMFS support (see also "mpremote romfs" cmd with "query", "build", and "deploy" sub-commands)
    ROMFS defines a read-only, memory-mappable, extensible filesystem that can contain arbitrary resources,
	including precompiled mpy files, and allows executing bytecode directly from the filesystem.
	This makes importing significantly faster and use a lot less memory.
  * Inline assembler now supports 32-bit RISC-V assembly code via the newly implemented @micropython.asm_rv32 decorator.
  * Datagram TLS (DTLS) is now supported by the tls module and enabled on the alif, mimxrt, renesas-ra, rp2, stm32 and unix ports.
  * mpremote command-line tool now supports recursive remove via the new "rm -r"
  * mpremote now supports relative URLs in the package.json for installing from the local filesystem
  * "mpremote mount" has optimised readline support
  * full support for tuples and start/end arguments in str.startswith() and str.endswith() methods
  * vfs.mount() with no arguments now returns a list of mounted filesystems
  * marshal module has been added with dumps() and loads() functions
  * MicroPython native linker mpy_ld.py now includes support for linking in static libraries automatically
  * native modules now support 32-bit RISC-V code
  * force _FILE_OFFSET_BITS=64 to fix 32-bit file ABI
  * enable VfsRom on standard and coverage variants
  * use the bare metal mbedTLS config in the coverage buiid
  * add recursive mutex support
  * main: add coverage test for mounting ROMFS filesystem at startup
- Drop fix_re_sub_test_on_python3.13.patch as not needed anymore

OBS-URL: https://build.opensuse.org/request/show/1270586
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=19
2025-04-18 14:20:54 +00:00
606db37ba4 - Update to 1.25.0
* Add ROMFS support (see also "mpremote romfs" cmd with "query", "build", and "deploy" sub-commands)
    ROMFS defines a read-only, memory-mappable, extensible filesystem that can contain arbitrary resources,
	including precompiled mpy files, and allows executing bytecode directly from the filesystem.
	This makes importing significantly faster and use a lot less memory.
  * Inline assembler now supports 32-bit RISC-V assembly code via the newly implemented @micropython.asm_rv32 decorator.
  * Datagram TLS (DTLS) is now supported by the tls module and enabled on the alif, mimxrt, renesas-ra, rp2, stm32 and unix ports.
  * mpremote command-line tool now supports recursive remove via the new "rm -r"
  * mpremote now supports relative URLs in the package.json for installing from the local filesystem
  * "mpremote mount" has optimised readline support
  * full support for tuples and start/end arguments in str.startswith() and str.endswith() methods
  * vfs.mount() with no arguments now returns a list of mounted filesystems
  * marshal module has been added with dumps() and loads() functions
  * MicroPython native linker mpy_ld.py now includes support for linking in static libraries automatically
  * native modules now support 32-bit RISC-V code
  * force _FILE_OFFSET_BITS=64 to fix 32-bit file ABI
  * enable VfsRom on standard and coverage variants
  * use the bare metal mbedTLS config in the coverage buiid
  * add recursive mutex support
  * main: add coverage test for mounting ROMFS filesystem at startup
- Drop fix_re_sub_test_on_python3.13.patch as not needed anymore

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=40
2025-04-16 12:11:06 +00:00
13e2981da0 Accepting request 1255628 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1255628
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=18
2025-03-25 21:10:23 +00:00
3d22849170 - Add fix_re_sub_test_on_python3.13.patch to fix re_sub test
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=38
2025-03-17 12:53:37 +00:00
bbd5d1eade Accepting request 1246653 from devel:languages:python
- Add subpackage mpy-tools which contains mpy-cross and mpy-tool

OBS-URL: https://build.opensuse.org/request/show/1246653
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=17
2025-02-18 18:12:50 +00:00
b4bce45ea3 - Add subpackage mpy-tools which contains mpy-cross and mpy-tool
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=36
2025-02-18 11:49:19 +00:00
8754eecf54 Accepting request 1244833 from devel:languages:python
Build mpremote

OBS-URL: https://build.opensuse.org/request/show/1244833
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=16
2025-02-11 20:22:45 +00:00
f10a34b8ef Fix 15.6 fixes
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=34
2025-02-10 17:38:34 +00:00
00a51ba600 - Fix build for 15.6
Depends on https://build.opensuse.org/requests/1244131

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=33
2025-02-07 19:04:09 +00:00
8cc5256482 Accepting request 1243566 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1243566
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=15
2025-02-06 21:08:30 +00:00
f9074af794 - Build mpremote tool
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=31
2025-02-06 07:58:50 +00:00
2cf77b6507 Accepting request 1227683 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1227683
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=14
2024-12-02 15:59:19 +00:00
f0aa806580 - Update to 1.24.1:
* https://github.com/micropython/micropython/releases/tag/v1.24.1
- Update to 1.24.0:
  * https://github.com/micropython/micropython/releases/tag/v1.24.0

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=29
2024-12-02 08:46:28 +00:00
373d4a4356 Accepting request 1201783 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1201783
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=13
2024-09-19 19:16:54 +00:00
6138c1d4bd - Update to 1.23.0:
* https://github.com/micropython/micropython/releases/tag/v1.23.0

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=27
2024-09-18 12:08:46 +00:00
42579cb89d Accepting request 1175489 from devel:languages:python
- Update to 1.22.2:
  This is a patch release containing the following commits:
  - py/compile: fix potential Py-stack overflow in try-finally
    with return
  - extmod/asyncio: support gather of tasks that finish early
  - extmod/modssl_mbedtls: fix cipher iteration in
    SSLContext.get_ciphers
  - extmod/btstack: reset pending_value_handle before calling
    write-done cb
  - extmod/btstack: reset pending_value_handle before calling
    read-done cb
  - esp32/mpnimbleport: release the GIL while doing NimBLE port
    deinit
  - esp32: increase NimBLE task stack size and overflow detection
    headroom
  - mimxrt/modmachine: fix deepsleep wakeup pin ifdef
  - renesas-ra/ra: fix SysTick clock source
  - renesas-ra/boards/ARDUINO_PORTENTA_C33: fix the RTC clock
    source
  - renesas-ra/ra/ra_i2c: fix 1 byte and 2 bytes read issue
  - rp2/rp2_dma: fix fetching 'write' buffers for writing not
    reading
  - rp2/machine_uart: fix event wait in uart.flush() and
    uart.read()
  - rp2: change machine.I2S and rp2.DMA to use shared DMA IRQ
    handlers
- Update to 1.22.1:
  - This is a patch release to fix a race condition and potential
    deadlock in the rp2 port's mp_thread_begin_atomic_section()
    function, when the second core is in use.

OBS-URL: https://build.opensuse.org/request/show/1175489
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=12
2024-05-21 16:36:57 +00:00
17d07bad9c - Update to 1.22.2:
This is a patch release containing the following commits:
  - py/compile: fix potential Py-stack overflow in try-finally
    with return
  - extmod/asyncio: support gather of tasks that finish early
  - extmod/modssl_mbedtls: fix cipher iteration in
    SSLContext.get_ciphers
  - extmod/btstack: reset pending_value_handle before calling
    write-done cb
  - extmod/btstack: reset pending_value_handle before calling
    read-done cb
  - esp32/mpnimbleport: release the GIL while doing NimBLE port
    deinit
  - esp32: increase NimBLE task stack size and overflow detection
    headroom
  - mimxrt/modmachine: fix deepsleep wakeup pin ifdef
  - renesas-ra/ra: fix SysTick clock source
  - renesas-ra/boards/ARDUINO_PORTENTA_C33: fix the RTC clock
    source
  - renesas-ra/ra/ra_i2c: fix 1 byte and 2 bytes read issue
  - rp2/rp2_dma: fix fetching 'write' buffers for writing not
    reading
  - rp2/machine_uart: fix event wait in uart.flush() and
    uart.read()
  - rp2: change machine.I2S and rp2.DMA to use shared DMA IRQ
    handlers
- Update to 1.22.1:
  - This is a patch release to fix a race condition and potential
    deadlock in the rp2 port's mp_thread_begin_atomic_section()
    function, when the second core is in use.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=25
2024-05-21 09:18:44 +00:00
07b66db083 Accepting request 1138977 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1138977
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=11
2024-01-15 21:21:30 +00:00
609b7c67e3 Accepting request 1138975 from home:Andreas_Schwab:Factory
- Build with %optflags

OBS-URL: https://build.opensuse.org/request/show/1138975
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=23
2024-01-15 14:58:26 +00:00
b39afe91cc Accepting request 1137463 from devel:languages:python
- Update to 1.22.0:
  * https://github.com/micropython/micropython/releases/tag/v1.22.0
  * objslice: validate that the argument to indices() is an integer
    (CVE-2023-7158, bsc#1218446)

OBS-URL: https://build.opensuse.org/request/show/1137463
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=10
2024-01-08 22:45:07 +00:00
c062ceb1da - Update to 1.22.0:
* https://github.com/micropython/micropython/releases/tag/v1.22.0
  * objslice: validate that the argument to indices() is an integer
    (CVE-2023-7158, bsc#1218446)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=21
2024-01-08 02:11:09 +00:00
921feef42c Accepting request 1084191 from devel:languages:python
- Update to 1.20.0:
  * https://github.com/micropython/micropython/releases/tag/v1.20.0
- Remove 32572439984e5640c6af46fbe7c27400c30112ce.patch, included.
- Disable warning, since it is treated as an error.

OBS-URL: https://build.opensuse.org/request/show/1084191
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=9
2023-05-03 10:57:35 +00:00
b9af718955 - Update to 1.20.0:
* https://github.com/micropython/micropython/releases/tag/v1.20.0
- Remove 32572439984e5640c6af46fbe7c27400c30112ce.patch, included.
- Disable warning, since it is treated as an error.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=19
2023-04-28 07:11:48 +00:00
f3e6edefb7 Accepting request 1075027 from devel:languages:python
- add 32572439984e5640c6af46fbe7c27400c30112ce.patch

OBS-URL: https://build.opensuse.org/request/show/1075027
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=8
2023-03-29 21:27:01 +00:00
4e6d46e52c - add 32572439984e5640c6af46fbe7c27400c30112ce.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=17
2023-03-28 14:42:30 +00:00
0be2460e5d Accepting request 1010201 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1010201
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=7
2022-10-12 16:26:47 +00:00
ecab8eb8fb Accepting request 1010119 from home:Andreas_Schwab:Factory
- Suppress stripping of binary
- Run tests everywhere with just the problematic ones suppressed

OBS-URL: https://build.opensuse.org/request/show/1010119
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=15
2022-10-12 10:49:10 +00:00
9612813ea6 Accepting request 986372 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/986372
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=6
2022-07-03 16:26:53 +00:00
b01e621425 Accepting request 986329 from home:cgiboudeaux:branches:devel:languages:python
Update to 1.19.1

OBS-URL: https://build.opensuse.org/request/show/986329
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=13
2022-07-02 16:28:48 +00:00
2d60f593bc Accepting request 950824 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/950824
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=5
2022-02-03 22:16:41 +00:00
d4f129a7f4 Accepting request 950817 from home:jaimeMF:branches:devel:languages:python
- Update to 1.18: full changelog available at
  https://github.com/micropython/micropython/releases/tag/v1.18

OBS-URL: https://build.opensuse.org/request/show/950817
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=12
2022-02-02 21:59:32 +00:00
892a4ceb9a Accepting request 946789 from devel:languages:python
- avoid spec-cleaner messing it up

OBS-URL: https://build.opensuse.org/request/show/946789
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=4
2022-01-16 22:18:27 +00:00
f186c14121 - avoid spec-cleaner messing it up
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=11
2022-01-16 13:34:19 +00:00
adeda2e951 Accepting request 921407 from devel:languages:python
- Update to 1.17:
  The release notes are REALLY long, so please go to
  https://github.com/micropython/micropython/releases/tag/v1.17
  to read them.
- Remove already upstreamed patch fix-uasyncio_heaplock-test.patch.

OBS-URL: https://build.opensuse.org/request/show/921407
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=3
2021-09-25 20:51:28 +00:00
905341351f Actually remove the patch.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=10
2021-09-25 01:13:55 +00:00
644036aaae - Update to 1.17:
The release notes are REALLY long, so please go to
  https://github.com/micropython/micropython/releases/tag/v1.17
  to read them.
- Remove already upstreamed patch fix-uasyncio_heaplock-test.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=9
2021-09-24 23:50:44 +00:00
39064171b3 Accepting request 909831 from devel:languages:python
- Add fix-uasyncio_heaplock-test.patchto fix uasyncio_heaplock
  test (originally from gh#micropython/micropython#7449)

OBS-URL: https://build.opensuse.org/request/show/909831
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=2
2021-08-03 20:48:38 +00:00
c80e996e56 Add patch metadata
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=8
2021-08-02 17:46:05 +00:00
e911e09ac5 Accepting request 909824 from home:dspinella:branches:devel:languages:python
- Add patch to fix uasyncio_heaplock test
  * fix-uasyncio_heaplock-test.patch

OBS-URL: https://build.opensuse.org/request/show/909824
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=7
2021-08-02 17:38:20 +00:00
bb478b5899 Accepting request 908624 from devel:languages:python
Seems like an useful and still developing platform for embedded platforms.

OBS-URL: https://build.opensuse.org/request/show/908624
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=1
2021-07-28 17:19:46 +00:00
b26f0f0840 - Remove unnecessary dependency on python2
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=5
2021-07-27 14:51:47 +00:00
3e4e80416e Accepting request 907990 from home:Guillaume_G:branches:devel:languages:python
- Update to v1.16:
  * Full release notes: https://github.com/micropython/micropython/releases/tag/v1.16
  * New command-line tool called "mpremote"
  * Unix port updates:
    - modffi: use a union for passing/returning FFI values
    - main: increase stack limit on ARM architectures
    - modffi: fix conversion between Python integers and ffi types
    - fix build on arm64-darwin due to integer cast

OBS-URL: https://build.opensuse.org/request/show/907990
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=4
2021-07-23 16:41:32 +00:00
c0a6c17603 Accepting request 891290 from home:musfay:branches:devel:languages:python
- Update to version 1.15:
  * Full release notes: https://github.com/micropython/micropython/releases/tag/v1.15
  * Unix port updates:
    - mpbtstackport_common: implement mp_bluetooth_hci_active
    - moduselect: don't allow both posix and non-posix configurations
    - improve command line argument processing
    - main: make static variable that's potentially clobbered by longjm 
- Remove patch fix-aarch64-builds.patch
- Exclude ppc64 and ppc64le as build fails for those architectures

OBS-URL: https://build.opensuse.org/request/show/891290
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=3
2021-05-07 12:31:20 +00:00
714d193d7c Accepting request 886258 from home:musfay:branches:devel:languages:python
- Add patch fix-aarch64-builds.patch
- Update to v1.14:
  * Full release notes: https://github.com/micropython/micropython/releases/tag/v1.14
  * Unix port updates:
    - Makefile: always enable -f*-sections regardless of DEBUG setting
    - implement BLE H4 HCI UART for btstack/nimble
    - implement mp_hal_time_ns using gettimeofday
    - variants: enable MICROPY_DEBUG_PARSE_RULE_NAME on coverage build
    - mpconfigport.h: enable MICROPY_PY_DELATTR_SETATTR
    - enable more warnings
    - support building C++ code
    - Makefile: move coverage.c and coveragecpp.cpp to coverage variant
    - handle pending events/scheduler in MICROPY_EVENT_POLL_HOOK
    - make mp_hal_delay_ms run MICROPY_EVENT_POLL_HOOK
    - modtime: fix time() precision on unix ports with non-double floats

OBS-URL: https://build.opensuse.org/request/show/886258
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=2
2021-04-17 13:27:37 +00:00
f8ec2702f5 Accepting request 868539 from home:Guillaume_G:RPiPico
Add micropython package

OBS-URL: https://build.opensuse.org/request/show/868539
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=1
2021-02-02 22:43:49 +00:00
10 changed files with 34 additions and 294 deletions

View File

@@ -1,46 +0,0 @@
From e73cf71a246ee456aac0f4d16167e0856846db6b Mon Sep 17 00:00:00 2001
From: Alessandro Gatti <a.gatti@frob.it>
Date: Sat, 4 Jan 2025 15:00:28 +0100
Subject: [PATCH] tests/extmod/re_sub.py: Fix test execution on Python 3.13.
This commit fixes a test failure for `extmod/re_sub.py` where the code,
whilst being correct, would not make the test pass due to a newer
Python version than expected.
On Python 3.13, running `tests/extmod/re_sub.py` would yield a
deprecation warning about `re.sub` not providing the match count as a
keyword parameter. This warning would be embedded in the expected test
result and thus the test would always fail.
Co-authored-by: stijn <stijn@ignitron.net>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
---
tests/extmod/re_sub.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/extmod/re_sub.py b/tests/extmod/re_sub.py
index 2c7c6c10f1a49..ecaa66d83d8a7 100644
--- a/tests/extmod/re_sub.py
+++ b/tests/extmod/re_sub.py
@@ -10,6 +10,8 @@
print("SKIP")
raise SystemExit
+import sys
+
def multiply(m):
return str(int(m.group(0)) * 2)
@@ -47,7 +49,11 @@ def A():
print(re.sub("a", "b", "c"))
# with maximum substitution count specified
-print(re.sub("a", "b", "1a2a3a", 2))
+if sys.implementation.name != "micropython":
+ # On CPython 3.13 and later the substitution count must be a keyword argument.
+ print(re.sub("a", "b", "1a2a3a", count=2))
+else:
+ print(re.sub("a", "b", "1a2a3a", 2))
# invalid group
try:

BIN
mbedtls-3.6.5.tar.bz2 LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
micropython-1.26.0.tar.xz LFS Normal file

Binary file not shown.

View File

@@ -1,231 +0,0 @@
From 531d4839d44a90447c232d51d1bee0cae45add9a Mon Sep 17 00:00:00 2001
From: Angus Gratton <angus@redyak.com.au>
Date: Fri, 9 May 2025 13:34:37 +1000
Subject: [PATCH 1/3] extmod/moductypes: Refactor string literal as array
initializer.
Avoids the new Wunterminated-string-literal when compiled with gcc 15.1.
Also split out the duplicate string to a top-level array (probably the
duplicate string literal was interned, so unlikely to have any impact.)
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
---
extmod/moductypes.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index bf45797658fa0..54abce79e06fe 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -277,15 +277,18 @@ static mp_obj_t uctypes_struct_sizeof(size_t n_args, const mp_obj_t *args) {
}
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(uctypes_struct_sizeof_obj, 1, 2, uctypes_struct_sizeof);
+static const char type2char[16] = {
+ 'B', 'b', 'H', 'h', 'I', 'i', 'Q', 'q',
+ '-', '-', '-', '-', '-', '-', 'f', 'd'
+};
+
static inline mp_obj_t get_unaligned(uint val_type, byte *p, int big_endian) {
char struct_type = big_endian ? '>' : '<';
- static const char type2char[16] = "BbHhIiQq------fd";
return mp_binary_get_val(struct_type, type2char[val_type], p, &p);
}
static inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) {
char struct_type = big_endian ? '>' : '<';
- static const char type2char[16] = "BbHhIiQq------fd";
mp_binary_set_val(struct_type, type2char[val_type], val, p, &p);
}
From 0398873d8c8096d2054db130efd1fcecba2a426d Mon Sep 17 00:00:00 2001
From: Angus Gratton <angus@redyak.com.au>
Date: Fri, 9 May 2025 13:36:05 +1000
Subject: [PATCH 2/3] py/emitinlinethumb: Refactor string literal as array
initializer.
Avoids the new Wunterminated-string-literal when compiled with gcc 15.1.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
---
py/emitinlinethumb.c | 108 +++++++++++++++++++++----------------------
1 file changed, 54 insertions(+), 54 deletions(-)
diff --git a/py/emitinlinethumb.c b/py/emitinlinethumb.c
index 7818bb4f46da8..d6596337ae5a6 100644
--- a/py/emitinlinethumb.c
+++ b/py/emitinlinethumb.c
@@ -150,27 +150,27 @@ typedef struct _reg_name_t { byte reg;
byte name[3];
} reg_name_t;
static const reg_name_t reg_name_table[] = {
- {0, "r0\0"},
- {1, "r1\0"},
- {2, "r2\0"},
- {3, "r3\0"},
- {4, "r4\0"},
- {5, "r5\0"},
- {6, "r6\0"},
- {7, "r7\0"},
- {8, "r8\0"},
- {9, "r9\0"},
- {10, "r10"},
- {11, "r11"},
- {12, "r12"},
- {13, "r13"},
- {14, "r14"},
- {15, "r15"},
- {10, "sl\0"},
- {11, "fp\0"},
- {13, "sp\0"},
- {14, "lr\0"},
- {15, "pc\0"},
+ {0, {'r', '0' }},
+ {1, {'r', '1' }},
+ {2, {'r', '2' }},
+ {3, {'r', '3' }},
+ {4, {'r', '4' }},
+ {5, {'r', '5' }},
+ {6, {'r', '6' }},
+ {7, {'r', '7' }},
+ {8, {'r', '8' }},
+ {9, {'r', '9' }},
+ {10, {'r', '1', '0' }},
+ {11, {'r', '1', '1' }},
+ {12, {'r', '1', '2' }},
+ {13, {'r', '1', '3' }},
+ {14, {'r', '1', '4' }},
+ {15, {'r', '1', '5' }},
+ {10, {'s', 'l' }},
+ {11, {'f', 'p' }},
+ {13, {'s', 'p' }},
+ {14, {'l', 'r' }},
+ {15, {'p', 'c' }},
};
#define MAX_SPECIAL_REGISTER_NAME_LENGTH 7
@@ -368,20 +368,20 @@ typedef struct _cc_name_t { byte cc;
byte name[2];
} cc_name_t;
static const cc_name_t cc_name_table[] = {
- { ASM_THUMB_CC_EQ, "eq" },
- { ASM_THUMB_CC_NE, "ne" },
- { ASM_THUMB_CC_CS, "cs" },
- { ASM_THUMB_CC_CC, "cc" },
- { ASM_THUMB_CC_MI, "mi" },
- { ASM_THUMB_CC_PL, "pl" },
- { ASM_THUMB_CC_VS, "vs" },
- { ASM_THUMB_CC_VC, "vc" },
- { ASM_THUMB_CC_HI, "hi" },
- { ASM_THUMB_CC_LS, "ls" },
- { ASM_THUMB_CC_GE, "ge" },
- { ASM_THUMB_CC_LT, "lt" },
- { ASM_THUMB_CC_GT, "gt" },
- { ASM_THUMB_CC_LE, "le" },
+ { ASM_THUMB_CC_EQ, { 'e', 'q' }},
+ { ASM_THUMB_CC_NE, { 'n', 'e' }},
+ { ASM_THUMB_CC_CS, { 'c', 's' }},
+ { ASM_THUMB_CC_CC, { 'c', 'c' }},
+ { ASM_THUMB_CC_MI, { 'm', 'i' }},
+ { ASM_THUMB_CC_PL, { 'p', 'l' }},
+ { ASM_THUMB_CC_VS, { 'v', 's' }},
+ { ASM_THUMB_CC_VC, { 'v', 'c' }},
+ { ASM_THUMB_CC_HI, { 'h', 'i' }},
+ { ASM_THUMB_CC_LS, { 'l', 's' }},
+ { ASM_THUMB_CC_GE, { 'g', 'e' }},
+ { ASM_THUMB_CC_LT, { 'l', 't' }},
+ { ASM_THUMB_CC_GT, { 'g', 't' }},
+ { ASM_THUMB_CC_LE, { 'l', 'e' }},
};
typedef struct _format_4_op_t { byte op;
@@ -389,21 +389,21 @@ typedef struct _format_4_op_t { byte op;
} format_4_op_t;
#define X(x) (((x) >> 4) & 0xff) // only need 1 byte to distinguish these ops
static const format_4_op_t format_4_op_table[] = {
- { X(ASM_THUMB_FORMAT_4_EOR), "eor" },
- { X(ASM_THUMB_FORMAT_4_LSL), "lsl" },
- { X(ASM_THUMB_FORMAT_4_LSR), "lsr" },
- { X(ASM_THUMB_FORMAT_4_ASR), "asr" },
- { X(ASM_THUMB_FORMAT_4_ADC), "adc" },
- { X(ASM_THUMB_FORMAT_4_SBC), "sbc" },
- { X(ASM_THUMB_FORMAT_4_ROR), "ror" },
- { X(ASM_THUMB_FORMAT_4_TST), "tst" },
- { X(ASM_THUMB_FORMAT_4_NEG), "neg" },
- { X(ASM_THUMB_FORMAT_4_CMP), "cmp" },
- { X(ASM_THUMB_FORMAT_4_CMN), "cmn" },
- { X(ASM_THUMB_FORMAT_4_ORR), "orr" },
- { X(ASM_THUMB_FORMAT_4_MUL), "mul" },
- { X(ASM_THUMB_FORMAT_4_BIC), "bic" },
- { X(ASM_THUMB_FORMAT_4_MVN), "mvn" },
+ { X(ASM_THUMB_FORMAT_4_EOR), {'e', 'o', 'r' }},
+ { X(ASM_THUMB_FORMAT_4_LSL), {'l', 's', 'l' }},
+ { X(ASM_THUMB_FORMAT_4_LSR), {'l', 's', 'r' }},
+ { X(ASM_THUMB_FORMAT_4_ASR), {'a', 's', 'r' }},
+ { X(ASM_THUMB_FORMAT_4_ADC), {'a', 'd', 'c' }},
+ { X(ASM_THUMB_FORMAT_4_SBC), {'s', 'b', 'c' }},
+ { X(ASM_THUMB_FORMAT_4_ROR), {'r', 'o', 'r' }},
+ { X(ASM_THUMB_FORMAT_4_TST), {'t', 's', 't' }},
+ { X(ASM_THUMB_FORMAT_4_NEG), {'n', 'e', 'g' }},
+ { X(ASM_THUMB_FORMAT_4_CMP), {'c', 'm', 'p' }},
+ { X(ASM_THUMB_FORMAT_4_CMN), {'c', 'm', 'n' }},
+ { X(ASM_THUMB_FORMAT_4_ORR), {'o', 'r', 'r' }},
+ { X(ASM_THUMB_FORMAT_4_MUL), {'m', 'u', 'l' }},
+ { X(ASM_THUMB_FORMAT_4_BIC), {'b', 'i', 'c' }},
+ { X(ASM_THUMB_FORMAT_4_MVN), {'m', 'v', 'n' }},
};
#undef X
@@ -428,10 +428,10 @@ typedef struct _format_vfp_op_t {
char name[3];
} format_vfp_op_t;
static const format_vfp_op_t format_vfp_op_table[] = {
- { 0x30, "add" },
- { 0x34, "sub" },
- { 0x20, "mul" },
- { 0x80, "div" },
+ { 0x30, {'a', 'd', 'd' }},
+ { 0x34, {'s', 'u', 'b' }},
+ { 0x20, {'m', 'u', 'l' }},
+ { 0x80, {'d', 'i', 'v' }},
};
// shorthand alias for whether we allow ARMv7-M instructions
From bfd5a0350a0d53f52695d373dae6ee367971b145 Mon Sep 17 00:00:00 2001
From: Angus Gratton <angus@redyak.com.au>
Date: Fri, 9 May 2025 14:34:09 +1000
Subject: [PATCH 3/3] lib/littlefs: Fix string initializer in lfs1.c.
Avoids the new Wunterminated-string-literal when compiled with gcc 15.1.
It would be preferable to just disable this warning, but Clang
-Wunknown-warning-option kicks in even when disabling warnings so this
becomes fiddly to apply.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
---
lib/littlefs/lfs1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/littlefs/lfs1.c b/lib/littlefs/lfs1.c
index 6a3fd670012cc..ec18dc470258c 100644
--- a/lib/littlefs/lfs1.c
+++ b/lib/littlefs/lfs1.c
@@ -2141,7 +2141,7 @@ int lfs1_format(lfs1_t *lfs1, const struct lfs1_config *cfg) {
.d.elen = sizeof(superblock.d) - sizeof(superblock.d.magic) - 4,
.d.nlen = sizeof(superblock.d.magic),
.d.version = LFS1_DISK_VERSION,
- .d.magic = {"littlefs"},
+ .d.magic = {'l', 'i', 't', 't', 'l', 'e', 'f', 's'},
.d.block_size = lfs1->cfg->block_size,
.d.block_count = lfs1->cfg->block_count,
.d.root = {lfs1->root[0], lfs1->root[1]},

View File

@@ -1,3 +1,24 @@
-------------------------------------------------------------------
Wed Oct 22 12:19:48 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Build with mbedtls-3.6.5 instead of bundled 3.6.2 to fix CVE-2025-59438
-------------------------------------------------------------------
Fri Aug 15 08:13:39 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Version 1.26.0
* Added machine.I2CTarget for creating I2C target devices on multiple ports.
* New MCU support: STM32N6xx (800 MHz, ML accel) & ESP32-C2 (WiFi + BLE).
* Major float accuracy boost (~28% → ~98%), constant folding in compiler.
* Optimized native/Viper emitters; reduced heap use for slices.
* Time functions standardized (19702099); new boards across ESP32, SAMD, STM32, Zephyr.
* ESP32: ESP-IDF 5.4.2, flash auto-detect, PCNT class, LAN8670 PHY.
* RP2: compressed errors, better lightsleep, hard IRQ timers.
* Zephyr v4.0.0: PWM, SoftI2C/SPI, BLE runtime services, boot.py/main.py support.
* mpremote adds fs tree, improved df, portable config paths.
* Updated lwIP, LittleFS, libhydrogen, stm32lib; expanded hardware/CI tests.
- Removed micropython-gcc15-string-initialization.patch as included upstream
-------------------------------------------------------------------
Thu Jul 10 20:22:14 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package micropython
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,15 +20,14 @@
%{?sle15_python_module_pythons}
Name: micropython
Version: 1.25.0
Version: 1.26.0
Release: 0
Summary: Implementation of Python 3 with very low memory footprint
License: MIT
URL: https://micropython.org/
Source0: %{name}-%{version}.tar.xz
Source1: prepare.sh
# PATCH-FIX-UPSTREAM
Patch0: https://patch-diff.githubusercontent.com/raw/micropython/micropython/pull/17269.patch#/micropython-gcc15-string-initialization.patch
Source2: https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.5/mbedtls-3.6.5.tar.bz2#/mbedtls-3.6.5.tar.bz2
BuildRequires: openssl
BuildRequires: pkgconfig
BuildRequires: python3
@@ -67,12 +66,15 @@ MicroPython tools like the mpy-cross compiler for compiling.py files to .mpy fil
Also mpy-tool for inspecting .mpy files.
%prep
%autosetup -p1
%autosetup -p1 -a2
sed -i -e "s:/usr/lib/micropython:%{_prefix}/lib/micropython:g" "ports/unix/main.c"
%define make_flags V=1 MICROPY_PY_BTREE=0 MICROPY_PY_USSL=0
rm -rf lib/mbedtls
mv mbedtls-3.6.5 lib/mbedtls
%build
# micropython
export CFLAGS="%optflags -Wno-dangling-pointer"