| Age | Commit message (Collapse) | Author |
|
Add an esp32 build (specifically ESP32_GENERIC) to the CI code-size check.
Multiple new steps must be done to prepare for building esp32, and caching
is used to speed up both the install of the IDF and the build process.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
This commit updates the test procedure for the Unix port targeting the
RV64 platform to also run the battery of native modules test that is
part of the QEMU port.
Unfortunately this required a few changes to the CI setup since the Unix
port was still using an older version of Ubuntu LTS than the RISC-V
natmods build infrastructure expects. Updating the OS version just for
the RV64 Unix target brought a couple of issues when building the code
(an extra package is now needed to let FFI build) and running tests
(QEMU binfmt support requires a new setup).
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit lets the QEMU port's VIRT_RV64 board load and run native
modules, via the appropriate configuration changes in mpconfigport.h.
Now the CI test job for the QEMU/RV64 port can also run natmods and see
whether they actually work, so the CI tasks script has been updated to
bring RV64 to parity with RV32 as far as CI checks go.
Documentation was also updated, since now all supported boards in the
QEMU port should be able to run natmod tests.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit adds the ability to compile native modules for the RV64
platform, using "rv64imc" as its architecture name (eg.
"make ARCH=rv64imc" should build a RV64 natmod).
The rest of 64-bits relocations needed to build a native module are now
implemented, and all sample native modules build without errors or
warnings. The same Picolibc caveats on RV32 also apply on RV64, thus
the documentation was updated accordingly.
RV64 native modules are also built as part of the CI process, but not
yet executed as the QEMU port is not yet able to load and run them.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit fixes handling of the R_RISCV_TLSDESC_LOAD_LO12 RISC-V
object file relocation, fixing a couple of mistakes in its usage.
The condition check for TLS relocations presence and their rejection
when found in object files skipped checking for
R_RISCV_TLSDESC_LOAD_LO12 relocations, which is part of the set of
unsupported TLS relocations and thus needing an object file rejection.
Interestingly, that relocation name constant was actually misspelled
in the file - since it was skipped in the list of relocations being
checked its wrong name did pass unnoticed until now. This is not a
critical change as the linker will raise an error about an unknown
relocation type rather than report a more descriptive message to the
user, but it's nice to have nonetheless.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit fixes the implementation of the R_RISCV_GOT32_PCREL RISC-V
relocation type when linking native modules for RV32IMC.
The previous implementation of R_RISCV_GOT32_PCREL ended up not being
fully updated when the initial RV32 support was checked in. Said
relocation was not emitted in the sample natmods that ship with the
MicroPython source tree, and since they're the testbed for CI jobs that
should check RV32 natmod support, this was not caught.
On the other hand, nobody raised an issue about this problem yet, so
hopefully it didn't cause much trouble.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
The destination directory for the firmware built by `autobuild.sh` is
currently hard-coded to `/tmp/autobuild-firmware-$$`. Now that there are
many boards built by this script, the `/tmp` partition can run out of
space.
This commit makes the destination directory configurable via the
`MICROPY_AUTOBUILD_DEST` environment variable.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This adds an ANSI-rendered pinout for the WeAct Studio RP2350B Core board.
Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
|
|
Includes a base variant with LAN, and C5_WIFI and C6_WIFI variants with
LAN, WiFi and BLE.
And builds this board in the esp32 CI, to cover the P4 support.
Signed-off-by: Vincent1-python <pywei201209@163.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Signed-off-by: Damien George <damien@micropython.org>
|
|
Currently the CI for stm32 only tests building about half of the available
MCU families. This commit adds the remaining families to the stm32 CI
jobs.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is needed to build Cortex-M55 (STM32N6) based boards.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit adds a new workflow step to the CI, to test the debug
emitter provided by mpy-cross. The checks being done are limited to
make sure that the debug emitter does not crash and emits opcodes for a
simple test file that is guaranteed to work for all configurations.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit adds custom command completion functions for both the zsh
and fish shell.
The behaviour for those new completions follow the existing completion
for the bash shell, including the way to generate the completion alias
(with appropriately named command line switches).
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit adds a `--json` option to `mpy-tool.py`, in order to generate
Compiler-Explorer-compatible JSON annotation information for the bytecode
disassembly. Some of this information might be theoretically possible to
parse out from the text itself, but not all of it is, e.g. disambiguating
child references with non-unique simple names.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
Running `ruff format tools/cc1` picks up `tools/cc1` which is a Python file
that does not have a .py file extension.
Signed-off-by: Christian Clauss <cclauss@me.com>
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit adapts the stm32 port to allow switching from STM USB stack to
TinyUSB stack.
Using TinyUSB improves consistancy with other MicroPython ports and brings
in the ability to use the runtime USB definition support recently added to
other TinyUSB based ports.
By default the existing STM USB stack is used. TinyUSB can be enabled in a
board configuration with:
#define MICROPY_HW_TINYUSB_STACK (1)
Or, it can be enabled from the command line with:
make -C ports/stm32 CFLAGS_EXTRA='-DMICROPY_HW_TINYUSB_STACK=1'
Signed-off-by: Andrew Leech <andrew@alelec.net>
|
|
This commit extends "mpy-tool.py"'s disassembly output of a given MPY
file (triggered via the "-d" command line option) to include newly added
fields.
Now the target architecture for the chosen MPY file is printed out to
screen in human-readable format and, if present, architecture-specific
flags.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit extends the MPY file format in a backwards-compatible way to
store an encoded form of architecture-specific flags that have been
specified in the "mpy-cross" command line, or that have been explicitly
set as part of a native emitter configuration.
The file format changes are as follows:
* The features byte, previously containing the target native
architecture and the minor file format version, now claims bit 6 as a
flag indicating the presence of an encoded architecture flags integer
* If architecture flags need to be stored, they are placed right after
the MPY file header.
This means that properly-written MPY parsers, if encountering a MPY file
containing encoded architecture flags, should raise an error since no
architecture identifiers have been defined that make use of bits 6 and
7 in the referenced header byte. This should give enough guarantees of
backwards compatibility when this feature is used (improper parsers were
subjected to breakage anyway).
The encoded architecture flags could have been placed at the end, but:
* Having them right after the header makes the architecture
compatibility checks occur before having read the whole file in memory
(which still happens on certain platforms as the reader may be backed
by a memory buffer), and prevents eventual memory allocations that do
not take place if the module is rejected early
* Properly-written MPY file parsers should have checked the upper two
bits of the flags byte to be actually zero according to the format
specification available right before this change, so no assumptions
should have been made on the exact order of the chunks for an
unexpected format.
The meaning of the architecture flags value is backend-specific, with
the only common characteristic of being a variable-encoded unsigned
integer for the time being.
The changes made to the file format effectively limit the number of
possible target architectures to 16, of which 13 are already claimed.
There aren't that many new architectures planned to be supported for the
lifetime of the current MPY file format, so this change still leaves
space for architecture updates if needed.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
Setting RTS/DTR raises "Inappropriate ioctl for device" for pts devices.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
This makes the version string consistent with the one used in code, see
commit 9e89c752cb.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
|
|
Now the default reference commit is the first parent of the selected
commit, instead of the first parent of HEAD.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
This will show a line for both the reference and comparison, e.g.,
Reference: zephyr/boards: Add PocketBeagle 2 rev A1… [00a926e99e]
Comparison: metrics: Tersely show the commi… [merge of c7ac411e22]
When the comparison is a merge commit (as it is during CI) the second
parent of that commit is shown instead.
This will be helpful when checking which revision of the code size report
comment on a PR corresponds to which revision of the code.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
The zephyr port doesn't have a Makefile so can't run `make submodules`.
Instead they must be explicitly initialized.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Regression from 449866cb0af3fc547df6538a6552517cc8974616.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
It was removed (possibly inadvertently)
in 4c55b0879b38b373b44e84552d6754b7842b5b72
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
This is a necessary step to allow cleanly building the xtensa port during
CI, as it's undesirable to apply the esp-idf environment settings while
building other ports.
PRE_CMD_<letter> can be used to override the command, or add a command if
not otherwise specified. Note that <letter> is case sensitive.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
For instance, to compare HEAD to origin/master on only the minimal x86
build, use
PORTS_TO_CHECK=m REFERENCE=origin/master tools/ci.sh code_size_build
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Changes of interest could be in emitted mpy frozen files.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Don't simply hard-code a parallelism of 3 for the build.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Abbreviating these doesn't really save space in the docs, as the code
blocks in the next row are always wider than the column headings.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
With all the preceeding improvements to the test suite, it's now possible
to just run `make VARIANT=minimal test` -- which is equivalent to just
`./run-tests.py` -- on the unix minimal variant.
Signed-off-by: Damien George <damien@micropython.org>
|
|
With the recent improvements to the test suite, and fixes for `pow`, the
full test suite can now be run (and appropriate tests will be automatically
skipped).
Signed-off-by: Damien George <damien@micropython.org>
|
|
The problem with ESP board spurious reset happens at disconnect time on
Windows (clearing DTR before RTS triggers a reset).
Previous workarounds tried to detect possible ESP boards and apply the
correct DTR and RTS settings when opening the port.
Instead, we can manually clear RTS before closing the port and thereby
avoid the reset issue. Opening the port can keep the default behaviour
(RTS & DTR both set).
close() is called from a finally block in the mpremote main module
(via do_disconnect()) - so this should always happen provided the Python
process isn't terminated by the OS.
One additional workaround is needed to prevent a spurious reset first time
a Silicon Labs CP210x-based ESP board is opened by mpremote after
enumeration.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
This showed up some interesting errors (hopefully all fixed now).
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Add support to `tools/metrics.py` to compute the size delta of mpy-cross,
alongside the sizes of port firmware. This is an easy and cheap addition
because mpy-cross is usually built before the ports are.
Although the size of mpy-cross is not critical, it's still a nice
indication of how changes affect code size, and helps to eliminate any
unwanted increases in mpy-cross.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is needed to correctly stop after an error in a CI step when running
`ci.sh` as a script.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
This adds a QEMU-based bare metal RISC-V 64 bits port. For the time being
only QEMU's "virt" 64 bits board is supported, using the lp64 ABI and the
RV64IMC architecture.
The port's README is also updated to keep track of these changes.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
MPY files can now hold data to be run on RV64IMC. This can be
accomplished by passing the `-march=rv64imc` flag to mpy-cross.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This makes it easier to run a sequence of ci steps locally. A help message
is also provided.
Signed-off-by: Jeff Epler <jepler@gmail.com>
|
|
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
|
|
Python 2.7 has been EOL since January 2020.
Ubuntu oldoldlts (Focal Fossa, 20.04) has Python 3.8. Debian oldoldstable
(Buster, from 2019) has Python 3.7. RHEL 8 (from 2019) has Python 3.6.
It's easier than ever to install a modern Python using uv.
Given this, it seems like a fine idea to drop Python 2.7 support.
Even though the build is not tested on Python as old as 3.3, I left
comments stating that "3.3+" is the baseline Python version. However, it
might make sense to bump this to e.g., 3.10, the oldest Python 3 version
used during CI. Or, using uv or another method actually test on the oldest
Python interpreter that is desirable to support (uv goes back to Python 3.7
easily; in October 2025, the oldest supported Python interpreter version
will be 3.10)
Signed-off-by: Jeff Epler <jepler@gmail.com>
|