Commit Graph

165 Commits

Author SHA1 Message Date
Scott Shawcroft 7f016ae11e
Fix build with filter to do OR 2021-08-11 12:10:51 -07:00
Scott Shawcroft 67c6932ca2
Reset timers separate from pwmio
This prevents timer leakage on builds without pwmio.

Fixes #5057
2021-08-11 09:58:31 -07:00
Jeff Epler ac4b10bcd9 It's "shared-module", not "shared-modules" 2021-08-03 10:37:47 -05:00
Scott Shawcroft f84cb94819
Remove OSError(0) and old network modules
The newer modules are `socketpool` and `ssl`.

Fixes #3924, related to #2021, closes #1880, closes #2273, closes #2274
2021-07-21 17:33:40 -07:00
Jeff Epler 49db85cb3d Check that select firmwares build on Windows with MSYS2
This configuration is used by @ladyada and more often than it should
we've discovered late that a change introduced problems building
there.

By adding this to regular CI, hopefully we learn about and fix these
issues sooner rather than later.
2021-05-28 16:47:29 -05:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Dan Halbert 0b8f1b9a90 wip: usb_cdc.serials 2021-02-15 20:06:18 -05:00
Dan Halbert fb33c4e1c0 -ftree-vrp better diagnostics on -Os builds; -fno-inline-functions for -O2; fix struct init in HCI bleio 2020-12-15 12:23:56 -05:00
Dan Halbert 6abe3cd0ef -Os for SAMD51; fix CSUPEROPT typo 2020-12-14 18:57:31 -05:00
Scott Shawcroft 1a677406bf
Merge pull request #3529 from jensechu/color-converter-transparency
displayio: Pass transparent_color to ColorConverter
2020-10-20 10:41:57 -07:00
Scott Shawcroft 8beb36c240
Use one lto partition
This leads to smaller code size at the expense of slower linking.

We can turn partitioning back on with GCC10 because it produces smaller code.
2020-10-20 09:24:03 -07:00
Christian Walther 1eab0692b5 Fix missing `nproc` on macOS.
396979a breaks building on macOS: `nproc` is a Linux thing, use a cross-platform alternative.
2020-10-20 16:39:32 +02:00
Jeff Epler 396979a67e atmel-samd: parallelize lto linking
This decreases the link time, especially on desktop machines with many CPU
cores.  However, it does come at a slight cost in binary size, making the flash
section about 200 bytes bigger for circuitplayground_express.

Before, linking build-circuitplayground_express/firmware.elf takes
8.8s elapsed time, leaving 3128 bytes free in flash.

After, linking build-circuitplayground_express/firmware.elf takes 2.8s elapsed
time, leaving 2924 bytes free in flash. (-6 seconds, -204 bytes free)

If necessary, we can make this per-board or even per-translation to squeeze full
builds.
2020-10-17 20:08:32 -05:00
Jeff Epler a2e1867f69 _canio: Minimal implementation for SAM E5x MCUs
Tested & working:

 * Send standard packets
 * Receive standard packets (1 FIFO, no filter)

Interoperation between SAM E54 Xplained running this tree and
MicroPython running on STM32F405 Feather with an external
transceiver was also tested.

Many other aspects of a full implementation are not yet present,
such as error detection and recovery.
2020-09-21 16:44:26 -05:00
Jeff Epler 45eec5b5a5 samd: SPI: improve conditional code
I recently misdiagnosed a "maybe-uninitialized" diagnostic as a bug in
asf4.  However, the problem was in our SPI code.

A special case for samr21 MCUs was being applied to same54p20a and possibly
other D5x/E5x MCUs, since the check was simply for pin PC19 existing at all.

Change the check to use the macro PIN_PC19F_SERCOM4_PAD0 which is only
defined if special function F of pin PC19 is SERCOM4 PAD0.

Reorganize the code a little bit so that brace-matching in editors is
not confused by the conditionalized code, including an unrelated change
for APA102_SCK's condition.

Revert the change to the Makefile that incorrectly attempted to silence
the diagnostic.
2020-09-17 18:30:22 -05:00
Dan Halbert 3c6af94fb3
Merge pull request #3384 from jepler/feather_m4_can
atmel-samd: add same51, feather_m4_can
2020-09-14 23:57:51 -04:00
Jeff Epler 90f7340bfc move implicit-fallthrough warning enable to defns.mk 2020-09-13 13:13:09 -05:00
Jeff Epler 01fdd9598a disable iimplicit-fallthrough warning inside asf4
.. there is an instance of it that looks like a "true positive", but it only
affects sdhc transfers that are not a multiple of 4 bytes, which I don't think
happens. (sd card blocks are always 512 bytes)  I can fix this in our
asf4 repo but that would mean this should be deferred until after #3384 is
merged, since that also touches asf4 very invasively by adding a whole new
chip family.
2020-09-12 17:48:42 -05:00
Jeff Epler 5729097bc4 atmel-samd: enable build error for implicit fallthrough
If any diagnostics occur, we will want to either add `/* FALLTHROUGH */`
or `break;` as appropriate.  I only tested a few builds (trinket m0
and metro m4 express)
2020-09-12 15:11:29 -05:00
Jeff Epler e066448e36 atmel-samd: add same51, feather_m4_can
This is compile-tested, and requires updates in the related submodules:

