This commit simplifies the customisation of the main MicroPython execution
loop (4 macros are reduced to 2), and allows a board to have full control
over the execution (or not) of boot.py and main.py.
For boards that use the default start-up code, there is no functional
change in this commit.
Signed-off-by: Damien George <damien@micropython.org>
This update to the PR retains the earlier board rev (with a rename) so
that backward binary compatibility is not lost for the earlier board
revision. The primary name 'vina-d51' is retained for the latest
revision to make it easy for customers to select the proper UF2
download - because the name matches the commercial name.
Details:
Replace bdmicro_vina_d51 with bdmicro_vina_d51_pcb7 (revision 7 of
PCB) with boardfiles unmodified. Add _pcb7 to the workflow build.
Replace bdmicro_vina_d51 boardfile content with latest PCB updates
(revision 10 ov PCB). Add minimal comments in the board files to make
it clear which PCB revision is implemented. Update the USB PID to
reflect an updated board revision.
Per CPython everything which comes after the command, module or file
argument is not an option for the interpreter itself. Hence the processing
of options should stop when encountering those, and the remainder be passed
as sys.argv. Note the latter was already the case for a module or file but
not for a command.
This fixes issues like 'micropython myfile.py -h' showing the help and
exiting instead of passing '-h' as sys.argv[1], likewise for
'-X <something>' being treated as a special option no matter where it
occurs on the command line.
Some forum users noticed that `sm.exec()` took longer the more was present
on the flash filesystem connected to the RP2040. They traced this back to
the `array` import inside `asm_pio()`, which is causing MicroPython to scan
the filesystem.
uarray is a built-in module, so importing it shouldn't require scanning the
filesystem.
We avoid moving the import to the top-level in order to keep the namespace
clean; we don't want to accidentally expose `rp2.array`.
Support for C++ was added in 97960dc7de but
that commit didn't include the C++ exception handling table in the binary
firmware image. This commit fixes that.
Signed-off-by: Damien George <damien@micropython.org>
This is a workaround for errata RP2040-E5, and is needed to make USB more
reliable on certain USB ports.
Signed-off-by: Damien George <damien@micropython.org>
ESP-01 header renamed to AUX, and expanded to 12 pins from 8
pins. Pins 1-8 still accommodate the ESP-01, with expansion to full
SERCOM 4-pad support to allow for SPI and I2C on that expansion port
with additional GPIO control.
Update pins.c with additional signals provided AUX_1-8, along with
UART, SPI, I2C name usage as aliases to appropriate AUX_1-8
signals. Additionally, add several alternate names specific to several
expansion modules - the ESP-01, and the ATW-01 using the WINC_1500
(SPI) w/interrupt and control needed for the WINC - with assignments
to module pin positions.
Re-work SERCOM assignments to accommodate the above from other parts
of the board, which required moving a SERCOM or two around in order to
accommodate the 4-pad sercom pin mapping on the AUX port.
Built and tested using latest from 'main':
Adafruit CircuitPython 6.2.0-rc.0-70-ga1562430f-dirty on 2021-04-05;
BDMICRO VINA-D51 with samd51n20
After this change, the following program works for me on the MIMXRT1010-EVK:
```python
import pwmio
import board
p = pwmio.PWMOut(board.D13, frequency=1_000_000, variable_frequency=True)
p.duty_cycle = 32868
while True:
pass
```
Querying and varying the duty_cycle and frequency work as well.
The lowest frequency obtainable is about 2kHz; there is an additional
divider which would allow lower PWM frequencies (I think 1kHz is important
for servos?)
Something odd happens with very low duty cycles, such as
```python
>>> p.frequency = 2000
>>> p.duty_cycle = 2
```
instead of a symmetrical waveform, it's asymmetrical. With `duty_cycle=4`,
the effect disappears. The reason for this is probably hidden in the
datasheet, but could affect servos or other things that count pulse
widths.
It's a bit of a pitfall with user C modules that including them in the
build does not automatically enable them. This commit changes the docs and
examples for user C modules to encourage writers of user C modules to
enable them unconditionally. This makes things simpler and covers most use
cases.
See discussion in issue #6960, and also #7086.
Signed-off-by: Damien George <damien@micropython.org>
It was noticed that the esp32 port didn't build ulab correctly. The
problem was a multiple defintion of the 'mp_hal_stdout_tx_str' and
'mp_hal_stdout_tx_strn_cooked' functions.
They were defined in stdout_helpers.c but also in the
ports/esp32/mphalport.c.
Fixed by removing stdout_helpers.c from the build.
Signed-off-by: Michael O'Cleirigh <michael.ocleirigh@rivulet.ca>
Support for User C and C++ modules was lost due to upgrading the esp32 to
the latest CMake based IDF from the GNUMakefile build process.
Restore the support for the esp32 port by integrating with the approach
recently added for the rp2 port.
Signed-off-by: Michael O'Cleirigh <michael.ocleirigh@rivulet.ca>
This allows more options to be overridden to 0 in an mpconfigboard.mk.
Improved:
* FRAMEBUFFERIO, FULL_BUILD, BITOPS, PWMIO, RGBMATRIX, OTARYIO, PULSEIO, WATCHDOG
Still problematic (pull requests welcome):
* RP2PIO & NEOPIXEL_WRITE, possibly only if a status neopixel is defined
* BITBANGIO, possibly only if BUSIO is enabled
* RTC
Incidentally, with RP2PIO & NEOPIXEL_WRITE, BITBANGIO, and RTC re-enabled I get
```
323956 bytes used, 720524 bytes free in flash firmware space out of 1044480 bytes (1020.0kB).
12072 bytes used, 250072 bytes free in ram for stack and heap out of 262144 bytes (256.0kB).
```
Closes#4515
This USB feature is currently not supported. With this flag enabled (and
the feature not implemented) the USB serial will stop working if there is a
delay of more than about 2 seconds between messages, which can occur with
USB autosuspend enabled.
Fixes issue #6866.
The parts that are generic are added to py/ so they can be used by other
ports that use CMake.
py/usermod.cmake:
* Creates a usermod target to hang user C/CXX modules from.
* Gathers sources from user C/CXX modules and libs for QSTR scan.
ports/rp2/CMakeLists.txt:
* Includes py/usermod.cmake.
* Links the resulting usermod library to the MicroPython target.
py/mkrules.cmake:
Add cxxflags to qstr.i.last custom command for CXX modules:
* MICROPY_CPP_FLAGS so CXX modules will find includes.
* -DNO_QSTR to fix fatal error missing "genhdr/qstrdefs.generated.h".
Usage:
The rp2 port can be linked against user C modules by running:
make USER_C_MODULES=/path/to/module/micropython.cmake
CMake will print a list of included modules.
Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.org>
Co-authored-by: Michael O'Cleirigh <michael.ocleirigh@rivulet.ca>
Signed-off-by: Phil Howard <phil@pimoroni.com>
Set the betweenTransferDelay to the SCK low-time, to avoid long pauses
between bytes (transfers) while preventing the last SCK cycle in a byte
from being a runt pulse.
Compared to an earlier revision of this change, which just set the delays
all to zero, this doesn't break using an AirLift, which was sensitive
to the runt pulses (the simple loopback-wire test didn't detect the problem)
without this, the baud rate could be wrong; in my testing, it was
low by a factor of 2 when requesating baudrate=1_000_000 (1MHz).
When passing the baudrate in to LPSPI_MasterInit, the setting is made
automatically, but LPSPI_MAster_SetBaudRate just returns it via the
out-parameter tcrPrescaleValue.
There are DNP resistors on the MIMXRT1010-EVK board (see SCH-45852)
that lead to these pins on the arduino-style header not being connected
through. In theory someone could populate them, but as it the presence
of these names in the pins module caused problems when they didn't work
as expected.
Closes#3012
This commit simplifies and cleans up the bare-arm port, and adds just
enough system and library code to make it execute on an STM32F405 MCU.
The mpconfigport.h configuration is simplified to just specify those
configuration values that are different from the defaults. And the
addition of -fdata-sections and -ffunction-sections means the final
firmware is smaller than it previously was, by about 4200 bytes.
A README is also added.
Signed-off-by: Damien George <damien@micropython.org>
This switches stage2 to C and uses Jinja to change the C code based
on flash settings from https://github.com/adafruit/nvm.toml. It
produces the fastest settings for the given set of external flashes.
Flash size is no longer hard coded so switching flashes with similar
capabilities but different sizes should *just work*.
This PR also places "ITCM" code in RAM to save the XIP cache for
code execution. Further optimization is possible. A blink code.py
still requires a number of flash fetches every blink.
Fixes#4041
The I2C.c for RP2040 included a special case for writes <=2 bytes to match the MicroPython implementation,
however RP2040 does support 1 and 2 byte reads, with only 0 bytes being the exception.
Signed-off-by: Philip Howard <phil@pimoroni.com>
The GNU Make dir command uses spaces as item separator so it does not
work for e.g building the STM32 port on Cygwin with a default Arm
installation in "c:/program files (x86)/GNU Arm Embedded Toolchain".
Fix by using POSIX dirname on a quoted path instead.
When UART is used for REPL and the MCU frequency is changed, the UART
has to be re-initialised. Besides that the UART may have to be recreated
after a frequency change, but with USB REPL this is not a problem.
Thanks to @HermannSW for spotting and providing the change.
Using the standard machine.freq().
The safe ranges tested were 10 and 12-270MHz, at which USB REPL still
worked. Requested settings can be checked with the script:
pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py. At frequencies
like 300MHz the script still signaled OK, but USB did not work any more.
sm.get(buf) was waiting for one item more than the length of the supplied
buffer. Even if this item was not stored, sm_get would block trying to get
an item from the RX fifo.
As part of the fix, the edge case for a zero length buffer was moved up to
the section where the function arguments are handled. In case of a zero
length buffer, sm.get() now returns immediately that buffer.
The bitmasks supplied for initialization of out/set/sideset were only 8 bit
instead of 32. This resulted in an error, that not more than 8 consecutive
pins would get initialized.
Fixes issue #6933.
Until a time is set, the RTC is not running, and rtc_get_datetime()
returns false without assigning to the out-parameter.
In CircuitPython, this would manifest as arbitrary values being returned,
since uninitialized storage on the stack was being converted into a timestamp.
The rp2040 is _very_ marginal for mp3 playback, and currently sometimes triggers a bug that gives garbled audio output. However, it does work for some limited situations.
This allows the user to enable wake-up sources using the EWUP bits, on F7
MCUs.
Disabling the wake-up sources while clearing the wake-up flags follows the
reference manual and ST examples.
state.reset_mode is updated by `MICROPY_BOARD_BEFORE_SOFT_RESET_LOOP` but
not passed to `init_flash_fs`, and so factory reset is not executed on
boards that do not have a bootloader. This bug was introduced by
4c3976bbcaFixes#6903.
A corrupt filesystem may lead to a request for a block which is out of
range of the block device limits. Return an error instead of passing the
request down to the lower layer.
Any two consecutive pins can be used for an IncrementalEncoder
Testing performed: Put a synthesized (few hundred counts per second) quadrature signal into GP2/3 and read the encoder out. Performed filesystem operations at the same time to stress test it.
The reasons for not using common_hal_rp2pio_statemachine_readinto are commented on.
This can be used where the standard API calls for a list of pins, to check that they satisfy the requirements of the rp2pio state machine, e.g.,
```python
def __init__(self, pin_a, pin_b):
if not rp2pio.pins_are_sequential([pin_a, pin_b]):
raise ValueError("Pins must be sequential")
```
Presumably, switching it to generic hurt performance a bit.
I verified that the build-raspberry_pi_pico/boot2_padded_checksummed.S
built file has the same checksum as the old
bs2_default_padded_checksummed.S
.. all the necessary steps to transform it into a padded, checksummed
file are now done by the build system.
Since it is assigned by "?=", it _should_ be the case that individual
builds can override it.
I did not "test" this per se, but it gives the same content and checksum
(except for the identifying comment with a path) as #4302.
Two of the defaults have also changed in this commit:
- MICROPY_HW_RFCORE_BLE_LSE_SOURCE changed from 1 to 0, which configures
the LsSource to be LSE (needed due to errata 2.2.1).
- MICROPY_HW_RFCORE_BLE_VITERBI_MODE changed from 0 to 1, which enables
Viterbi mode, following all the ST examples.
Signed-off-by: Damien George <damien@micropython.org>
* Always clear the peripheral interrupt so we don't hang when full
* Store the ringbuf in the object so it gets collected when we're alive
* Make UART objects have a finaliser so they are deinit when their
memory is freed
* Copy bytes into the ringbuf from the FIFO after we read to ensure
the interrupt is enabled ASAP
* Copy bytes into the ringbuf from the FIFO before measuring our
rx available because the interrupt is based on a threshold (not
> 0). For example, a single byte won't trigger an interrupt.
This adds I2SOut and PDMIn support via PIO.
StateMachines can now:
* read and read while writing
* transfer in 1, 2 or 4 byte increments
* init pins based on expected defaults automatically
* be stopped and restarted
* rxfifo can be cleared and rxstalls detected (good for tracking when
the reading code isn't keeping up)
Fixes#4162
These ports already have uzlib enabled so this additional ubinascii.crc32
function only costs about 90 bytes of flash.
Signed-off-by: Damien George <damien@micropython.org>
Add LPUART1 as a standard UART. No low power features are supported, yet.
LPUART1 is enabled as the next available UART after the standard U(S)ARTs:
STM32WB: LPUART1 = UART(2)
STM32L0: LPUART1 = UART(6)
STM32L4: LPUART1 = UART(6)
STM32H7: LPUART1 = UART(9)
On all ports: LPUART1 = machine.UART('LP1')
LPUART1 is enabled by defining MICROPY_HW_LPUART1_TX and
MICROPY_HW_LPUART1_RX in mpconfigboard.h.
Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
This commit fixes two issues on the esp32:
- it enables machine.soft_reset() to be called in main.py;
- it enables machine.reset_cause() to correctly identify a soft reset.
The former is useful in that it enables soft resets in applications that
are started at boot time. The support is patterned after the stm32 port.
This commit implements basic NVS support for the esp32. It follows the
pattern of the esp32.Partition class and exposes an NVS object per NVS
namespace. The initial support provided is only for signed 32-bit integers
and binary blobs. It's easy (albeit a bit tedious) to add support for
more types.
See discussions in: #4436, #4707, #6780
This enables -Os for compilation, but still keeps full assertion messages.
With IDF v4.2, -Os changes the GENERIC firmware size from 1512176 down to
1384640, and the GENERIC_SPIRAM firmware is now 1452320 which fits in the
allocated partition.
Signed-off-by: Damien George <damien@micropython.org>
So that mboot can be used to program encrypted/signed firmware to regions
of flash that are not the main application, eg that are the filesystem.
Signed-off-by: Damien George <damien@micropython.org>
Since the datasheet cast some doubt on the strength of the "rosc_hw->randombit",
I use the SHA256 hash function to create a high quality random seed
from random values of uncertain entropy, as well as to generate a sequence
of random values from that seed using SHA256 as a cryptographically-secure
random number generator.
In practice, it produces over 100kB/s of random data which does not
have any gross problems according to _PractRand_.
The default for these is to enable them, but they can now be disabled
individually by a board configuration.
Signed-off-by: Damien George <damien@micropython.org>
If a board defines USBD_VID then that will be used instead of the default.
And then the board must also define all USBD_PID_xxx values that it needs.
Signed-off-by: Damien George <damien@micropython.org>
The following simple usocket example throws an error EINVAL on connect
import usocket
s = usocket.socket()
s.connect(usocket.getaddrinfo('www.micropython.org', 80)[0][-1])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] EINVAL
Fixing the context parameter in calls of net_context_get_family() and
net_context_get_type(), the connect works fine.
Tested on a nucleo_h743zi board.
Refactors the zephyr build infrastructure to build MicroPython as a
cmake target, using the recently introduced core cmake rules.
This change makes it possible to build the zephyr port like most other
zephyr applications using west or cmake directly. It simplifies building
with extra cmake arguments, such as specifying an alternate conf file or
adding an Arduino shield. It also enables building the zephyr port
anywhere in the host file system, which will allow regressing across
multiple boards with the zephyr twister script.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Disables frozen source modules in the zephyr port. They are deprecated
in the makefile rules and not implemented in the new cmake rules.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The underlying OS (the ESP-IDF) uses it's own internal errno codes and so
it's simpler and cleaner to use those rather than trying to convert
everything to the values defined in py/mperrno.h.
It's now replaced by cmake/idf.py. But a convenience Makefile is still
provided with traditional targets like "all" and "deploy".
Signed-off-by: Damien George <damien@micropython.org>
This commit adds support for building the esp32 port with cmake, and in
particular it builds MicroPython as a component within the ESP-IDF. Using
cmake and the ESP-IDF build infrastructure makes it much easier to maintain
the port, especially with the various new ESP32 MCUs and their required
toolchains.
Signed-off-by: Damien George <damien@micropython.org>
This allows changing the baudrate of the UART without reinitialising it
(reinitialising can lead to spurious characters sent on the TX line).
Signed-off-by: Damien George <damien@micropython.org>
Also found a race condition between timer_disable and redraw, which
would happen if I debugger-paused inside common_hal_rgbmatrix_timer_disable
or put a delay or print inside it. That's what pausing inside reconstruct
fixes.
So that the "right timer" can be chosen, `timer_allocate` now gets the `self`
pointer. It's guaranteed at this point that the pin information is accurate,
so you can e.g., find a PWM unit related to the pins themselves.
This required touching each port to add the parameter even though it's
unused everywhere but raspberrypi.
On i.MX the SysTick IRQ cannot wake the CPU from a WFI so the CPU was
blocked on WFI waiting for USB data in mp_hal_stdin_rx_chr() even though it
had already arrived (because it may arrive just after calling the check
tud_cdc_available()). This commit fixes this problem by using SEV/WFE to
indicate that there has been a USB event.
The mp_hal_stdout_tx_strn() function is also fixed so that it doesn't
overflow the USB buffers.
Signed-off-by: Damien George <damien@micropython.org>
So that all MicroPython ports that use tinyusb use the same version. Also
requires fewer submodule checkouts when building rp2 along with other ports
that use tinyusb.
Signed-off-by: Damien George <damien@micropython.org>
START_SEC was changed in e0905e85a7.
Also, update the error message to mention how to format the partition at
the REPL, and make the total message shorter to save a bit of flash.
Signed-off-by: Damien George <damien@micropython.org>
@Jerryneedell noticed that this problem affected strips short enough
to not use the DMA peripheral, thanks for the hot tip!
Instead of checking for background tasks after every byte transfer,
try up to 32 transfers before attending to background tasks.
This fixes the problem I was seeing on my 5-pixel circuit.
Closes#4135.
Add SMPS mode pin to Raspi Pico pins.c; see section "4.3. Using the ADC" of the Pico datasheet for discussion.
Driving this pin high forces the onboard regulator into a lower noise PWM mode.
This makes all the following work:
* normal microcontroller.reset()
* reset into safe mode or UF2 bootloader via microcontroller.on_next_reset()
* reset into UF2 bootloader via the "1200 baud trick"
The implementation of reset_cpu is from micropython.
In particular the firmware can now be built in a build directory that lives
outside the source tree, and the py/modarray.c file will still be found.
See issue #6837.
Signed-off-by: Damien George <damien@micropython.org>
The "word" referred to by BYTES_PER_WORD is actually the size of mp_obj_t
which is not always the same as the size of a pointer on the target
architecture. So rename this config value to better reflect what it
measures, and also prefix it with MP_.
For uses of BYTES_PER_WORD in setting the stack limit this has been
changed to sizeof(void *), because the stack usually grows with
machine-word sized values (eg an nlr_buf_t has many machine words in it).
Signed-off-by: Damien George <damien@micropython.org>
To simplify config, there's no need to specify MP_PLAT_PRINT_STRN if it's
the same as the default definition in py/mpconfig.h.
Signed-off-by: Damien George <damien@micropython.org>
Otherwise it resets the ADC peripheral each time a new ADC object is
constructed, which can reset other state that has already been set up.
See issue #6833.
Signed-off-by: Damien George <damien@micropython.org>
Default to just calling python since that is most commonly available: the
official installer or zipfiles from python.org, anaconda, nupkg all result
in python being available but not python3. In other words: the default
used so far is wrong. Note that os.name is 'posix' when running the python
version which comes with Cygwin or MSys2 so they are not affected by this.
However of all possible ways to get Python on Windows, only Cygwin provides
no python command so update the default way for running tests in the
README.
With mboot encrpytion and fsload enabled, the DEBUG build -O0 compiler
settings result in mboot no longer fitting in the 32k sector. This commit
changes this to -Og which also brings it into line with the regular stm32
build.
MCUs with device-only USB peripherals (eg L0, WB) do not implement (at
least not in the ST HAL) the HAL_PCD_DisconnectCallback event. So if a USB
cable is disconnected the USB driver does not deinitialise itself
(usbd_cdc_deinit is not called) and the CDC driver can stay in the
USBD_CDC_CONNECT_STATE_CONNECTED state. Then if the USB was attached to
the REPL, output can become very slow waiting in usbd_cdc_tx_always for
500ms for each character.
The disconnect event is not implemented on these MCUs but the suspend event
is. And in the situation where the USB cable is disconnected the suspend
event is raised because SOF packets are no longer received.
The issue of very slow output on these MCUs is fixed in this commit (really
worked around) by adding a check in usbd_cdc_tx_always to see if the USB
device state is suspended, and, if so, breaking out of the 500ms wait loop.
This should also help all MCUs for a real USB suspend.
A proper fix for MCUs with device-only USB would be to implement or somehow
synthesise the HAL_PCD_DisconnectCallback event.
See issue #6672.
Signed-off-by: Damien George <damien@micropython.org>
PIO state machines can make a conditional jump on the state of a pin: the
`JMP PIN` command. This requires the pin to be configured with
`sm_config_set_jmp_pin`, but until now we didn't have a way of doing that
in MicroPython.
This commit adds a new `jmp_pin=None` argument to `StateMachine`. If it is
not `None` then we try to interpret it as a Pin, and pass its value to
`sm_config_set_jmp_pin`.
Signed-off-by: Tim Radvan <tim@tjvr.org>
Add "make submodules" to commands when building for the first time.
Otherwise, on a first time build, the submodules have not been checked out
and a lot of `fatal error: nrfx.h: No such file or directory` errors are
printed.
It practically does the same as qstr_from_str and was only used in one
place, which should actually use the compile-time MP_QSTR_XXX form for
consistency; qstr_from_str is for runtime strings only.
Don't clear the IPCC channel flag until we've actually handled the incoming
data, or else the wireless firmware may clobber the IPCC buffer if more
data arrives. This requires masking the IRQ until the data is handled.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit adds a new port "rp2" which targets the new Raspberry Pi RP2040
microcontroller.
The build system uses pure cmake (with a small Makefile wrapper for
convenience). The USB driver is TinyUSB, and there is a machine module
with most of the standard classes implemented. Some examples are provided
in the examples/rp2/ directory.
Work done in collaboration with Graham Sanderson.
Signed-off-by: Damien George <damien@micropython.org>
It's enabled by default to retain the existing behaviour. A board can
disable this option if it manages mounting the filesystem itself, for
example in frozen code.
Signed-off-by: Damien George <damien@micropython.org>
Changes are:
- refactor to use new _create_element function
- support extended version of MOUNT element with block size
- support STATUS element
Signed-off-by: Damien George <damien@micropython.org>
This new element takes the form: (ELEM_TYPE_STATUS, 4, <address>). If this
element is present in the mboot command then mboot will store to the given
address the result of the filesystem firmware update process. The address
can for example be an RTC backup register.
Signed-off-by: Damien George <damien@micropython.org>
Instead it is now passed in as an optional parameter to the ELEM_MOUNT
element, with a compile-time configurable default.
Signed-off-by: Damien George <damien@micropython.org>
The superblock for littlefs is in block 0 and 1, but block 0 may be erased
or partially written, so block 1 must be checked if block 0 does not have a
valid littlefs superblock in it.
Prior to this commit, if block 0 did not contain a valid littlefs
superblock (but block 1 did) then the auto-detection would fail, mounting a
FAT filesystem would also fail, and the system would reformat the flash,
even though it may have contained a valid littlefs filesystem. This is now
fixed.
Signed-off-by: Damien George <damien@micropython.org>
Totally untested, change request based on change made in #2581.
It might be my first PR in CircuitPython core...
Maybe this should be confirmed by @jamesbowman
Those are the two boards that seems supported:
* Metro M4 Express
* Metro nRF52840 Express
The only Metro that this PR concern:
* Metro M4 AirLift Lite
Other Metro I found and are maybe not supported:
* Metro ESP32-S2
* Metro M0 Express
* Metro M7 1011
* Fix a typo in the Makefile that prevented the debug build to be actually
enabled when BTYPE=debug is used.
* Add a missing header in modmachine.c that is used when a debug build is
created.
This commit improves some FTP implementation details for better
compatibility with FTP clients:
* The PWD command now puts quotes around the directory name before
returning it. This fixes BBEdit’s FTP client, which performs a PWD after
each CWD and gets confused if the returned directory path is not
surrounded by quotes.
* The FEAT command is now allowed before logging in. This fixes the lftp
client, which send FEAT first and gets confused (tries to use TLS) if the
server responds with 332.
With MICROPY_FLOAT_IMPL_FLOAT the results of utime.time(), gmtime() and
localtime() change only every 129 seconds. As one consequence
tests/extmod/vfs_lfs_mtime.py will fail on a unix port with LFS support.
With this patch these functions only return floats if
MICROPY_FLOAT_IMPL_DOUBLE is used. Otherwise they return integers.