This should have been added in 4815af75bc
when the variants were combined. The original non-USB variant got this
implicitly, and therefore was not in mpconfigvariant.h
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
PICO might not always be a unique name across all ports, and the
convention generally for other boards is to do VENDOR_BOARD.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This merges the existing GENERIC, GENERIC_1M, and GENERIC_512k boards
into variants of the new ESP8266_GENERIC board (renamed from GENERIC so
as not to clash with other ports).
Also moves the generation of the "OTA" variant (previously generated by
autobuild/build-esp8266-latest.sh) into the variant.
Following the convention established for the WEACTSTUDIO rp2 board, the
names of the variants are FLASH_1M and FLASH_512K (but rename the .ld files
to use MiB and kiB).
Updates autobuild to build esp8266 firmware the same way as other ports.
This requires renaming the output from firmware-combined.bin to just
firmware.bin.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Board names need to be unique across ports, and GENERIC clashes with
the ESP8266 (which will be renamed to ESP8266_GENERIC).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This allows switching between variants without clobbering the build
output.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This was used to override the firmware filename generated by the build
server (to match the historical name before board definitions existed).
Now we're making everything use the board definition name (i.e. the
directory name).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This is to support a future change to add the variant name to the build
directory and therefore should be the same style as the board name.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This is to support a future change to add the variant name to the build
directory and therefore should be the same style as the board name.
This only affects the WEACTSTUDIO board. Also standardises on a convention
for naming flash-size variants. Normally we would write e.g. 2MiB, but in
uppercase, it's awkward to write 2MIB, so instead use 2M, 512K, etc for
variant names, but use 2MiB when not constrained by case (e.g. a regular
filename).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This is to support a future change to add the variant name to the build
directory and therefore should be the same style as the board name.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
MICROPY_PY_STM_CONST defaults to 1 if MICROPY_PY_STM is set. Overriding to
0 disables the named register peripheral constants being including in the
stm32 module.
This saves about 7.5KB of code size for the STM32WL55, which is significant
as this SoC doesn't have a lot of flash.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This is the minimum C interface to allow a modem driver to be built in
Python. Interface is simple, with the intention that the micropython-lib
driver is the main (only) consumer of it.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
No IRQHandlers were compiled in for this board.
Includes small consolidation of the same DMAMUX_ENABLE line for STM32G4,
STM32WB, STM32WL.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Switches default on the NUCLEO_WL55 board to use the HSE oscillator powered
from PB0_VDDTCXO pin.
Build-time configuration can select from MSI internal oscillator (previous
default), HSE via crystal, or HSE bypass with TCXO powered from PB0_VDDTCXO
pin (new default)
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This is a "normal" SPI peripheral with no external pins, to avoid having to
grow spi_obj[] for just this one board map it as SPI ID 3 (board has SPI
IDs 1,2 already).
Signed-off-by: Angus Gratton <angus@redyak.com.au>
At the Adafruit Metro M7 the pin GPIO_AD_13 is used for JTAG. Therefore
it is not configured for RTS at UART 2 and 3.
Signed-off-by: robert-hh <robert@hammelrath.com>
Very helpful for catching typos or missing imports when writing code!
Description can be found at
https://beta.ruff.rs/docs/rules/undefined-name/
Parent commits contain various small fixes and inline ignores for this
check. The only blanket exception is manifest files, which are numerous
and evaluated with some global names pre-defined - these can be globally
ignored.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Spurious fix as the logic is structured such that these variables will be
set before dereferenced, but this keeps Ruff happy (no more F821
undefined-name).
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Looks like copy-paste from the stm32 make-pins.py, references a function
that is not present in the renesas-ra version.
Found by Ruff checking F821.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
subprocess.CalledProcessError() constructor arguments aren't documented,
but these are them. Even if they change, it's an improvement over a
non-existent exception name!
Found by Ruff checking F821.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
These files all use decorators (@asm_thumb, @asm_pio) that add names to the
function scope, that the linter cannot see.
It's useful to clear them in the file not in pyproject.toml as example code
will be copied and adapted elsewhere, and those developers may also use
Ruff (we hope!)
Signed-off-by: Angus Gratton <angus@redyak.com.au>
The call to machine_uart_deinit_all() is needed to avoid a crash after soft
reset, if a UART had been used and data arrives before it is instantiated
again.
Signed-off-by: robert-hh <robert@hammelrath.com>
It should be that:
- duty_u16=0: output low, no pulse
- duty_u16=65536: output high, no pulse
That previously did not apply to all of the three PWM mechanisms of this
port. This commit fixes it.
Signed-off-by: robert-hh <robert@hammelrath.com>
When called without a handler, the IRQ data was not cleared. That caused a
crash at the second soft reset in a row.
Signed-off-by: robert-hh <robert@hammelrath.com>
To be consistent with the other partitions files (which have the "-
{2,8,16,32}MiB" suffix). Also renames partitions-ota.csv.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Unsure of the history of the ESP32_S2_WROVER board (and why it wasn't
named GENERIC_S2_...) but now it's a variant of the generic S2 board.
Also removes the non-existent CONFIG_USB_AND_UART from all S2 boards.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
As the IDF no longer supports earlier revisions of the C3 by default, we
now just explicitly support rev 3+ and enable USB (which wasn't supported
in earlier revisions).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This is difficult to implement on cmake-based ports, and having the list
of variants in mpconfigboard.{cmake,mk} duplicates information that's
already in board.json.
This removes the existing query-variants make target from stm32 & rp2
and the definition of BOARD_VARIANTS from the various board files.
Also renames the cmake variable to MICROPY_BOARD_VARIANT to match other
variables such as MICROPY_BOARD. The make variable stays as
BOARD_VARIANT.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Otherwise the compiler may inline the gc_collect_inner() function and/or
remove the recursion, which is necessary to spill all the windowed
registers to the C stack.
Signed-off-by: Damien George <damien@micropython.org>
Via MICROPY_GC_SPLIT_HEAP_AUTO feature flag added in previous commit.
Tested on ESP32 GENERIC_SPIRAM and GENERIC_S3 configurations, with some
worst-case allocation patterns and the standard test suite.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Also shrinks the "prefer internal" threshold to 8KB, any allocation larger
than this will try PSRAM first.
Change the mbedTLS config to use regular malloc() as well, instead of
internal only. The default is set to internal-only due to to potential
physical security issue of readout via PSRAM on the original ESP32.
However, as MicroPython runs from plaintext flash and all other context is
in the MP heap of PSRAM then it's hard to see how worsens physical security
for MP.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
When set, the split heap is automatically extended with new areas on
demand, and shrunk if a heap area becomes empty during a GC pass or soft
reset.
To save code size the size allocation for a new heap block (including
metadata) is estimated at 103% of the failed allocation, rather than
working from the more complex algorithm in gc_try_add_heap(). This appears
to work well except in the extreme limit case when almost all RAM is
exhausted (~last few hundred bytes). However in this case some allocation
is likely to fail soon anyhow.
Currently there is no API to manually add a block of a given size to the
heap, although that could easily be added if necessary.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit:
- Breaks up some long lines for readability.
- Fixes a potential macro argument expansion issue.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit:
- Finds a common set of board feature tags and maps existing features to
that reduced set.
- Removes some less-useful board feature tags.
- Ensures all MCUs are specified correctly.
- Ensures all boards have a vendor (and fixes some vendor names).
This is to make the downloads page show a less intimidating set of filters.
Work done in conjunction with Matt Trentini <matt.trentini@gmail.com>.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Otherwise `mpremote soft-reset` will implicitly run the repl command.
Fixes issue #10871.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>