- Fix URL for the unix badge.
- Add stm32 CI badge.
- Add docs CI badge (linking to the documentation)
- Make docs CI run on push (so we get a badge generated).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
See https://github.com/micropython/micropython/issues/12127 for details.
Previously at the point when a release is made, we update mpconfig.h
and set a git tag. i.e. the version increments at the release.
Now the version increments immediately after the release. The workflow is:
1. Final commit in the cycle updates mpconfig.h to set (X, Y, 0, 0) (i.e.
clear the pre-release state).
2. This commit is tagged "vX.Y.0".
3. First commit for the new cycle updates mpconfig.h to set (X, Y+1, 0, 1)
(i.e. increment the minor version, set the pre-release state).
4. This commit is tagged "vX.Y+1.0-preview".
The idea is that a nightly build is actually a "preview" of the _next_
release. i.e. any documentation describing the current release may not
actually match the nightly build. So we use "preview" as our semver
pre-release identifier.
Changes in this commit:
- Add MICROPY_VERSION_PRERELEASE to mpconfig.h to allow indicating that
this is not a release version.
- Remove unused MICROPY_VERSION integer.
- Append "-preview" to MICROPY_VERSION_STRING when the pre-release state
is set.
- Update py/makeversionhdr.py to no longer generate MICROPY_GIT_HASH.
- Remove the one place MICROPY_GIT_HASH was used (it can use
MICROPY_GIT_TAG instead).
- Update py/makeversionhdr.py to also understand
MICROPY_VERSION_PRERELEASE in mpconfig.h.
- Update py/makeversionhdr.py to convert the git-describe output into
semver-compatible "X.Y.Z-preview.N.gHASH".
- Update autobuild.sh to generate filenames using the new scheme.
- Update remove_old_firmware.py to match new scheme.
- Update mpremote's pyproject.toml to handle the "-preview" suffix in the
tag. setuptools_scm maps to this "rc0" to match PEP440.
- Fix docs heading where it incorrectly said "vvX.Y.Z" for release docs.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Currently on rp2 the time.time_ns() function has only seconds resolution.
This commit makes it have microsecond resolution, by using the output of
time_us_64() instead of the RTC.
Tested that it does not drift from the RTC over long periods of time.
Signed-off-by: Damien George <damien.p.george@gmail.com>
No other network-enabled board has urllib.urequest frozen in to the
firmware, and esp8266 is relatively low on flash, so remove this module.
And (u)requests is already included by bundle-networking.
Signed-off-by: Damien George <damien@micropython.org>
Also remove corresponding commented line from esp8266/boards/manifest.py.
It doesn't have enough flash to have this frozen by default.
Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
Allows using gdb, addr2line, etc. on a "release" ELF file.
No impact to .bin or .uf2 size, only the .elf will get bigger.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
The current code assumes all I2Cs are on the same peripheral bus, which is
not true for I2C4 and the same goes for the clock enable code.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Flushing console output in msvc builds always fails because that
output is not buffered so don't propagate that as an error (in a
simlar way as was done in 1c047742 for macOS).
Signed-off-by: stijn <stijn@ignitron.net>
The IDF-provided version of TinyUSB defaults to Espressif's standard
VID:PID unless specific sdkconfig options are present. The numbers
already defined for the CUSTOM_* config options were ignored otherwise.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This removes the duplicate code in cyw43, esp32, esp8266 that implements
the same logic as network.hostname.
Renames the `mod_network_hostname` (where we store the hostname value in
`.data`) to `mod_network_hostname_data` to make way for calling the shared
function `mod_network_hostname`.
And uses memcpy for mod_network_hostname_data, because the length of source
is already known and removes reliance on string data being null-terminated.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This changes from the previous limit of 15 characters. Although DHCP and
mDNS allow for up to 63, ESP32 and ESP8266 only allow 32, so this seems
like a reasonable limit to enforce across all ports (and avoids wasting the
additional memory).
Also clarifies that `MICROPY_PY_NETWORK_HOSTNAME_MAX_LEN` does not include
the null terminator (which was unclear before).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This patch reinstalls the pin IRQ handler on WiFi init, as some
ports disable/remove pin IRQs on soft-reboot, or deinit the pins.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
The following code:
server = await asyncio.start_server(...)
async with server:
... code that raises ...
would lose the original exception because the server's task would not have
had a chance to be scheduled yet, and so awaiting the task in wait_closed
would raise the cancellation instead of the original exception.
Additionally, ensures that explicitly cancelling the parent task delivers
the cancellation correctly (previously was masked by the server loop), now
this only happens if the server was closed, not when the task was
cancelled.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
By clearing the tamper bits and enabling access to the registers for all
code, just in case that this was set. It keeps the clock running on
battery and the calibration setting.
Signed-off-by: robert-hh <robert@hammelrath.com>
Not all boards or BLE extensions have the flow control signals for BLE
available at suitable pins. Actually none of the Adafruit extensions
match for flow control.
For consistency with the previous behaviour it is enabled by default.
Signed-off-by: robert-hh <robert@hammelrath.com>
Commit 552b0bbe12 did not define
MICROPY_PY_MACHINE_SDCARD properly, and thus building the firmware failed.
Signed-off-by: robert-hh <robert@hammelrath.com>
There is a single UART clock for all devices, so switching it for one will
affect all devices used at that time. This commit fixes that issue by
keeping the clock at a fixed value.
This fixed clock still supports the common baud rates between 300 and
921600 baud.
Signed-off-by: robert-hh <robert@hammelrath.com>
This is option is no longer needed as a Makefile option as the USDHC driver
is enabled for all supported series.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Prior to this commit, BTstack would only be notified of sent UART data when
the mp_bluetooth_hci_poll() function was called for some other reason, eg
because of incoming data over UART. This is highly suboptimal.
With this commit, BTstack is now notified immediately after UART data has
been sent out. This improves the multi_bluetooth/perf_gatt_char_write.py
performance test by about a factor of 10x for write-without-response, and
about 4x for write-with-response (tested on LEGO_HUB_NO6 as instance1).
Signed-off-by: Damien George <damien@micropython.org>
1. Remove the skip for detecting support for polling user-defined objects
as this is always possible now on all ports.
2. Don't print when the scheduled task runs as the ordering of this
relative to the other prints is dependent on other factors (e.g. if
using the native emitter).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
iobase_ioctl expects that an ioctl method must return an integer, and will
raise otherwise.
This was tripping up aioble on Unix, where the new hybrid modselect.c
implementation will attempt to extract a file descriptor from the pollable
via ioctl(MP_STREAM_GET_FILENO).
However, ThreadSafeFlag's ioctl only supported MP_STREAM_POLL, and returned
None otherwise.
This makes it return `-1` (to match tests/extmod/select_poll_custom.py). It
should probably be `-22` (corresponding to MP_EINVAL), but the value is
never checked, and MP_EINVAL can be a different value on different ports.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Update expired certificate, increase time validity period to five years and
fix command arguments typos in commentaries.
Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
Changes are:
- Disable internal flash storage and use the external QSPI for storage.
- Disable default bootloader entry mode. The bootloader entry function
exists in board_init.c.
- Remove OSC enable/disable macros (this board doesn't have an OSC).
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This was previously hard-coded to "Micropy" / "Mass Storage" / "1.0".
Now allow it to be overridden by a board.
Also change "Micropy" to "MicroPy" and "1.0" to "1.00" to match stm32.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This was previously hard-coded to "MicroPy" / "pyboard Flash" / "1.00".
Now allow it to be overridden by a board.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Add "CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y" to
ports/esp32/boards/sdkconfig.base so that all micropython esp32 images
support OTA rollback in the bootloader. These images can then be converted
to OTA-capable images as required by user tools.
Also remove CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y from board-specific
sdkconfig files as this is now the default.
Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>