summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-07-21lib/uzlib: Add a source_read_data var to pass to source_read_cb.Jim Mussared
For better abstraction for users of this API. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21lib/uzlib/defl_static: Optimize zlib_start/finish_block.Jim Mussared
Collapsing the two adjacent calls to outbits saves 32 bytes. Bringing defl_static.c into lz77.c allows better inlining, saves 24 bytes. Merge the Outbuf/uzlib_lz77_state_t structs, a minor simplification that doesn't change code size. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21lib/uzlib/tinflate: Implement more compact lookup tables.Jim Mussared
Saves 68 bytes on PYBV11. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21lib/uzlib: Combine zlib/gzip header parsing to allow auto-detect.Jim Mussared
This supports `wbits` values between +40 to +47. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21lib/uzlib: Clean up tinf -> uzlib rename.Jim Mussared
This library used a mix of "tinf" and "uzlib" to refer to itself. Remove all use of "tinf" in the public API. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21lib/uzlib/defl_static: Implement some code size improvements.Jim Mussared
This commit makes the following changes: - Replace 256-byte reverse-bits-in-byte lookup table with computation. - Replace length and distance code lookup tables with computation. - Remove comp_disabled check (it's unused). - Make the dest_write_cb take the data pointer directly, rather than the Outbuf. Saves 500 bytes on PYBV11. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21lib/uzlib/lz77: Always use separate history buffer.Jim Mussared
Because we only use the streaming source, this is just extra code size. Saves 64 bytes on PYBV11. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21lib/uzlib: Add memory-efficient, streaming LZ77 compression support.Damien George
The compression algorithm implemented in this commit uses much less memory compared to the standard way of implementing it using a hash table and large look-back window. In particular the algorithm here doesn't allocate hash table to store indices into the history of the previously seen text. Instead it simply does a brute-force-search of the history text to find a match for the compressor. This is slower (linear search vs hash table lookup) but with a small enough history (eg 512 bytes) it's not that slow. And a small history does not impact the compression too much. To give some more concrete numbers comparing memory use between the approaches: - Standard approach: inplace compression, all text to compress must be in RAM (or at least memory addressable), and then an additional 16k bytes RAM of hash table pointers, pointing into the text - The approach in this commit: streaming compression, only a limited amount of previous text must be in RAM (user selectable, defaults to 512 bytes). To compress, say, 1k of data, the standard approach requires all that data to be in RAM, plus an additional 16k of RAM for the hash table pointers. With this commit, you only need the 1k of data in RAM. Or if it's streaming from a file (or elsewhere), you could get away with only 256 bytes of RAM for the sliding history and still get very decent compression. In summary: because compression takes such a large amount of RAM (in the standard algorithm) and it's not really suitable for microcontrollers, the approach taken in this commit is to minimise RAM usage as much as possible, and still have acceptable performance (speed and compression ratio). Signed-off-by: Damien George <damien@micropython.org>
2023-06-21lib/oofatfs: Fix speculative read in create_name.Duncan Lowther
Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
2023-06-15lib/stm32lib: Update library for H5 v1.0.0.Damien George
Changes in this new library version are: - Add H5 HAL at v1.0.0. Signed-off-by: Damien George <damien@micropython.org>
2023-06-14lib/pico-sdk: Update to version 1.5.1.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-14lib/btstack: Update to v1.5.6.2.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-14lib/cyw43-driver: Update driver to latest version v1.0.1.Damien George
Includes a fix for combined BT+WiFi when using SPI transport. Signed-off-by: Damien George <damien@micropython.org>
2023-05-11lib/fsp: Update FSP for renesas-ra to the latest version v4.4.0.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2023-05-03lib/mbedtls: Update to mbedtls v2.28.3.Carlosgg
This is the latest release in the 2.28 long-time support branch. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
2023-05-01lib/mbedtls_errors: Update patch and error list for new mbedtls.Damien George
Running `./do-mp.sh` now generates this mp_mbedtls_errors.c with mbedTLS v2.28.1. Signed-off-by: Damien George <damien@micropython.org>
2023-05-01lib/mbedtls_errors: Add esp32-specific mbedtls error file.Carlosgg
This allows updating mp_mbedtls_errors.c for the other mbedtls based ports based on mbedTLS v2.28.1. This esp32-specific file will not be required after updating IDF support to >= v4.4.1. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
2023-04-30lib/mbedtls: Update to mbedtls v2.28.1.Carlosgg
Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
2023-04-30lib/mbedtls_errors: Update error list for current version of mbedtls.Damien George
This should have been updated as part of commit 7d73b9ff9975261bd2ff3544b09e9ec494775435, when mbedtls was changed to the LTS branch v2.16. Signed-off-by: Damien George <damien@micropython.org>
2023-04-26lib/micropython-lib: Update submodule to latest.Damien George
This brings in support to publish packages to PyPI, adds missing metadata and fixes aioble descriptor flags. Signed-off-by: Damien George <damien@micropython.org>
2023-04-26lib/cyw43-driver: Update driver to latest version v1.0.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-03-21lib/stm32lib: Update library to get H7 v1.11.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-03-08lib/micropython-lib: Update submodule to latest.Damien George
This brings in the following new modules: hs3003, bmi270, bmm150, cbor2 and senml. It also refactors lsm6dsox and lsm9ds1. Signed-off-by: Damien George <damien@micropython.org>
2023-03-08lib/cyw43-driver: Update driver to latest version v0.9.0.iabdalkader
2023-02-17lib/pico-sdk: Update to version 1.5.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-02-17lib/cyw43-driver: Update driver to latest version.Damien George
Changes since the previous version: - add an API to get the BSSID - support auto channel selection when using BSSID for join - improve performance for the Murata 1DX module and SDIO - return EINVAL for invalid auth type - add support for Bluetooth over SPI - convert 4343WA1-7.45.98.50.combined to C header files
2023-02-01lib/micropython-lib: Update submodule to latest.Damien George
This brings in the bundle-networking package. Signed-off-by: Damien George <damien@micropython.org>
2023-01-18lib/re1.5: Add support for named classes in class sets.Damien George
Total code size change of this and previous commit: bare-arm: +0 +0.000% minimal x86: +0 +0.000% unix x64: +32 +0.004% standard stm32: +24 +0.006% PYBV10 cc3200: +16 +0.009% esp8266: +20 +0.003% GENERIC esp32: +44 +0.003% GENERIC[incl +8(data)] mimxrt: +32 +0.009% TEENSY40 renesas-ra: +24 +0.004% RA6M2_EK nrf: +0 +0.000% pca10040 rp2: +24 +0.005% PICO samd: +32 +0.012% ADAFRUIT_ITSYBITSY_M4_EXPRESS Addresses issue #7920. Signed-off-by: Damien George <damien@micropython.org>
2023-01-18lib/re1.5: Reduce code size when checking for named class char.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-12-20lib/cyw43-driver: Update driver to latest version.Damien George
Changes since the previous version: - remove mDNS - implement lwIP IGMP MAC filter callback - implement IPv6 support - allow building with IGMP disabled - fix handshake meggase WAIT_G1 event value - increase EAPOL timeout from 2500ms to 500ms - add function to get RSSI - fix handling of open security networks - remove support for automatically setting auth type Signed-off-by: Damien George <damien@micropython.org>
2022-11-11lib/btstack: Update to v1.5.4.Damien George
This update includes a few bug fixes for BLE, support for LE audio, updates to classic BT support, cmake support, and other things. Signed-off-by: Damien George <damien@micropython.org>
2022-11-10lib/libm: Use __asm__ instead of asm.David Lechner
`asm` is not part of the C standard and causes a complier error when `-std=c99` is used. `__asm__` is the recommended alternative. https://gcc.gnu.org/onlinedocs/gcc/extensions-to-the-c-language-family/alternate-keywords.html Signed-off-by: David Lechner <david@pybricks.com>
2022-11-09lib/micropython-lib: Update submodule to latest.Damien George
This brings in mip-cmdline, espflash, use of machine.dht_readinto, and other improvements to existing libraries. Signed-off-by: Damien George <damien@micropython.org>
2022-10-22lib/btstack: Update to v1.5.3.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-09-30lib/micropython-lib: Update submodule to latest.Jim Mussared
This brings in the `mip` tool for installing packages. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-25lib/stm32lib: Update library to get L1 v1.10.3, and some other fixes.yn386
Changes in this new library version are: - Add L1 HAL at v1.10.3. - H7_HAL/rcc_ex: Add SPI45 to HAL_RCCEx_GetPeriphCLKFreq. - L4_HAL/gpio_ex: Add #define for GPIO_AF14_TIM2 on L4P5/L4Q5. - F4_HAL/i2c: Fix I2C frequency calculation macros. - L1_HAL/utils: Fix compile error when USE_HAL_DRIVER is defined.
2022-09-08lib/micropython-lib: Update submodule to latest.Jim Mussared
This brings in the drivers and libraries that were previously in this repo. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05lib/micropython-lib: Update to latest version with manifest changes.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-08-29lib/lwip: Update lwIP to v2.1.3, tag STABLE-2_1_3_RELEASE.Damien George
There don't seem to be many changes going from v2.1.2 to v2.1.3 of lwIP. Mostly they are: - IPv6 fixes and improvements - changes to apps and other code that MicroPython doesn't use - comments and tests - minor bug fixes In particular there doesn't look to be any change to the API of any function used by MicroPython. Network multi tests pass on PYBD_SF2 and PYBD_SF6. PYBD_SF2, PYBD_SF6 and PICO_W have unchanged iperf3 performance. Similar results for networking on the mimxrt port. Signed-off-by: Damien George <damien@micropython.org>
2022-08-03lib/micropython-lib: Add micropython-lib as a submodule.Jim Mussared
Several boards now depend on libraries from micropython-lib. Rather than expecting micropython-lib to be available as a sibling of the micropython repo, instead make it a submodule. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-07-26lib/cyw43-driver: Update driver to latest version.Peter Harper
This version of the driver adds an event hook to call during firmware download, and the ability to query the current power mode.
2022-07-19lib/tinyusb: Update to the most recent master.robert-hh
2022-07-05lib/cyw43-driver: Update cyw43-driver to fix ap_auth mode setting.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-30lib/pico-sdk: Update to version 1.4.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-30lib/cyw43-driver: Add new submodule for CYW43xx WiFi driver.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-03lib/wiznet5k: Add submodule for Wiznet Ethernet drivers.Andrew Leech
Signed-off-by: Andrew Leech <andrew@alelec.net>
2022-06-03lib/nxp_driver: Update nxp_driver to v2.10.robert-hh
2022-05-24lib/littlefs: Remove assignment of variables to themselves.Damien George
To prevent compiler warnings (eg on clang). Signed-off-by: Damien George <damien@micropython.org>
2022-05-24lib/littlefs: Guard lfs2_file_rawopen with LFS2_NO_MALLOC.Damien George
To prevent warnings about this function being unused when malloc is disabled. Signed-off-by: Damien George <damien@micropython.org>
2022-05-24lib/littlefs: Update littlefs2 to v2.5.0.Damien George
At commit 40dba4a556e0d81dfbe64301a6aa4e18ceca896c Signed-off-by: Damien George <damien@micropython.org>