https://github.com/adafruit/samd-peripherals/pull/35
https://github.com/adafruit/asf4/pull/37

This should not be merged until those can also be merged.
2020-09-08 13:06:45 -05:00
Scott Shawcroft 786f4ed114
Merge pull request #3344 from jepler/issue-3184
Fix RGBMatrix, FrameBufferDisplay bugs
2020-09-02 15:32:30 -07:00
Jeff Epler 952d9bbb4a samd: Ignore a maybe-uninitialized diagnostic in asf4
I encountered this when changing optimization flags for debugging
purposes.  The diagnostic appears spurious and unrelated to what
I'm debugging.
2020-09-01 10:55:45 -05:00
Jeff Epler ad4bf75367 samd: only set NDEBUG for non-debug builds 2020-09-01 10:55:45 -05:00
Dan Halbert f714f53552 Merge remote-tracking branch 'adafruit/main' into ble_hci 2020-08-21 10:45:05 -04:00
Dan Halbert 0e30dd8bcc merge from upstream; working; includes debug_out code for debugging via Saleae for posterity 2020-08-20 20:29:57 -04:00
Jeff Epler 6ae5bedf3b SAM E54: Use correct CFG_TUSB_MCU
This doesn't actually change the code that is built, but it is
"more correct".
2020-08-19 11:27:52 -05:00
Dan Halbert ac95106b88 service discovery works; need to work on char and descriptor discovery 2020-08-04 18:24:37 -04:00
Dan Halbert a995a5c58f wip: partial discovery responses; compiles; not tested 2020-08-03 21:02:57 -04:00
Dan Halbert 0a60aee3e4 wip: compiles 2020-08-02 11:36:38 -04:00
Jeff Epler af135a7560 atmel-samd: move samd-specific script 2020-07-30 07:18:02 -05:00
root 778e8bfda9 Changes to optimization option 2020-07-23 19:27:02 -05:00
root d83a4ac72d Changes to add compiler optimization option 2020-07-22 12:44:41 -05:00
root 49decf90c9 Add option for higher optimization levels 2020-07-21 10:11:08 -05:00
Diego Elio Pettenò 34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
Dan Halbert 11cb3e3b4b hci skeleton done; not working yet 2020-06-30 23:19:40 -04:00
Jeff Epler f496c0b58d atmel-samd: Add SDIO SD card interface 2020-06-26 11:50:42 -05:00
Jeff Epler da733c01da atmel-samd: Add support for SAM E54 family MCUs
This introduces the new macro SAM_D5X_E5X.  This is mostly the same
as SAMD51 before, except in a few places where a special case for
SAME54 is required
2020-06-23 10:41:48 -05:00
Jeff Epler 6638bc32c3 samd: Makefile: Regularize whitespace 2020-06-22 10:45:27 -05:00
Scott Shawcroft 796373b8be
A number of small ESP32S2 fixes:
* Fix flash writes that don't end on a sector boundary. Fixes #2944
* Fix enum incompatibility with IDF.
* Fix printf output so it goes out debug UART.
* Increase stack size to 8k.
* Fix sleep of less than a tick so it doesn't crash.
2020-05-28 15:43:55 -07:00
Scott Shawcroft 755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-27 16:45:10 -07:00
Lucian Copeland 8791ca6af3 implement requested changes 2020-04-23 13:33:41 -04:00
Scott Shawcroft dcb0e50f04
Fix USB midi and hid disable. 2020-04-21 14:15:44 -07:00
Scott Shawcroft 48b5f2a384
Initial work on SAMD 2020-03-13 11:16:41 -07:00
hathach 62c4028cde
sync with https://github.com/hathach/tinyusb/pull/246
should fix slow enumeration
2019-12-26 23:04:16 +07:00
Dan Halbert 013c840862 working on all ports 2019-12-10 20:27:30 -05:00
Dan Halbert 40434d6919 wip 2019-12-05 22:45:53 -05:00
Jeff Epler d843156a5e samd: Consolidate small build optimization flags
.. inline-unit-growth was the same across all boards, and the highest
max-inline-insns-auto parameter was shared across 2 of 5 boards, so it's
worth a little work to follow the DRY principle
2019-11-29 10:51:16 -06:00
Jeff Epler 2e4a6b94e7 atmel-samd: get most constrained m0 builds to work again
By tweaking the optimizer flags, we can get back a few hundred bytes
and allow these builds to work with the gcc9 compiler.
2019-11-26 08:50:45 -06:00
Dan Halbert 7b79ac3739 Parameterize linker script 2019-10-20 23:50:12 -04:00
Scott Shawcroft 36a23e0fe3
Rework refresh API and factor common display stuff out
NOT TESTED! Just compiles

Fixes #1691
2019-08-22 14:23:27 -07:00