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

Board support for Adafruit Grand Central M4 #7

Open
wants to merge 1,416 commits into
base: master
Choose a base branch
from

Conversation

graeme-winter
Copy link

Adds:

  • Adafruit grand central M4 board based on itsybitsy
  • Full pin list for board
  • Bug fixes for SAMD51 A0, A1 DAC

@graeme-winter graeme-winter force-pushed the adafruit-grand-central branch 11 times, most recently from 8cf4aee to 3315632 Compare March 27, 2023 08:49
@graeme-winter graeme-winter force-pushed the adafruit-grand-central branch 2 times, most recently from 598b551 to 1506cfb Compare April 4, 2023 07:25
@graeme-winter graeme-winter force-pushed the adafruit-grand-central branch 2 times, most recently from 73d09f1 to e348705 Compare April 27, 2023 10:39
@graeme-winter graeme-winter force-pushed the adafruit-grand-central branch 4 times, most recently from 77d211e to 8e97011 Compare June 10, 2023 06:27
sylvinus and others added 11 commits September 21, 2024 08:00
Enable support for cipher suites like
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, as suggested in
micropython#14204 (comment)
and micropython#10485 (comment)

Tests have been run on the top 500 domains from moz.com.  Without this
patch, 155 out of 500 fail to connect because of TLS issues.  This patch
fixes them all.  And it seems all existing mbedtls flags are needed to get
good coverage of those top 500 domains.

The `ssl_poll.py` test has the cipher bits increased from 512 to 1024 in
its test key/cert so that it can work with ECDHE-RSA which is now the
chosen cipher.

Signed-off-by: Sylvain Zimmer <[email protected]>
Signed-off-by: Damien George <[email protected]>
The `PIO_NUM` macro was defined when `rp2_pio.c` was first conceived.
There's now a Pico SDK function for this, `pio_get_index()`, which is
already used in some parts of the code.

This commit removes `PIO_NUM` in favour of using `pio_get_index()`
everywhere.

Signed-off-by: Phil Howard <[email protected]>
There are three changes here:
- Fix `rp2_pio_print` to use `pio_get_index()` too, since it had its own
  copy of the ternary expression.
- Remove a ternary from `rp2_pio_state_machine` and calculate it from
  `pio_get_index`.
- Remove a ternary on `GPIO_FUNC_PIO0` vs `GPIO_FUNC_PIO1`.  These
  constants are sequentially ordered so we can calculate them too.

Signed-off-by: Phil Howard <[email protected]>
The change closes the gap in the API when an integer is used as Pin
reference.  With the change, e.g. ADC(26), ADC(Pin(26)) and ADC("GP26")
behave identically and the GPIO is initialised in ACD/high-Z mode.

Only when using ADC channel numbers 0-3 are the corresponding GPIO left
uninitialised, and then the user is responsible for configuring the GPIO.

Signed-off-by: robert-hh <[email protected]>
There were lots of places where this pattern was duplicated, to convert a
standard C string to a MicroPython string:

    x = mp_obj_new_str(s, strlen(s));

This commit provides a simpler method that removes this code duplication:

    x = mp_obj_new_str_from_cstr(s);

This gives clearer, and probably smaller, code.

Signed-off-by: Jon Foster <[email protected]>
Use new function mp_obj_new_str_from_cstr() where appropriate.  It
simplifies the code, and makes it smaller too.

Signed-off-by: Jon Foster <[email protected]>
These were missed in the previous commit.

Signed-off-by: Damien George <[email protected]>
Because the main thread executes `thread_entry()` it means there's an
additional one added to `count`, so the test must wait for the count to
reach `n_thread + 1`.

Signed-off-by: Damien George <[email protected]>
higstar and others added 29 commits September 21, 2024 08:00
Added custom Multi OTG handling for STM32L452xx, based on STM32L432xx
handling.

Fixes issue micropython#15795.

Signed-off-by: Adrian Higgins <[email protected]>
The STM32F429DISC board definition did not have DAC enabled, however the
micro/board supports it so this commit enables the feature.

Signed-off-by: Matt Trentini <[email protected]>
Fix documentation to match behaviour (directories are not preserved).

Fixes issue micropython#11101.

Signed-off-by: Damien George <[email protected]>
The functionality is there but was not documented.

Signed-off-by: Damien George <[email protected]>
Original commit was by @millosolomillo from 2022, but CI no longer accepts
their auto-generated GitHub commit email...

Signed-off-by: Angus Gratton <[email protected]>
To allow more pins when other ways are used to provide external GPIO (ie
not via cyw43).

