- 29 Aug, 2024 4 commits
-
-
robert-hh authored
The renesas-ra port supports calling a handler to be called on every byte received by UART. For consistency with other ports, the symbol IRQ_RX is added as the trigger name. Side change: Add the received UART data to the REPL input buffer only if it is the REPL UART. Otherwise, every UART would act as REPL input. Signed-off-by: robert-hh <robert@hammelrath.com>
-
robert-hh authored
Supported triggers are: IRQ_RXIDLE and IRQ_TXIDLE. When IRQ_RXIDLE is set, the handler will be called 3 character times after the data in burst stopped. When IRQ_TXIDLE is set, the handler will be called immediately after the data has been sent. This commit requires a change to fsl_lpuart.c, because the existing code does not support under-run appropriately. The irq.flags() value is cleared only at an expected event. Do not change it otherwise. Signed-off-by: robert-hh <robert@hammelrath.com>
-
robert-hh authored
Supported for all SAMD51 devices and SAMD21 with external flash. For interrupt events, IRQ_RX and IRQ_TXIDLE are provided. IRQ_RX is called for every received byte. This may not be useful for high data rates, but can be used to build a wrapper class providing an IRQ_RXIDLE event or to signal just the first byte of a message. IRQ_TXIDLE is called only when messages are longer than 5 bytes and triggers when still 5 bytes are due to be sent. The SAMD hardware does not support implementing IRQ_RXIDLE. Signed-off-by: robert-hh <robert@hammelrath.com>
-
robert-hh authored
Supported trigger names: IRQ_RXIDLE, IRQ_TXIDLE, IRQ_BREAK - IRQ_RXIDLE: The handler for IRQ_RXIDLE is called reliably 31 UART bit times after the last incoming data. - IRQ_TXIDLE: This IRQ is triggered after at least >5 characters are sent at once. It is triggered when the TX FIFO falls below 4 elements. At that time, up to 5 bytes may still be in the FIFO and output shift register. - IRQ_BREAK: The IRQ triggers if a BREAK state is detected at RX. Properties & side effects: - After a BREAK, a valid character must be received before another break can be detected. - Each break puts a 0xff character into the input buffer. The irq.flags() value is cleared only with a new wanted event. Do not change the flags otherwise. Signed-off-by: robert-hh <robert@hammelrath.com>
-
- 28 Aug, 2024 14 commits
-
-
Damien George authored
Not just the domain name. This gives better HTTP 1.0 examples if someone wants to copy them. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
`ssl.wrap_socket()` is deprecated in CPython, so use `SSLContext` instead, so the example is a good example to copy. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The main changes here are to pass the address family and socket type to `getaddrinfo()`, and then use the result of the address lookup when creating the socket, so it has the correct address family. This allows both IPv4 and IPv6 to work, because the socket is created with the correct AF_INETx type for the address. Also add some more comments to the examples to explain what's going on. Fixes issue #15580. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Currently, the qemu-arm (and qemu-riscv) port has two build modes: - a simple test that executes a Python string; and - a full test that uses tinytest to embed all tests within the firmware, then executes that and captures the output. This is very different to all the other ports. A difficulty with using tinytest is that with the large number of tests the firmware overflows its virtual flash size. It's also hard to run tests via .mpy files and with the native emitter. Being different to the other ports also means an extra burden on maintenance. This commit reworks the qemu-arm port so that it has a single build target that creates a standard firmware which has a REPL. When run under qemu-system-arm, the REPL acts like any other bare-metal port, complete with soft reset (use machine.reset() to turn it off and exit qemu-system-arm). This approach gives many benefits: - allows playing with a REPL without hardware; - allows running the test suite as it would on a bare-metal board, by making qemu-system-arm redirect the UART serial of the virtual device to a /dev/pts/xx file, and then running run-tests.py against that serial device; - skipping tests is now done via the logic in `run-tests.py` and no longer needs multiple places to define which tests to skip (`tools/tinytest-codegen.py`, `ports/qemu-arm/tests_profile.txt` and also `tests/run-tests.py`); - allows testing/using mpremote with the qemu-arm port. Eventually the qemu-riscv port would have a similar change. Prior to this commit the test results were: 743 tests ok. (121 skipped) With this commit the test results are: 753 tests performed (22673 individual testcases) 753 tests passed 138 tests skipped More tests are skipped because more are included in the run. But overall more tests pass. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
So multiple boards can be built at once. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
With this change, the zephyr port is tested against the standard test suite via the following scheme: - the zephyr port is built with the `qemu_cortex_m3` board and the `prj_minimal.conf` configuration - `qemu-system-arm` runs `zephyr.elf` - the zephyr console is redirected to a pts/pty - `tests/run-tests.py` is run in bare-metal mode against the pts/pty device This allows testing the zephyr port as though it were a physical board attached over a serial port. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
It needs to be at least this big for `tools/pyboard.py` to work, which is used (among other things) by `tests/run-tests.py`. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Commit f573e73b rewored the zephyr port to build MicroPython as a cmake target, and since that commit the `make-bin-testsuite` helper script no longer works (it requires a Makefile) and hence the tinytest test framework can no longer be run. Instead of fixing this, remove the option to use tinytest. Boards running zephyr can use the standard `tests/run-tests.py` script to run tests in the usual way. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Both of these tests require slice to be enabled. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The pts line printed by qemu-system-arm goes to stdout, not stderr. Redirect stderr to stdout in case other tools do print to stderr. Signed-off-by: Damien George <damien@micropython.org>
-
- 26 Aug, 2024 6 commits
-
-
stijn authored
Make the CI builds compile the public API as C++ to catch accidental introductions of incompatible code. Signed-off-by: stijn <stijn@ignitron.net>
-
Jared Hancock authored
This adds support for the WIZNET5K nic to use IPv6 with the LWIP stack. Additionally, if LWIP_IPV6 is disabled, the device is configured to drop all IPv6 packets to reduce load on the MCU. Signed-off-by: Jared Hancock <jared@greezybacon.me>
-
Angus Gratton authored
Small code size and binary size optimisation for the fix merged in 4d6d8498. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
iabdalkader authored
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
-
Rick Sorensen authored
Currently for samd21 some features are disable because of limited memory. With the ability to trade firmware and filesystem space, a user may wish to selectively enable some of these features. This change allows them to be enabled in board `mpconfigboard.h` or on the build command line for example. The selectively enable functions are: MICROPY_PY_FRAMEBUF, MICROPY_PY_SELECT, MICROPY_PY_ONEWIRE and MICROPY_PY_ASYNCIO. Signed-off-by: Rick Sorensen <rick.sorensen@gmail.com>
-
Christian Walther authored
When MicroPython is used as a submodule and built from the containing project, e.g. for the embed port, `make submodules` fails because it goes looking for the sub-sub-module paths in the outer repository instead of in the micropython repository. Fix this by invoking git inside the micropython submodule. Signed-off-by: Christian Walther <cwalther@gmx.ch>
-
- 22 Aug, 2024 4 commits
-
-
nspsck authored
The original OSPIFLASH settings in the `mpconfigboard.h` contained some mistakes that prevented the firmware from compiling. These are now corrected and the firmware can be built with support for OSPI flash. Note: external storage in OSPI flash is not yet configured on this board. Signed-off-by: nspsck <teng.jiang94@gmail.com>
-
nspsck authored
Added a #if-block to `system_stm32.c` to check whether `MICROPY_HW_RCC_OSPI_CLKSOURCE` is defined. If that is the case, the clock source for the OSPI will be changed to the specified source. Signed-off-by: nspsck <teng.jiang94@gmail.com>
-
nspsck authored
Added a if-statement to `octospi.c` to detect if the targeted MCU is one of the STM32H7 series. If that is the case, another set of variables are used for the `mp_hal_pin_config_alt_static_speed()` function, as well as for register `OCTOSPI1->CR`. This allows the STM32H723 and STM32H7B3 series MCU to use octo-spi flash like the STM32H573 series MCU. Signed-off-by: nspsck <teng.jiang94@gmail.com>
-
Matt Trentini authored
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
-
- 20 Aug, 2024 10 commits
-
-
Andrew Leech authored
There is a gap in support for the PVD interrupt on STM32WBxx and STM32WLxx. This has been tested on NUCLEO_WB55 with the example code: from pyb import Pin, ExtInt def callback(line): print(line) PVD = 16 exti = ExtInt(PVD, ExtInt.IRQ_RISING_FALLING, Pin.PULL_DOWN, callback) exti.swint() Before this commit the CPU locks up as soon as the final line is run. After this commit it prints "16". Fixes issue #15548. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
-
Matt Trentini authored
There are some missing images at MicroPython Downloads. This commit attempts to resolve all the current issues, and add product URLs where missing. Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
-
Matt Trentini authored
IDF 3 builds are very old now (it seems like the last successful builds are from 2021), and the current IDF 5 is stable. So remove IDF 3 variants. Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
-
Matt Trentini authored
There is no such variant. Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
-
robert-hh authored
By default, the peripheral clock for UART and SPI is set to 48 MHz and will not be affected by the MCU clock change. This can be changed by a second argument to `machine.freq(freq, peripheral_freq)`. The second argument must be either 48 MHz or identical with the first argument. Note that UART and SPI baud rates may have to be re-configured after changing the MCU clock. Signed-off-by: robert-hh <robert@hammelrath.com>
-
robert-hh authored
As a side effect, the peripheral clock will be set to 48Mhz and both UART and I2C will not be affected by CPu speed changed using `machine.freq()`. With the change the UART baud rate range is 50 to 3_000_000. Signed-off-by: robert-hh <robert@hammelrath.com>
-
Phil Howard authored
If `MICROPY_PY_THREAD` is set to 0 (ie: a user C module wishes to use core1 exclusively) then the test of `core1_entry` would fail to compile with an "undeclared identifier" error. Fix it by wrapping in `MICROPY_PY_THREAD`. Signed-off-by: Phil Howard <phil@gadgetoid.com>
-
robert-hh authored
Telling that subseconds is not supported and returns always 0. This was changed in 913f9ad5. Signed-off-by: robert-hh <robert@hammelrath.com>
-
robert-hh authored
Preventing already pending IRQs to fire when not expected. Signed-off-by: robert-hh <robert@hammelrath.com>
-
robert-hh authored
Signed-off-by: robert-hh <robert@hammelrath.com>
-
- 19 Aug, 2024 2 commits
-
-
Alessandro Gatti authored
The RV32 emitter used an additional temporary register, as certain code sequences required extra storage. This commit removes its usage in all but one case, using REG_TEMP2 instead. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-
Alessandro Gatti authored
The RV32 emitter sometimes generated short load opcodes even when it was not supposed to. This commit fixes an off-by-one error in its offset eligibility range calculation and corrects one case of offset calculation, operating on the raw label index number rather than its effective offset in the stack (C.LW assumes all loads are word-aligned). Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-