| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
Reserve SPI flash bus used for storage or XIP.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
Reserved and static SPI buses must remain initialized during a soft reboot
as they may be used for SPI flash storage or XIP.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
A board should make this return true if the specified SPI instances should
not be deinitialized on soft-reboot.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
This commit re-introduces `tests/extmod/vfs_rom.py` and
`tests/float/math_domain.py` to the test suite, as the issues that made
them fail have now been addressed.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit fixes code generation for loading halfwords using an offset
greater than 255.
The old code blindly encoded the offset into a `LDRH Rd, [Rn, #imm]`
opcode, but only the lowest 8 bits would be put into the opcode itself.
This commit instead generates a two-opcodes sequence, a constant load into
R8, and then `LDRH Rd, [Rn, R8]`.
This fixes `tests/extmod/vfs_rom.py` for the qemu/SABRELITE board.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit fixes code generation for loading a local's address if its
index is greater than 63.
The old code blindly encoded the offset into an `ADD Rd, Rn, #imm` opcode,
but only the lowest 8 bits would be put into the opcode itself. This
commit instead generates a two-opcodes sequence, a constant load into R8,
and then an `ADD Rd, Rn, R8` opcode.
This fixes `tests/float/math_domain.py` for the qemu/SABRELITE board.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit increases the GC heap size from 120KiB to 140KiB, as it is
needed to make the full test suite pass on SABRELITE when ran through the
armv6 native emitter.
This is needed as the code output by the armv6 native emitter is limited to
4-bytes opcodes and thus takes more space than other ARM emitters.
To keep things aligned, the RV32 port also got its heap size increased even
though it is not needed on that platform right now.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
The Micro:Bit machine definition in Qemu has soft MMU support enabled,
which is currently not compatible with the way MicroPython generates code
that needs to call back into non-emitted code.
As a stop-gap solution, the native code emitter for the MICROBIT board is
turned off.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
When a CPU exception is raised when emulating a Thumb-capable processor,
the default exception handler would simply enter in an endless loop without
providing any further information.
This commit adds a more complete exception handler that dumps to STDOUT the
exception cause and the status of the registers at the moment of the
exception.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
Some PTY targets, namely `NETDUINO2` and `MICROBIT` under Qemu, take a bit
more time to present a REPL than usual. The pyboard tool is a bit too
impatient and would bail out before any of those targets had a chance to
respond to the raw REPL request.
Co-authored-by: Damien George <damien@micropython.org>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
All board IDs are now the board directory name.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This entry was originally used to override the firmware filenames generated
by the build server, but these days all filenames should match the board
directory name. So, remove the "id" entry and let the default be used.
This is a follow-up to 1a99f74063569df0927e1ada0256059fcdef128c (these
three boards were added after that change).
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
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>
|
|
They expired in early January 2025.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Fix the command that converts `ec_key.pem` to `ec_key.der`, and increase
the certificate validity to 10 years.
Signed-off-by: Damien George <damien@micropython.org>
|
|
To use an older version of libffi.
Signed-off-by: Damien George <damien@micropython.org>
|
|
GitHub Actions has updated ubuntu-latest to 24.04, which now defaults
CPython to 3.12, which has a known regression with settrace. Fix that by
explicitly using CPython 3.11.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
See https://github.com/micropython/micropython/issues/16190#issuecomment-2466155919
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
Fixes issue #16190.
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
The tests now include `--via-mpy` and `--via-mpy --emit native`, which will
test more cases of the native emitter under both ARM and RISC-V.
Signed-off-by: Damien George <damien@micropython.org>
|
|
The `asmbcc`, `asmbitops`, `asmconst` and `asmit` tests fail to compile
with mpy-cross on armv6 architecture (used by SABRELITE), so explicitly
exclude them.
The `math_domain` and `vfs_rom` tests fail when compiled to native machine
code, so also exclude those unconditionally.
Signed-off-by: Damien George <damien@micropython.org>
|
|
It's needed by the test. This previously passed because the compiler
(actually parser) optimises away errno constants.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This method is needed by tests like `extmod/vfs_rom.py`.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Co-authored-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Damien George <damien@micropython.org>
|
|
Prior to this fix, the assembler generated `LDRH Rd, [Rn, #imm]!`, so the
second `LDRH` from the same origin would load from the wrong base.
Co-authored-by: Alessandro Gatti <a.gatti@frob.it>
Signed-off-by: Damien George <damien@micropython.org>
|
|
When using unittest (for example) with injected mpy files, not only does
the name of the main test module need to be `__main__`, but also the
`__main__` module should correspond to this injected module. Otherwise the
unittest test won't be detected.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Fixes gcc warning when -Wsign-conversion is on.
Signed-off-by: Yoctopuce <dev@yoctopuce.com>
|
|
Fixes compilation warning C4307: '+': integral constant overflow.
Signed-off-by: Yoctopuce <dev@yoctopuce.com>
|
|
To prevent compiler warnings.
Signed-off-by: Yoctopuce <dev@yoctopuce.com>
|
|
Signed-off-by: Yoctopuce <dev@yoctopuce.com>
|
|
To prevent compiler warnings.
Signed-off-by: Yoctopuce <dev@yoctopuce.com>
|
|
Adds a configurable version string to a known location at the end of mboot
flash section. Also stores the options mboot was built with, eg usb and
which filesystems are supported.
A board can override the defaults, or disable the version string entirely
by setting MBOOT_VERSION_ALLOCATED_BYTES=0.
Signed-off-by: Victor Rajewski <victor@allumeenergy.com.au>
|
|
This commit implements a method to detect at runtime if inline assembler
support is enabled, and if so which platform it targets.
This allows clean test runs even on modified version of ARM-based ports
where inline assembler support is disabled, running inline assembler tests
on ports that have such feature not enabled by default and manually
enabled, and allows to always run the correct inlineasm tests for ports
that support more than one architecture (esp32, qemu, rp2).
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit enables by default inline assembly support for the RP2 target
when it is operating in RISC-V mode. This brings the feature set when in
RISC-V mode to parity with what's available in ARM mode.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
In certain circumstances depending on the code size, the
`deflate_decompress` test fails on both ARM and RV32 with a memory
allocation failure error. The issue is mitigated by having a larger GC
heap, in this case around 20 KBytes more than the original 100 KBytes
default.
This commit makes the GC heap size configurable on a per-arch basis, with
both ARM and RV32 using the enlarged 120 KBytes heap.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit adds support for writing inline assembler functions when
targeting a RV32IMC processor.
Given that this takes up a bit of rodata space due to its large
instruction decoding table and its extensive error messages, it is
enabled by default only on offline targets such as mpy-cross and the
qemu port.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This makes the existing popcount(uint32_t) implementation found in the
RV32 emitter available to the rest of the codebase. This version of
popcount will use intrinsic or builtin implementations if they are
available, falling back to a generic implementation if that is not the
case.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
Thumb/Thumb2 tests are now into their own subdirectory, as
RV32IMC-specific tests will be added as part of the RV32 inline
assembler support.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
Provides full coverage of the VfsRom driver.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
This adds an optimisation for loading .mpy files from a reader that points
to ROM. In such a case qstr, str and bytes data, along with bytecode, are
all referenced in-place in ROM.
Signed-off-by: Damien George <damien@micropython.org>
|
|
If the file can be memory mapped (because it responds to the buffer
protocol) then return a memory-reader that directly references the ROM data
of the file.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This allows accessing data directly in ROM if the reader supports it.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Allows an interned string to reference static/ROM data, instead of
allocating it on the GC heap.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit defines a new ROMFS filesystem for storing read-only files that
can be memory mapped, and a new VfsRom driver. Files opened from this
filesystem support the buffer protocol. This allows naturally getting the
memory-mapped address of the file using:
- memoryview(file)
- uctypes.addressof(file)
Furthermore, if these files are .mpy files then their content can be
referenced in-place when importing. Such imports take up a lot less RAM
than importing from a normal filesystem. This is essentially dynamically
frozen .mpy files, building on the revamped v6 .mpy file format.
Signed-off-by: Damien George <damien@micropython.org>
|