Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Update #14

Open
wants to merge 4,224 commits into
base: master
Choose a base branch
from
Open

Test Update #14

wants to merge 4,224 commits into from

Conversation

maxpromer
Copy link
Member

No description provided.

@iPAS
Copy link

iPAS commented Aug 22, 2024

The current version (before the incoming merge) has a bug while trying to compile ports/unix.
I guess this is because of this repo is lacking behind the original which has changed the directory name from 'lib' -> 'extmod', so that AXTLS library includes a file from the wrong path.

I have to edit the code of the AXTLS library:

-------------------------- ssl/os_port_micropython.h --------------------------
index 88697f2..7d10cd9 100644
@@ -75,7 +75,7 @@ extern int mp_stream_errno;

#define TTY_FLUSH()

-#include "../../../extmod/crypto-algorithms/sha256.h"
+#include "../../../lib/crypto-algorithms/sha256.h"

#define SHA256_CTX CRYAL_SHA256_CTX
#define SHA256_Init(a) sha256_init(a)

agatti and others added 29 commits September 23, 2024 13:03
This commit adds the `VIRT_RV32` board to the list of targets for
calculating code size changes as part of the CI pipeline.

Signed-off-by: Alessandro Gatti <[email protected]>
The UART driver enables a pull-up on RX/CTS pins by default.  This can
cause UART to fail to receive in certain situations, eg with RS485
transceivers.

This commit adds compile-time configuration options to set the pull mode on
the RX and CTS pins of each UART.

Signed-off-by: iabdalkader <[email protected]>
These allow a board to perform actions before/after stop mode.

Signed-off-by: iabdalkader <[email protected]>
Changes are:
- Add pre/post stop mode entry macros.
- Make SE05X pin accessible.
- Remove duplicate HAL macros.

Signed-off-by: iabdalkader <[email protected]>
Changes are:
- Add pre/post stop mode entry macros.
- Make SE05X pin accessible.
- Remove duplicate HAL macros.

Signed-off-by: iabdalkader <[email protected]>
To remove duplicate HAL macros.

Signed-off-by: iabdalkader <[email protected]>
The renesas-ra port board definitions contain auto-generated files which
are not easy to understand for someone unfamiliar with the port.  This
commit adds some notes to the README to assist other developers who want to
work on these.

The configuration.xml file for the `ARDUINO_PORTENTA_C33` was provided by
@iabdalkader.

Signed-off-by: Andrew Leech <[email protected]>
* configuration.xml: Generated by RA Smart Configurator for FSP 4.4.

Signed-off-by: Takeo Takahashi <[email protected]>
Most ports using TinyUSB now schedule the USB tasks from the USB interrupt.
This commit updates the renesas-ra port to use this new pattern.

Signed-off-by: Andrew Leech <[email protected]>
A positive result here can result in eventual memory corruption
as littlefs expects the result of a cache read/write function to be
0 or a negative integer for an error.

Closes #13046

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
- Code size saving as all of these functions are very similar.
- Resolves the "TODO" of the plain read and write functions not propagating
  errors. An error in the underlying block device now causes VFatFs to
  return EIO, for example.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
This tracing was originally needed for three reasons:

1. To trace object/raw-code pointers embedded in native code, eg from
   @micropython.native functions.

2. To trace pointers to BSS/rodata from relocated viper code.

3. For libffi tracing.

The tracing in point 1 was made unnecessary long ago in commit
7d4b6cc (see also commit
bbccb0f which removed scanning of native
code on the esp8266 port).

Since the previous commit, point 2 is no longer needed.

For point 3, this was made unnecessary in the recent commit
9796625.

Signed-off-by: Damien George <[email protected]>
lwIP was recently updated in a89ac9e
to STABLE-2_2_0_RELEASE, and this introduced a change in the configuration
variable `DHCP_DOES_ARP_CHECK`, renaming it to `LWIP_DHCP_DOES_ACD_CHECK`.

This commit fixes the ports lwIP settings to use the new configuration
option.

Without this option, connecting to a WiFi access-point takes about 12.5
seconds.  With this option (ie disabling DHCP ARP checks) connecting takes
about 4 seconds.

Tested on an RPI_PICO_W and PYBD_SF2.

Signed-off-by: Damien George <[email protected]>
Includes support for RP2350, and improvements for ESP32.

Signed-off-by: Damien George <[email protected]>
The old configuration option has been removed from TinyUSB.

Signed-off-by: Damien George <[email protected]>
This commit fixes the addition of a stray separator before the number
when printing an MPZ-backed integer and the first group is three digits
long.

This fixes #8984.

Signed-off-by: Alessandro Gatti <[email protected]>
Necessary to fix "mpremote run" over hardware UART.

Bisect shows bug was introduced by d420b4e, but looks like made more
complex by 01c046d. Specifically: resetting and re-initialising the REPL
UART during soft reset clears the FIFO before it's done printing the "MPY:
soft reboot" line.