Signed-off-by: Christopher Parrott <[email protected]>
The `#if` check only checks that `MICROPY_PY_NETWORK_CYW43` and
`MICROPY_HW_PIN_EXT_COUNT` are defined.  This is a reasonable assumption
for the Pico W, but causes conflicts if someone wants to attach an external
IO expander to their Pico W and have its pins appear as Pin objects.

This commit addresses this by adding the additional checks, letting board
builds include wireless but separately choose whether the external IO pins
come from the cyw43 or not.

Signed-off-by: Christopher Parrott <[email protected]>
This change helps detect if the filesystem is invalid, by also including
the first mount attempt within the try-except.  Then the FAT is reformatted
if needed.

Fixes issue micropython#15779.

Signed-off-by: iabdalkader <[email protected]>
Otherwise it's very difficult to reason about thread safety in a
scheduler callback, as it can run at any time on any thread - including
racing against any bytecode operation on any thread.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
If GIL is disabled then there's threat of a race condition if some other
code specifically requests USB processing (i.e. to unblock stdio), while
a scheduled TinyUSB callback is already running on another thread.

Relies on the change in the parent commit, where scheduler is restricted
to main thread if GIL is disabled.

Fixes micropython#15390 - "TinyUSB callback can't recurse" exceptions on rp2 when
using _thread module and USB serial I/O.

Adds a unit test for stdin functioning correctly in threads (fails on rp2
port without this fix).

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
With the recent qemu (d9a0fdd and
0426934) and zephyr
(05cad7b) changes to how their tests are
run, two things became unused:

- The tinytest framework, which embedded a set of tests and their expected
  output within firmware, so these tests could be run stand-alone.

- The `--write-exp` and `--list-tests` options to `tests/run-tests.py`,
  which were needed primarily to generated the expected test output for
  tinytest (also the associated `tests/run-tests-exp.py/.sh` scripts are
  now unused).

This commit removes the tinytest component and all its helper code.  This
eliminates a maintenance burden.

Signed-off-by: Damien George <[email protected]>
Removing the now-unused (see previous commit for details) `--write-exp` and
`--list-tests` options helps to simplify the rather complex logic in
`run-tests.py`.

Signed-off-by: Damien George <[email protected]>
The Unix port's MIPS target CI steps have been updated to be more in
line with the other targets (the MicroPython binary now runs as a
dynamic executable), and the test exceptions for ffi have been lifted.

Signed-off-by: Alessandro Gatti <[email protected]>
The FFI helper definition was accidentally omitted when committing the
necessary shell code for building RV64 Unix builds in the CI
environment.

Signed-off-by: Alessandro Gatti <[email protected]>
The Unix port's Arm target CI steps have been updated to be more in
line with the other targets (the MicroPython binary doesn't need an
environment variable to be set in order to run now).

Signed-off-by: Alessandro Gatti <[email protected]>
Native .mpy files targetting armv6m (eg RP2040) cannot currently have more
than about 2kiB of native code (between the start of the file and the init
function).

This commit fixes that by using bigger jumps to jump to the init function.

Signed-off-by: Damien George <[email protected]>
Casting an ffi_arg to a signed int may truncate the value. E.g., when the
ffi_arg is 64-bit and the signed int is 32-bit. Also, casting an ffi_arg
to a larger signed type will not sign extend the value. E.g., when the
ffi_arg is 32-bit and the larger signed type is int64_t. If the value is
signed, it should be cast to ffi_sarg, which is the same size as ffi_arg.

Signed-off-by: Michael Sawyer <[email protected]>
Added the "long" modffi tests. The tests could not be added to the existing
ffi_types test because two .exp files were required for the 32-bit and
64-bit results. Code common to both the ffi_types and type "long" tests was
factored into ffi_int_base. ffi_types was renamed to ffi_int_types to group
the related tests under the "ffi_int" prefix.

Signed-off-by: Michael Sawyer <[email protected]>
This adds two new UM boards: OMGS3 and RGB Touch Mini.  Also fixed the
NanoS3 deploy info.

Signed-off-by: Seon Rozenblum <[email protected]>
This is for boards not covered by the Olimex ESP32 PoE implementation.  The
major setting is about the PHY interface configuration.

Tested with esp-idf v5.0.4 and Olimex ESP32 EVB boards.

Signed-off-by: shiggy <[email protected]>
This commit adds a new `RingIO` type which exposes the internal ring-buffer
code for general use in Python programs.  It has the stream interface
making it similar to `StringIO` and `BytesIO`, except `RingIO` has a fixed
buffer size and is automatically safe when reads and writes are in
different threads or an IRQ.

This new type is enabled at the "extra features" ROM level.

Signed-off-by: Andrew Leech <[email protected]>
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:   +52 +0.019% ADAFRUIT_ITSYBITSY_M4_EXPRESS[incl +4(bss)]

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.