Test Update - #14
Open
maxpromer wants to merge 6735 commits into
Open
Conversation
|
The current version (before the incoming merge) has a bug while trying to compile ports/unix. I have to edit the code of the AXTLS library: -------------------------- ssl/os_port_micropython.h -------------------------- #define TTY_FLUSH() -#include "../../../extmod/crypto-algorithms/sha256.h" #define SHA256_CTX CRYAL_SHA256_CTX |
This commit introduces support for the R_ARM_GOT_PREL relocation, found in the text segment of certain Arm native modules. Until now this was not needed, since the only supported compiler for linking native modules was GCC, which did not seem to ever generate such a relocation. With the recent work in making Clang a supported compiler as well, it was quickly found out that such a compiler actually does generate such a relocation type. This relocation seem to be enough to at least make `examples/natmod/features0` link with Clang targeting `armv7m`, and then run the output native module on an appropriate interpreter running under the QEMU MPS2-AN500 target. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit fixes building the `btree` module using Clang rather than using GCC, on x86, x64, and ArmV7 targets. The Clang standard library (libc) implementation of `memset` for x86 and x64 depends on functions that have a non-empty data section, which is not currently supported. Therefore we provide our own `memset` implementation that is good enough to let linking succeed for `x86` and `x64` targets. On a more general note, Clang also required some additional flags to disable an extra warning that GCC did not seem to raise. On Arm targets, `memset` is not a builtin of the compiler toolchain, so it has to be fetched from the runtime support library. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit fixes building the `deflate` module using Clang rather than using GCC, on x86, x64, and ArmV7 targets. The Clang standard library (libc) implementation of `memset` for x86 and x64 depends on functions that have a non-empty data section, which is not currently supported. Therefore we provide our own `memset` implementation that is good enough to let linking succeed for `x86` and `x64` targets. On Arm targets, `memset` is not a builtin of the compiler toolchain, so it has to be fetched from the runtime support library. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit fixes building the `features2` module using Clang rather than using GCC. Parts of the floating point support code for Clang may end up in libc.a rather than its builtins support library. This is the case for the armv7m target, so we have to force linking symbols from libc.a in that case. Depending on the toolchain, this may or may not build successfully, but the location of the `roundf` symbol should not move across toolchains. This makes it work on armv6m, rv32imc, and possibly on armv7m too. The latter depends on whether Clang's builtins support library not relying on features that are unsupported by `tools/mpy_ld.py`. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit fixes building the `framebuf` module using Clang rather than using GCC, on x86, x64, and ArmV7 targets. The Clang standard library (libc) implementation of `memset` for x86 and x64 depends on functions that have a non-empty data section, which is not currently supported. Therefore we provide our own `memset` implementation that is good enough to let linking succeed for `x86` and `x64` targets. On Arm targets, `memset` is not a builtin of the compiler toolchain, so it has to be fetched from the runtime support library. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit fixes building the `re` module using Clang rather than using GCC, on x86, x64, and ArmV7 targets. The Clang standard library (libc) implementation of `memset` for x86 and x64 depends on functions that have a non-empty data section, which is not currently supported. Therefore we provide our own `memset` implementation that is good enough to let linking succeed for `x86` and `x64` targets. On Arm targets, `memset` is not a builtin of the compiler toolchain, so it has to be fetched from the runtime support library. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit forces usage of an i686 cross-compiler for 32-bits x86 Unix
port builds, instead of relying on the "-m32" flag passed to the
currently installed GCC version.
Before this change it was not possible to build an x86 native module on
anything but an x86/x64 machine, since the scripts used the generic
"gcc" compiler installed on the system the code was built on. Recent
Ubuntu versions (at least five years old now) provide a 32-bits x86
cross-compiler on all supported machines ("gcc-i686-linux-gnu" and
"g++-i686-linux-gnu"), and since the CI uses Ubuntu as its base OS, that
compiler is now used for x86 builds.
Installing said cross-compiler, though, conflicts with the
"gcc-multilib" and "g++-multilib" packages that are installed on the CI
image as part of the 32-bits jobs setup procedure. This means that all
32-bits x86 builds have to be migrated to the new cross-compiler as
well.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit removes support for forced 32-bits builds of the Unix port, as it only worked on x64 machines and x86 usage is low enough these days to allow making changes on how the latter target is built. Passing such flag to the Unix makefile will stop the build, as the flag itself will be removed from MicroPython entirely (right now only the MinGW Windows builds use it) in subsequent commits. CI build scripts had to be updated to manually pass the necessary flags that were once implied by MICROPY_FORCE_32BIT, for all targets that are meant to build 32-bits binaries. Finally, documentation for the Unix port has been updated with a section explaining how to make x86 builds on x64 hosts work again. Given that the 32-bits builds now use a cross-compiler, then other machines for which such a compiler is available can build x86 binaries too (eg. AArch64 or RISC-V 64). Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit moves the definition of the "MICROPY_FORCE_32BIT" build flag away from the core's Makefile definition, migrating it to the Windows port's Makefile instead. Both Windows and Unix ports used this flag, which was intrinsically x64 specific. Since the Unix port is no longer using it and the Windows port is currently limited to x86/x64 builds it makes more sense to move that flag's support away from MicroPython's core. This assures that MinGW builds will still operate as usual without any changes. Support for this flag will probably be removed from the Windows port (and therefore from MicroPython) when Windows/Arm builds will show up. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit adds support for the ESP32-H2 processor from Espressif in the form of two board definitions - ESP32_GENERIC_H2 and M5STACK_NANOH2. Completed testing on the M5StackH2: - tested GPIO via on board LED - tested ADC channels can be read - I2C & SPI instantiation - BLE packet scanner - run_tests.py Signed-off-by: Rafal Wadowski <rafal@wadowski.com.au>
Added pins for I2S. Added ESP32-H2 check to reduce number of SPI peripherals. Signed-off-by: Rafal Wadowski <rafal@wadowski.com.au>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Raises LookupError for not implemented error handlers. Improves repr() rendering for unicode. Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Only accepts `utf-8`, `utf8` or `ascii` Fixes #15849 Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Fixes: issue 3364 Fixes: issue 13084 Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
Fixes Issue 17827 Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
Prevent the test from failing by not testing known unsupported characters. These will be documented in a cpydiff test. Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
These are now printed as characters rather than escaped bytes. Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Includes a new romfs reference page, and updates the mpremote and and vfs pages. Addresses issue #19124. Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
For STM32H5 add USART11 and UART12 with flow control. For STM32H7 add flow control for UART9 and USART10. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
Add USART11 and UART12. Note that UART11_Rx and LED2 share a pin. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
On H5 and N6 MCUs, `MPU_ATTRIBUTES_NUMBER0` is unconditionally set to non- cacheable (mode 0x44) in `mpu_init()`, and used for accessing the unique device signature. `MPU_ATTRIBUTES_NUMBER1` is also configured to the same 0x44 mode in `mpu_config_region()` and used for ETH, uncached DMA and backup SRAM access. This commit cleans that up by using `MPU_ATTRIBUTES_NUMBER0` in both cases, removing the need for `MPU_ATTRIBUTES_NUMBER1`. History: the use of `MPU_ATTRIBUTES_NUMBER1` was added for H5 in commit 51da8cc which could have at the time have reused `MPU_ATTRIBUTES_NUMBER0`. The code was later extended to support N6 in eb3ea9e, and backup SRAM in fb1375b. Fixes issue #19578. Signed-off-by: Damien George <damien@micropython.org>
The RNG works on the H723 since af2c479. It's needed because mbedTLS is enabled, which needs `mp_hal_get_random()` to provide a good source of randomness. Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
So that there's a build error if `mp_hal_get_random()` is used without being backed by a hardware RNG. Signed-off-by: Damien George <damien@micropython.org>
Due to parent commits it's no longer needed. Boards must enable `MICROPY_HW_ENABLE_RNG` to get features needing a random number. Signed-off-by: Damien George <damien@micropython.org>
Makes it a bit clearer what the function does. Signed-off-by: Damien George <damien@micropython.org>
When code relies on the RNG to generate proper random numbers, it's a critical system error if the RNG fails. In that case raise an OSError. Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
The runtime config was replaced with simpler static macro config in TinyUSB commit 222af862aa2b3898980e3ed8f28e70fe6c9a7ee9. Signed-off-by: Damien George <damien@micropython.org>
With a patch to fix the CDC TX persistence issue. Signed-off-by: Damien George <damien@micropython.org>
Commit 617c7db exposed a bug in the event driven REPL code: an empty input line (user pressing enter without entering anything else) would pass a zero-length string to `parse_compile_execute()` and this is not valid input to `mp_lexer_new_from_str_len()`, which requires at least one character in the input string. Fix that by restarting the input REPL state machine when nothing is entered. This follows how the non-event-driver REPL code works. Fixes issue #19583. Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Example that is using StateMachine to offload quadrature encoder polling. Signed-off-by: Damien George <damien@micropython.org>
Follow-up to b35383b which fixed one test setup race, but seemed to introduce failures - at least intermittently on some stm32 test configs. Guessing at a root cause: the 100ms sleep may not have been enough for the host to always coordinate instances, in which case instance1 might start sending onto the bus before instance0. Fix is to add an explicit synchronisation point so instance1 doesn't try to send until after instance0 has definitely started "babbling". This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit extracts the parts in common across linkerscripts targeting Cortex-M processors after being made memory section-neutral, and adapts other linkerscripts to use the shared parts. All Cortex-M linkerscripts ended up having the same sections duplicated in their respective files, but with minimum changes. With these changes a new Cortex-M target can reuse all of the shared directives, so bring-up time is reduced. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit extracts the parts in common across linkerscripts targeting RISC-V processors for QEMU's VIRT target after being made register size independent, and adapts other linkerscripts to use the shared parts. All RISC-V linkerscripts present in this port ended up having the same sections duplicated in their respective files, but with minimum changes. With these changes a new RISC-V target can reuse all of the shared directives, so bring-up time is reduced. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Name PD6 (header pin P10) FSYNC. The camera driver normally drives this pin as a trigger output, but the sensor can also be configured to output its exposure strobe on it, in which case scripts need to attach a pin interrupt to it to timestamp when the camera actually triggers. Signed-off-by: Kwabena W. Agyeman <kwagyeman@live.com>
Name P13_0 FSYNC. The camera driver normally drives this pin as a trigger output, but the sensor can also be configured to output its exposure strobe on it. The pin is not externally accessible on this board, so naming it is the only way scripts can attach a pin interrupt to it to timestamp when the camera actually triggers. Signed-off-by: Kwabena W. Agyeman <kwagyeman@live.com>
Commit 570744d introduced a regression when using `from foo import *`: if the module used `__getattr__` and raised an `AttributeError` when doing `__getattr__("__all__")` then that exception would be raised up to the caller of the import, rather than being ignored. This commit fixes that by protecting the lookup of "__all__". Tests are added which makes sure the behaviour matches CPython. Fixes issue #19265. Signed-off-by: Damien George <damien@micropython.org>
CPython specifies the return of `os.stat()` as a `os.stat_result` instance, but MicroPython allows a 10-tuple for simplicity. The latest version of micropython-lib's `os` extension module now returns a `namedtuple` for `os.stat()`. Update the vfs test to accommodate both a 10-tuple and a `namedtuple`. Signed-off-by: Damien George <damien@micropython.org>
This update to micropython-lib brings in the following changes. aioble/security: only schedule save when needed aiohttp: match response header names case-insensitively aiorepl: - fix Enter key handling in raw terminal mode - optimize sys.stdout.write calls collections-defaultdict: add items() function colorsys: add colorsys and test_colorsys from CPython copy: provide top-level documentation lora: fix CRC error IRQ bit mask for sx126x mip: add an alias for codeberg repos ntptime: use NTPv4 operator: add mul and some other operators os: provide namedtuple response for os.stat() pathlib: - fix glob/rglob to return Path objects rather than strings - add Path.expanduser() pprint: - add simple and partial implementation for depth of 1 - refactor implementation and add PrettyPrint class - implement depth recursion - add test_pprint.py - fix use of micropython.const - bump version to 0.1.0 requests: - add context manager for response object - switch to HTTP/1.1 with Content-Length and raw streaming - add support for relative redirect URLs - support unicode in json and data payloads - add support for query and anchor chars directly after domain - add tests for query and anchor in URL - add chunked response body support - test chunked response decoding - document chunked response support - match response header names case-insensitively - reuse lowerl for Content-Length matching ssd1306: add I2C protocol example for SSD1306 display uaiohttpclient: - use "utf8" encoding instead of "latin-1" - add basic test for uaiohttpclient.request umqtt.robust: - let reconnect() call the connect() method of parent class - document and add examples overriding the connect() method - ease document readability umqtt.simple: - add example for mqtt tls - close any old socket on connect - add call to main() at end of example scripts - encode subscribe Remaining Length as VBI - share subscribe/unsubscribe packet encoding - share Remaining Length VBI encoding - avoid None comparisons in _send_subunsub unittest: - remove f-strings - optimise by reusing AssertRaisesContext for assertWarns - optimise by removing support for CPython - optimise calling of _handle_test_exception - optimise by only formatting msg if needed - optimise skipUnless in terms of skipIf - optimise to only create a single nop lambda - bump minor version due to recent optimisations unix-ffi: - json: fix json.loads() of a bytes object - ffilib: extend libc versions range - signal: add alarm() and pause() functions - signal: add SIGALRM constant usb: - examples: put timeout=0 in CDCInterface constructor - usb-device-cdc: fix default timeout in CDCInterface.init() - usb-device-cdc: optimise CDCInterface constructor - usb-device-core: fix comment describing the signature of done_cb - usb-device-hid: enable configuring the bInterval on hid devices - usb-device-keyboard: add a simpler keyboard example, document releasing uuid: - provide UUID class and uuid4() implementation using os.urandom() - convert test to use unittest - use bytes.hex instead of binascii.hexlify - add UUID.bytes attribute - make UUID.__repr__ match CPython Signed-off-by: Damien George <damien@micropython.org>
Adds TinyUSB configuration and descriptor support for USB Network Control Model (NCM) interface. This provides the low-level USB infrastructure needed for USB networking. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Implements a USB NCM driver providing ethernet-over-USB backed by the lwIP stack. Reuses MicroPython's string hash over the MAC address to derive a deterministic link-local IP (169.254.x.1), a built-in DHCP server so the host is immediately reachable, and full lwIP netif integration including IPv6 support. Exposes a Python network.USBD_NCM class compatible with the AbstractNIC interface. Signed-off-by: Andrew Leech <andrew@alelec.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.