summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-08-19tools/autobuild: Don't use "-B" for make, it's already a fresh build.Damien George
And using "-B" means mpy-cross is forcefully rebuilt, sometimes with invalid CFLAGS_EXTRA options which makes the auto-build fail. Signed-off-by: Damien George <damien@micropython.org>
2021-08-19tools/mpremote: Remove support for pyb.USB_VCP in/out specialisation.Damien George
The sys.stdin.buffer and sys.stdout.buffer streams work just as well (and are just as fast) as pyb.USB_VCP on stm32 devices, so there's no need to have the USB_VCP specialisation code, which just adds complexity. Also, on stm32 devices with both USB and UART (or other serial interface), if something other than the USB_VCP port is used for the serial connection then mpremote mount will not work because it will default to reading and writing on USB_VCP instead of the other connected serial stream. As part of this simplification, support for a second port as input is removed (this feature was never exposed to the user). Signed-off-by: Damien George <damien@micropython.org>
2021-08-14py: Implement partial PEP-498 (f-string) support.Jim Mussared
This implements (most of) the PEP-498 spec for f-strings and is based on https://github.com/micropython/micropython/pull/4998 by @klardotsh. It is implemented in the lexer as a syntax translation to `str.format`: f"{a}" --> "{}".format(a) It also supports: f"{a=}" --> "a={}".format(a) This is done by extracting the arguments into a temporary vstr buffer, then after the string has been tokenized, the lexer input queue is saved and the contents of the temporary vstr buffer are injected into the lexer instead. There are four main limitations: - raw f-strings (`fr` or `rf` prefixes) are not supported and will raise `SyntaxError: raw f-strings are not supported`. - literal concatenation of f-strings with adjacent strings will fail "{}" f"{a}" --> "{}{}".format(a) (str.format will incorrectly use the braces from the non-f-string) f"{a}" f"{a}" --> "{}".format(a) "{}".format(a) (cannot concatenate) - PEP-498 requires the full parser to understand the interpolated argument, however because this entirely runs in the lexer it cannot resolve nested braces in expressions like f"{'}'}" - The !r, !s, and !a conversions are not supported. Includes tests and cpydiffs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-14tools/mpremote: Add "devs" shortcut for "connect list".Damien George
See issue #7480. Signed-off-by: Damien George <damien@micropython.org>
2021-08-14tools/mpremote: Fix connect-list in case VID/PID are None.Damien George
Which can be the case on Windows and macOS for certain serial devices. Fixes issue #7636. Signed-off-by: Damien George <damien@micropython.org>
2021-08-13tools/autobuild: Add auto build for Silicognition wESP32.Patrick Van Oosterwijck
2021-08-13tools/gen-cpydiff.py: Don't rename foo to ufoo in diff output.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-08tools/codeformat.py: Include ports/nrf/modules/nrf in code formatting.Glenn Ruben Bakke
2021-08-08tools/ci.sh: Add mpy-cross build to nrf port.Glenn Ruben Bakke
2021-08-07ports: Rename USBD_VID/PID config macros to MICROPY_HW_USB_VID/PID.Damien George
For consistency with other board-level config macros that begin with MICROPY_HW_USB. Also allow boards in the mimxrt, nrf and samd ports to configure these values. Signed-off-by: Damien George <damien@micropython.org>
2021-07-31tools/autobuild: Add the MIMXRT1050_EVKB board to the daily builds.robert-hh
2021-07-31stm32/Makefile: Update to only pull in used Bluetooth library.Tobias Thyrrestrup
2021-07-23tools/mpremote: Raise OSError on unsupported RemoteFile.seek.Michel Bouwmans
Signed-off-by: Michel Bouwmans <m.bouwmans@ep-games.eu>
2021-07-23tools/mpremote: Add seek whence for mounted files.Michel Bouwmans
Fixes issue #7534. Signed-off-by: Michel Bouwmans <m.bouwmans@ep-games.eu>
2021-07-22tools/autobuild: Add FeatherS2 and TinyS2 to esp32 auto builds.Seon Rozenblum
2021-07-22tools/autobuild: Use separate IDF version to build newer esp32 SoCs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-07-18tools/ci.sh: Build GENERIC_C3 board as part of esp32 CI.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-07-17tools/ci.sh: Build unix dev variant as part of macOS CI.Damien George
To test BTstack build on macOS. Signed-off-by: Damien George <damien@micropython.org>
2021-07-13github/workflows: Add workflow to build and test unix dev variant.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-07-12all: Update to point to files in new shared/ directory.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-07-02tools/mpremote: Swap order of PID and VID in connect-list output.Andrew Scheller
Fixes issue #7481.
2021-07-01tools/pyboard.py: Add cmd-line option to make soft reset configurable.Frank Pilhofer
Leaves the default as-is, but allows using --no-soft-reset to disable the soft reset when connecting.
2021-07-01tools/autobuild: Add mimxrt port to build scripts for nightly builds.robert-hh
The firmware for Teensy 4.0, Teensy 4.1 and MIMXRT1020_EVK are created. Users of other MIMXRT10xx_EVK boards should be able to build the firmware themselves, they might need specific DEBUG settings. The Makefile had to be changed in order to build the .bin file as well.
2021-06-28tools/makemanifest.py: Allow passing flags to mpy-tool.py.Yonatan Goldschmidt
2021-06-26github/workflows: Switch from lcov to gcov.Damien George
Coverage calculated by Codecov has the same reliability/deterministic issues as Coveralls did, so the problem is likely to do with the output of lcov/gcov, rather than the analysis and display of the data. Switch from lcov to gcov for data generation to try and simplify this process of computing coverage. Signed-off-by: Damien George <damien@micropython.org>
2021-06-25github/workflows: Add workflow to build and test javascript port.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-06-25tools/ci.sh: Run apt-get update in ci_powerpc_setup.David Lechner
This fixes failing builds when the GitHub CI image lags behind Ubuntu security updates.
2021-06-23tools: Remove obsolete build-stm-latest.sh script.Damien George
The tools/autobuild/ scripts replace this. Signed-off-by: Damien George <damien@micropython.org>
2021-06-23tools/autobuild: Add scripts to build release firmware.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-06-15tools/mpremote: Use signal to capture and handle ctrl-C on Windows.Damien George
Now a ctrl-C will not stop mpremote, rather this character will be passed through to the attached device. The mpremote version is also increased to 0.0.5. Signed-off-by: Damien George <damien@micropython.org>
2021-06-15tools/mpremote: Use available ports instead of auto-connect list.Damien George
Using just the list of available ports, instead of a hard-coded list of possible ports, means that all ports will be available for auto connection. And the order that they will be attempted in will match what's printed by "mpremote connect list" (and will be the same as before, trying ACMx before USBx). Auto-connect will also now work on Mac, and will allow all COM ports on Windows. Signed-off-by: Damien George <damien@micropython.org>
2021-06-06tests/unix: Add ffi test for integer types.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-06-06zephyr: Update to Zephyr v2.6.0.Maureen Helm
Updates the zephyr port build instructions and CI to use the latest zephyr release tag. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-06-05github/workflows: Add workflow to build and run unix port on ARM.Damien George
Following on from ef16834887de02cbddf414b560e5a2af9cae4b16, this adds a coverage build and running of the test suite on an ARM 32-bit Linux-based architecture. Signed-off-by: Damien George <damien@micropython.org>
2021-06-02tools/ci.sh: Build mpy-cross as part of ci_mimxrt_build.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-05-29tools/mpremote: Add new CLI utility to interact with remote device.Damien George
This has been under development since April 2017. See #3034 and #6375. Signed-off-by: Damien George <damien@micropython.org>
2021-05-29tools/pyboard.py: Add "soft_reset" option to Pyboard.enter_raw_repl().Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-05-29tools/pyboard.py: Track raw REPL state via in_raw_repl variable.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-05-26github/workflows: Add workflow to build and run unix port on MIPS.Damien George
This adds a coverage build and running of the test suite on a MIPS 32-bit big endian architecture. It uses the feature of qemu to execute foreign code as though it were native to the system (using qemu user mode). The code compiled for MIPS will run under the qemu VM, but all syscalls made by this code go to the host (Linux) system. See related #7268 and #7273. Signed-off-by: Damien George <damien@micropython.org>
2021-05-26tools/ci.sh: Build Cortex-A9 sabrelite board as part of qemu-arm CI.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-05-26tools/tinytest-codegen.py: Add command-line option to exclude tests.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-05-26tools/mpy-tool.py: Support relocating ARMv6 arch.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-05-26github/workflows: Add CI workflow for mimxrt port.Philipp Ebensberger
2021-05-23tools/ci.sh: Use FROZEN_MANIFEST in an esp32 build to test feature.Damien George
This tests that FROZEN_MANIFEST works with cmake (on esp32 at least). Signed-off-by: Damien George <damien@micropython.org>
2021-05-21tools/ci.sh: Update zephyr docker image to v0.17.3.Maureen Helm
Updates the zephyr docker image and SDK to the latest versions. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-21tools/pydfu.py: Remove default VID/PID values.Tobias Thyrrestrup
As the new default behaviour, this allows PyDFU to be used with all devices, not just the ones matching a specific set of VID/PID values. But it's still possible to specify VID/PID if needed to narrow down the selection of the USB device. Signed-off-by: Tobias Thyrrestrup <tt@LEGO.com>
2021-05-20tools/mpy_ld.py: Support R_X86_64_GOTPCREL reloc for x86-64 arch.Damien George
This can be treated by the linker the same as R_X86_64_REX_GOTPCRELX, according to https://reviews.llvm.org/D18301. Signed-off-by: Damien George <damien@micropython.org>
2021-04-29tools/makemanifest.py: Show directory name if there is a FreezeError.Steve App
2021-04-27tools/gen-cpydiff.py: Fix formatting of doc strings for new Black.iabdalkader
Since version 21.4b0, Black now processes one-line docstrings by stripping leading and trailing spaces, and adding a padding space when needed to break up """"; see https://github.com/psf/black/pull/1740 This commit makes the Python code in this repository conform to this rule.
2021-04-23tools/pyboard.py: Support opening serial port in exclusive mode.Damien George
This is now the default, but can be overridden with CLI `--no-exclusive`, or constructing `Pyboard(..., exclusive=False)`. Signed-off-by: Damien George <damien@micropython.org>