Fixed by adding a UART TX flush in the deinit path.

Signed-off-by: Angus Gratton <[email protected]>
The ESP32 port contains a workaround to avoid having a certain function
in `py/parse.c` being generated incorrectly.  The compiler in question
is not part of any currently supported version of ESP-IDF anymore, and the
problem inside the compiler (well, assembler in this case) has been
corrected a few years ago.

This commit removes all traces of that workaround from the source tree.

Signed-off-by: Alessandro Gatti <[email protected]>
Zephyr v3.1.0 moved all public headers to include/zephyr. Updates a few
Zephyr include paths that were missed in
4fd54a4.

Signed-off-by: Maureen Helm <[email protected]>
Zephyr v3.2.0 deprecated include/zephyr/zephyr.h in favor of
include/zephyr/kernel.h since it only included that header.

Signed-off-by: Maureen Helm <[email protected]>
Zephyr v3.2.0 deprecated the devicetree label property as a base
property, which had been used as the device name string for
device_get_binding(). The device name string is now the devicetree node
name appended with its unit-address. Update Zephyr port documentation
to reflect this change.

Signed-off-by: Maureen Helm <[email protected]>
Zephyr v3.2.0 deprecated FLASH_AREA macros in favor of FIXED_PARTITION
macros, using node labels instead of node label properties to reference
flash storage partitions.

Signed-off-by: Maureen Helm <[email protected]>
Zephyr v3.4.0 changed the declaration of the main function to return an
int to allow building Zephyr without the -ffreestanding compiler flag.

Signed-off-by: Maureen Helm <[email protected]>
Zephyr v3.4.0 changed the SPI chip select from a pointer to a struct
member to allow using the existing SPI dt-spec macros in C++.

Signed-off-by: Maureen Helm <[email protected]>
Upgrades CI to use the latest versions of the Zephyr docker image and
Zephyr SDK.

Signed-off-by: Maureen Helm <[email protected]>
Updates the Zephyr port build instructions and CI to use the latest
Zephyr release tag.

Tested on frdm_k64f.

Signed-off-by: Maureen Helm <[email protected]>
iabdalkader and others added 30 commits December 10, 2024 10:37
Changes:
- Enable hardware timer.
- Define LED pins.

Signed-off-by: iabdalkader <[email protected]>
Add a compile-time config option to soft-reset SPI flash on init.  This
puts the flash in a known state on reset.  Note this option is
disabled by default.

Signed-off-by: iabdalkader <[email protected]>
Update ARDUINO_GIGA, ARDUINO_OPTA, ARDUINO_NICLA_VISION and
ARDUINO_PORTENTA_H7 to:
- Enable SPI flash soft-reset.
- Disable enter bootloader via reset.

Signed-off-by: iabdalkader <[email protected]>
Refresh count calculations were using a hard-coded SDRAM frequency and
refresh cycles, so change them to values that can be set by a board.

And set these options to their existing values on STM32F769DISC and
STM32F7DISC boards.

Signed-off-by: iabdalkader <[email protected]>
SPI objects can remain active after a soft-reboot because they are
statically allocated and lack a finalizer to collect and deinitialize them.
This commit adds a `spi_deinit_all()` functions for SPI, similar to other
peripherals such as UART, DAC, etc.

Signed-off-by: iabdalkader <[email protected]>
I2C objects can remain active after a soft-reboot because they are
statically allocated and lack a finalizer to collect and deinitialize them.
This commit adds a `pyb_i2c_deinit_all()` function for I2C, similar to
other peripherals such as UART, DAC, etc.

Signed-off-by: iabdalkader <[email protected]>
Following UART, CAN, Timer, etc.

Signed-off-by: iabdalkader <[email protected]>
LFN type 2 uses the stack to allocate the internal working buffer for LFN,
which is thread-safe and saves about 512 bytes of BSS memory (at the
expense of needing that much memory on the stack).

Signed-off-by: iabdalkader <[email protected]>
LFN type 2 uses the stack to allocate the internal working buffer for LFN,
which is thread-safe and saves about 512 bytes of BSS memory (at the
expense of needing that much memory on the stack).

Signed-off-by: iabdalkader <[email protected]>
LFN type 2 uses the stack to allocate the internal working buffer for LFN,
which is thread-safe and saves about 512 bytes of BSS memory (at the
expense of needing that much memory on the stack).

Signed-off-by: iabdalkader <[email protected]>
Make this port use the same FATFS config as stm32, rp2, renesas-ra.

Signed-off-by: iabdalkader <[email protected]>
When a wrapped symbol is provided in its own file, it's possible for the
linker to skip that file entirely and not return to it depending on the
order of libraries passed on the linker command line.

This is because these wrapped symbols create linker cycles (libmain_espXX
depends on liblwip but liblwip now also depends on libmain for the wrapped
functions in lwip_patch.c, for example.)

Linker failure for symbols in lwip_patch.c was reproducible if mDNS was
disabled in the board configuration.

This commit adds an explicit undefined symbol for each file, to ensure
the linker will add the wrapped objects on its first pass.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
Signed-off-by: Andrew Leech <[email protected]>
Signed-off-by: Damien George <[email protected]>
Allows verbose build to work the same on esp32 port as other ports.

To minimise copy/paste, split the BUILD_VERBOSE section of mkenv.mk
out to its own verbose.mk and include this in the port Makefile.

Signed-off-by: Angus Gratton <[email protected]>
Similar to esp32. Previously rp2 could build verbose by passing VERBOSE=1,
which is picked up by Makefiles generated from CMake.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
Use an explicit cast to suppress the implicit conversion which started
popping up in recent compiler versions (and wasn't there yet in 07bf317).

Signed-off-by: stijn <[email protected]>
This commit fixes a compile error happening on Clang when building the
generic gchelper code for AArch32.

Clang would raise a warning regarding undefined variable access when
aliasing a variable to an existing CPU register.  The fix is pretty
crude but it works - it simply disables the warning in question for the
AArch32 gchelper collection function.  Care was taken to make sure the
code would also compile on GCC without warnings of sorts.

Signed-off-by: Alessandro Gatti <[email protected]>
This commit fixes a warning occurring on Clang when calling
`__builtin___clear_cache` with non-void pointers for its start and end
memory area locations.  The code now uses a char pointer for the end
location, and it still builds without warnings on GCC.

Signed-off-by: Alessandro Gatti <[email protected]>
This commit lets the platform module report a more accurate architecture
name when running on a RISC-V 64 bits platform.

Signed-off-by: Alessandro Gatti <[email protected]>
The current documentation for the `machine.RTC` class contains information
about the `RTC.cancel` method for cancelling pending alarms.

However only two ports (cc3200 and mimxrt) implement this functionality
but under a different name: `RTC.alarm_cancel`.  The mimxrt port also
implements `RTC.cancel` but it is aliased to `RTC.alarm_cancel` anyway.

To maintain naming consistency, this commit updates the documentation to
officially define `RTC.alarm_cancel` as the method to call to cancel
pending alarms and deprecates mimxrt's `RTC.cancel` implementation.
`RTC.cancel` in the mimxrt port is thus scheduled for removal in
MicroPython v2.

Signed-off-by: Alessandro Gatti <[email protected]>
MicroPython relies on a number of submodules for third party and chip
vendor libraries.  Users need to check these out before building their
desired ports and Github Actions CI here needs to clone them all multiple
times for every build.  Many of these are getting significantly larger over
time, slowing down usage and consuming more disk space.

Newer versions of git have features to avoid pulling all historic / blob
data which can have a significant impact of total data use.  This commit
uses a standard feature of git to do a partial clone, with automatic
fallback to previous behavior on error.

Signed-off-by: Andrew Leech <[email protected]>
This updates esp32 code where appropriate to replace ifdef's based on a
list of specific chips with a feature SOC_* definition.  This should
simplify adding new esp32-* chips in future, deferring chip feature support
to the IDF.

Signed-off-by: Andrew Leech <[email protected]>
When threading is disabled, the pending events handling code would wait
for an incoming interrupt once there's no more work to do.  This bit of
code was Xtensa-specific and wouldn't compile on a RISC-V based MCU.

This commit provides the RISC-V equivalent to that part of the code,
allowing to make threadless MicroPython builds on RISC-V based MCUs.

Signed-off-by: Alessandro Gatti <[email protected]>
Specifically, remove all conditional compilation for these earlier versions
and change the idf_component.yml specifiers to require >=5.2.0.

Signed-off-by: Angus Gratton <[email protected]>
This reverts commit 27279e6
(plus removes some additional references to the
SDKCONFIG_IDF_VERSION_SPECIFIC CMake variable.)

Relevant sdkconfig options are added into sdkconfig.base now
that IDF >=5.2.0 is required.

Signed-off-by: Angus Gratton <[email protected]>
Now we only support the case of
!CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP, can simplify
the cleanup code.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
Define SDRAM frequency and refresh cycles.  This was missed in commit
17808e7.

Signed-off-by: iabdalkader <[email protected]>
This adds a hardware test for `machine.PWM`.  It requires a jumper wire
between two pins, uses `machine.PWM` to output on one of them, and
`machine.time_pulse_us()` to time the PWM on the other pin (some boards
test more than one pair of pins).

It times both the high and low duty cycle (and hence the frequency) for a
range of PWM frequencies and duty cycles (including full on and full off).

Currently supported on:
- esp32 (needs a minor hack for initialisation, and some tests still fail)
- esp8266 (passes for frequencies 1kHz and less)
- mimxrt / Teensy 4.0 (passes)
- rp2 (passes)
- samd21 (passes for frequencies 2kHz and less)

Signed-off-by: Damien George <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.