Commit Graph

8235 Commits

Author SHA1 Message Date
Pierre Constantineau 86ddecfd4f merge main and resolve conflict 2021-12-10 16:57:50 -06:00
Pierre Constantineau dac71e684d moved aliased boards down to actual builds 2021-12-10 16:34:06 -06:00
Damien George 0892ebe091 stm32/boards: Enable MICROPY_HW_ENABLE_SERVO on various boards.
Fixes issue #8059.

Signed-off-by: Damien George <damien@micropython.org>
2021-12-10 23:19:20 +11:00
Damien George 5fc55999b2 stm32/boards: Remove unused MICROPY_HW_ENABLE_TIMER config.
Signed-off-by: Damien George <damien@micropython.org>
2021-12-10 23:19:00 +11:00
Damien George 10c6f03cbe stm32/boards: Remove stray '+' characters at start of lines in ld files.
Signed-off-by: Damien George <damien@micropython.org>
2021-12-10 23:15:25 +11:00
Pierre Constantineau a043f65352 adding Pykey family of boards 2021-12-09 23:25:48 -06:00
Scott Shawcroft 8c480832a7
Add generic CM4 board and update PIDs 2021-12-09 17:30:32 -08:00
Scott Shawcroft 6626319338
Add SPI support
It uses both SPI and AUX SPI peripherals
2021-12-09 17:30:03 -08:00
Michael Himing d72311f76a Update xiao rp2040 pins 2021-12-10 09:39:31 +11:00
Scott Shawcroft 5ea4082a18
Merge pull request #5664 from jpconstantineau/bluemicro833
Add Bluemicro833 as new nRF52833 board
2021-12-09 10:27:41 -08:00
Dan Halbert 3bdf2a5cde
Merge pull request #5691 from jepler/esp32s3-pids
Fix PIDs to match official espressif list
2021-12-09 09:08:35 -05:00
Damien George c613f5bb49 stm32/boards/LEGO_HUB_NO6: Set filesystem label as HUB_NO6.
Signed-off-by: Damien George <damien@micropython.org>
2021-12-09 16:51:35 +11:00
Jim Mussared 92f54fe8d9 stm32/boards/NUCLEO_WB55: Fix LED ordering.
These were commented correctly by their colour, but in the wrong order with
respect to the PCB silkscreen.

Fixes issue #8054.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-09 14:03:35 +11:00
Jeff Epler 937e0740f4
Fix PIDs to match official espressif list
See the slightly deceptively titled
 * https://github.com/espressif/usb-pids/pull/29
2021-12-08 20:27:34 -06:00
Damien George 9ffb1ad2f8 unix/Makefile: Use -Og instead of -O0 for debug builds.
For the coverage build this reduces the binary size to about 1/4 of its
size, and seems to help gcov/lcov coverage analysis so that it doesn't miss
lines.

Signed-off-by: Damien George <damien@micropython.org>
2021-12-09 12:53:09 +11:00
Damien George 71168ec55c unix/coverage: Change remaining printf to mp_printf.
For consistency with all other prints in this file, so that the ordering
of output is correct.

Signed-off-by: Damien George <damien@micropython.org>
2021-12-09 12:38:50 +11:00
Jim Mussared 3770fab334 all: Update Python formatting to latest Black version 21.12b0.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-09 12:09:40 +11:00
Pierre Constantineau 7137f1b1c0 added never_reset to board_init 2021-12-08 17:29:53 -06:00
Pierre Constantineau 448a96ce1b added CIRCUITPY_IS31FL3741 = 0 2021-12-08 17:22:54 -06:00
Pierre Constantineau 53f4137d6f updated pin defs 2021-12-08 17:21:13 -06:00
Pierre Constantineau 4cad5beb90 minor udate to USB desc 2021-12-08 17:17:56 -06:00
Pierre Constantineau e946dcffff initial BlueMicro8333 Files 2021-12-08 17:17:56 -06:00
Scott Shawcroft b12d2063d0
Merge remote-tracking branch 'adafruit/7.1.x' into merge_7.1 2021-12-08 10:50:22 -08:00
Scott Shawcroft 3c8a05ebbf
Merge pull request #5673 from CytronTechnologies/add-maker-nano-rp2040-7.1.x
Add new board Maker Nano RP2040 to branch 7.1.x.
2021-12-08 10:33:57 -08:00
Scott Shawcroft bf08f62d37
Merge pull request #5683 from dhalbert/restore-bleio-hci-background
restore BLEIO HCI background task
2021-12-08 10:31:42 -08:00
Dan Halbert 7bcfbe30bf shrink some boards 2021-12-08 11:57:15 -05:00
ZodiusInfuser 3ea1619816
Merge branch 'adafruit:main' into tiny2mb 2021-12-08 16:51:47 +00:00
ZodiusInfuser 201fae8342
Added final USB PID 2021-12-08 16:48:32 +00:00
Scott Shawcroft 574039391e
Merge pull request #5665 from dhalbert/frequencyio-fix
add a frequencyin_reset() for VM restart
2021-12-07 13:44:06 -08:00
Scott Shawcroft ab4f789e9a
Fix Pi Zero 2 W build 2021-12-07 13:29:46 -08:00
Dan Halbert e0e3224253 forgot a check for BOARD_HAS_CRYSTAL 2021-12-07 15:42:31 -05:00
Dan Halbert 7e21344cf0 fix FrequencyIn for crystalless boards and simplify clock logic 2021-12-07 13:12:24 -05:00
Scott Shawcroft 92a4261ad5
Full UART support for RPI
This adds PL011 UART support which is more plentiful.

It also:
* Fixes PI4 build by including .dtb files on the SD card.
* Enables the activity LED as the status LED on PI4 and CM4 I/O.
* Adds that LED as board.LED.

Fixes #5650 and progress on #5629
2021-12-06 18:36:14 -08:00
Scott Shawcroft 121b22b0c5
Merge pull request #5666 from skerr92/add-odt-castaway2040
Add odt castaway2040
2021-12-06 14:44:33 -08:00
Scott Shawcroft e8e5ea7c2f
Merge pull request #5674 from jepler/esp32s3-box-display
esp32s3-box: enable display
2021-12-06 14:06:02 -08:00
Scott Shawcroft 8d406e006b
Merge pull request #5670 from dhalbert/fix-blacken-update-formatting-issues-7.1.x
minor .py changes due to blacken update - 7.1.x
2021-12-06 13:22:19 -08:00
Scott Shawcroft 309faee334
Merge pull request #5519 from jpconstantineau/seeduino-xiao-rp2040
Add New Board - Seeeduino XIAO RP2040
2021-12-06 13:08:22 -08:00
Jeff Epler 40d947cee3
Merge pull request #5655 from jepler/esp32s3-devkitc
Espressif: Add Esp32s3 devkitc board definitions
2021-12-06 12:47:04 -06:00
Jeff Epler 1b5e98e2fa
esp32s3 box: add display 2021-12-06 10:08:44 -06:00
Jeff Epler b722a2bca1
espressif: pwmout: get rid of not_first_reset special case 2021-12-06 10:08:44 -06:00
Jeff Epler fae6d47a45
espressif: keep never_reset_pins marked as in use 2021-12-06 10:08:44 -06:00
Kong Wai Weng ee1987d34b Added Maker Nano RP2040 to branch 7.1.x. 2021-12-06 23:12:53 +08:00
Dan Halbert c43e0bd2db uncrustify fixes 2021-12-06 09:54:15 -05:00
Kong Wai Weng 7ee825370e Use 4x space instead of tab. 2021-12-06 17:28:45 +08:00
Kong Wai Weng bde65d0f28 Added Maker Nano RP2040 2021-12-06 17:26:00 +08:00
MicroDev 7df172ba19
Merge pull request #5660 from jepler/esp32s3-spi
espressif: busio.SPI: Use SPI_DMA_CH_AUTO
2021-12-06 10:24:51 +05:30
Dan Halbert 5fe4c3bec9 fix mistaken use of PWM channel for slice 2021-12-05 21:16:46 -05:00
Seth Kerr 1a1f015895 fixing files changed by precommit 2021-12-05 15:09:56 -07:00
Dan Halbert 92bb909bf0 add a frequencyin_reset() for VM restart 2021-12-05 17:06:42 -05:00
Seth Kerr db6e58dc2d run precommit locally and passed 2021-12-05 15:02:18 -07:00
Seth Kerr e352048db9 Add ODT Cast-Away RP2040 2021-12-05 14:49:48 -07:00
Dan Halbert 4de6c7cf6f
Merge pull request #5656 from dhalbert/rp2040-i2c-zero-write-bitbang-timeout
Use a longer clock stretching timeout for RP2040 zero-byte I2C writes
2021-12-04 19:40:48 -05:00
Jeff Epler 2ad877a907
Fix VID/PID of esp32-box 2021-12-04 14:58:48 -06:00
foamyguy fa37ee6484 limit disable interrupts to flash calls 2021-12-04 14:14:23 -06:00
foamyguy 5e7c1328b0 disable interrupts inside of write_page and erase_write_sector 2021-12-04 12:21:51 -06:00
foamyguy f49271b472 disable interrupts inside of ports raspberrypi common hal 2021-12-04 11:34:49 -06:00
Jeff Epler e2abb0e059
devkitc: update vid/pid in anticipation of allocation from espressif 2021-12-04 10:19:19 -06:00
Jeff Epler bc7f024545 espressif: Add esp32s3_box
This module has 16MB flash, 8MB PSRAM, as well as a display & speakers.
2021-12-04 09:14:57 -06:00
Jeff Epler 1207bfced9 espressif: Use detected size of spiram 2021-12-04 09:14:22 -06:00
Jeff Epler 1a99ce5eb3 espressif: busio.SPI: Use SPI_DMA_CH_AUTO
All 3 micros we care about (S2, S3, C3) state in the documentation
that DMA channel can be specified as SPI_DMA_CH_AUTO.

Specifying a specific DMA channel explicitly doesn't _ever_ work on
ESP32-S3, so no SPI bus could be used.

Testing performed: On the ESP32-S3-DevKitC, used neopixel_spi to
turn the onboard neopixel red, green, and blue
2021-12-04 09:12:38 -06:00
Dan Halbert 80abd2d645 Use a longer clock stretching timeout for RP2040 zero-byte I2C writes 2021-12-03 18:19:13 -05:00
Jeff Epler 23e0a25aa2 add nopsram version of the devkit C 2021-12-03 15:20:11 -06:00
Jeff Epler 659babc620 Add the esp32s3 devkitc (psram variant) 2021-12-03 15:09:59 -06:00
Dan Halbert f594ab2e67
Merge pull request #5615 from microDev1/espressif
Update espressif port
2021-12-03 14:55:05 -05:00
Kattni Rembor 3b6011d551 Update pin order to match silk. 2021-12-03 11:40:40 -05:00
microDev 9e286432d2
add esp32s3 documentation in readme 2021-12-03 21:20:55 +05:30
IhorNehrutsa b491967bbd esp32/machine_pwm: Implement duty_u16() and duty_ns() PWM methods.
The methods duty_u16() and duty_ns() are implemented to match the existing
docs.  The duty will remain the same when the frequency is changed.
Standard ESP32 as well as S2, S3 and C3 are supported.

Thanks to @kdschlosser for the fix for rounding in resolution calculation.

Documentation is updated and examples expanded for esp32, including the
quickref and tutorial.  Additional notes are added to the machine.PWM docs
regarding limitations of hardware PWM.
2021-12-03 23:58:52 +11:00
Scott Shawcroft 543e4d8c4d
Merge pull request #5648 from tannewt/rpi_pin_mux
Add full pin mux info and use it for I2C
2021-12-02 10:46:46 -08:00
Scott Shawcroft 8adb0ecd33
Fix loop bounds 2021-12-02 10:28:26 -08:00
ZodiusInfuser 0e56c5aa8a Added definitions for 2MB Tiny2040 2021-12-02 16:45:43 +00:00
microDev 69faaa52b8
run test for traceback module 2021-12-02 14:55:02 +05:30
Scott Shawcroft 2433c9572c
Add full pin mux info and use it for I2C
All I2C peripherals should be usable now. This also adds pin
in-use tracking and resetting.

Part of #5629
2021-12-01 17:19:57 -08:00
Scott Shawcroft 8cf269d2a0
Merge pull request #5634 from dhalbert/board_deinit
board_deinit() everywhere
2021-12-01 10:09:14 -08:00
Scott Shawcroft fea0103ff2
Merge pull request #5638 from jepler/test-aesio
Test aesio
2021-12-01 10:05:37 -08:00
Jim Mussared a7fa18c203 py/builtinimport: Refactor module importing.
Simplify and document/comment the handling of builtin import for:
- already-loaded modules
- built-in modules
- built-in umodules (formerly weak links)
- filesystem modules

Retains existing functionality with smaller code size but should also
facilitate potential new features (built-in packages, controlling the
frozen path).

Also makes the (unix-only) -m behavior a bit more obvious and configurable.

Code size change with this commit:

   bare-arm:    +0 +0.000%
minimal x86:   -64 -0.039%
   unix x64:   -32 -0.006%
unix nanbox:    -4 -0.001%
      stm32:  -184 -0.047% PYBV10
     cc3200:  -120 -0.065%
    esp8266:  -228 -0.033% GENERIC
      esp32:  -268 -0.018% GENERIC[incl +16(data)]
        nrf:  -152 -0.087% pca10040
        rp2:  -256 -0.052% PICO
       samd:   -80 -0.057% ADAFRUIT_ITSYBITSY_M4_EXPRESS
2021-12-01 13:23:34 +11:00
Dan Halbert e8ea9c75a1 check for missing pins; deinit txrx leds 2021-11-30 19:16:21 -05:00
Jeff Epler 1f1def54b7
add aesio to unix coverage build 2021-11-30 15:25:05 -06:00
Dan Halbert 57c33059f3 board_deinit() everywhere 2021-11-30 11:00:10 -05:00
Kamil Tomaszewski 9a8d8b1bf1 spresense: Fix time.time() 2021-11-30 12:38:48 +01:00
Damien George 23a150789d stm32/boards/make-pins.py: Use cpu pins to define static alt-fun macros.
Instead of board pins, so that pins which have only the CPU specified in
pins.csv can still be used with mp_hal_pin_config_alt_static().

Signed-off-by: Damien George <damien@micropython.org>
2021-11-30 10:25:41 +11:00
Damien George 0c9f5b388e stm32: Include HAL MMC code in F4 builds.
So that the MMC driver can be used on F4 MCUs.

Signed-off-by: Damien George <damien@micropython.org>
2021-11-30 10:21:18 +11:00
Damien George 7e61a12eb1 stm32: Add support for F479 MCUs.
Signed-off-by: Damien George <damien@micropython.org>
2021-11-30 10:21:18 +11:00
Kattni Rembor c13f1d19f5 Update pins to silk pin first. 2021-11-29 17:56:03 -05:00
Damien George 35e70c1698 stm32/boards: Convert F413,F439,H743,L4xx,WB55 to new flash FS config.
Signed-off-by: Damien George <damien@micropython.org>
2021-11-29 13:20:35 +11:00
Damien George 84969194a1 stm32/flashbdev: Support generic flash storage config via link symbols.
A board can now define the following linker symbols to configure its flash
storage layout:

    _micropy_hw_internal_flash_storage_start
    _micropy_hw_internal_flash_storage_end
    _micropy_hw_internal_flash_storage_ram_cache_start
    _micropy_hw_internal_flash_storage_ram_cache_end

And optionally have a second flash segment by configuring
MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE_SEGMENT2 to 1 and defining:

    _micropy_hw_internal_flash_storage2_start
    _micropy_hw_internal_flash_storage2_end

Signed-off-by: Damien George <damien@micropython.org>
2021-11-29 13:01:51 +11:00
lady ada 83de740d1f kan prezz 2021-11-26 15:13:58 -05:00
lady ada c56e33e6c2 woops fix SPI for rev A (will change in rev B to be correct) 2021-11-26 15:06:09 -05:00
lady ada 3c007ba094 re-add psram! 2021-11-26 13:50:12 -05:00
microDev dddc282e34
update default sdkconfig and correct bootloader offset 2021-11-26 22:44:22 +05:30
microDev 554a62955b
Merge branch 'main' into espressif 2021-11-26 22:40:22 +05:30
lady ada a9060ec383 cr nl 2021-11-26 00:27:54 -05:00
lady ada 0cf629bf99 on hey this proto doesnt have psram :( 2021-11-26 00:15:20 -05:00
lady ada f06b21e46d sneaky! 2021-11-25 23:50:33 -05:00
lady ada a2c8daeb55 :( 2021-11-25 23:45:37 -05:00
lady ada 5e0d562cfe y not? 2021-11-25 23:18:51 -05:00
Jim Mussared 678f4b959f esp32/boards/GENERIC_S3: Enable BLE on ESP32 S3.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-26 11:58:12 +11:00
David Michieli 6259aa50eb stm32/boards/NUCLEO_WB55: Update rfcore_firmwre for new WS.
Adds a fix to behavior occuring since WS 1.11 where the FUS returns
misleading statuses during WS upgrade.
2021-11-25 23:28:58 +11:00
Damien George 196d26848a stm32/usb: Use a table of allowed values to simplify usb_mode get/set.
This reduces code size and code duplication, and fixes `pyb.usb_mode()` so
that it now returns the correct string when in multi-VCP mode (before, it
would return None when in one of these modes).

Signed-off-by: Damien George <damien@micropython.org>
2021-11-25 21:18:17 +11:00
Frédéric Pierson d49df423e0 stm32/boards/NADHAT_PYBF405: Rename board to GARATRONIC_NADHAT_F405.
To add the manufacturer as a prefix to the board name, for consistency with
other Garatronic boards.
2021-11-25 21:10:43 +11:00
Frédéric Pierson fdb925c4c1 stm32/boards: Add PYBSTICK26 F411 board definition. 2021-11-25 21:09:57 +11:00
Frédéric Pierson c422ca3da1 rp2/boards: Add PYBSTICK26 RP2040 board definition. 2021-11-25 21:05:21 +11:00
Dan Halbert 95c09ac66f
Merge pull request #5610 from tannewt/rpi
Initial broadcom port for Raspberry Pi
2021-11-24 19:02:23 -05:00
Scott Shawcroft e6a68cc4a7
Shrink 3 SAMD builds by disabling onewireio 2021-11-24 14:27:49 -08:00
Scott Shawcroft ee5536386d
Merge remote-tracking branch 'adafruit/main' into rpi 2021-11-24 14:23:23 -08:00
Dan Halbert 2afe599811
Add missing include for zero2w pins.c 2021-11-24 09:43:06 -05:00
microDev e5c125d153
update espressif makefile formatting 2021-11-24 18:14:54 +05:30
microDev 7ba5513f9a
update espressif port
- update esp-idf to v4.4
- add esp32s3 support
- add analogio on esp32c3
- disable rgbmatrix on all espressif soc

Co-authored-by: Scott Shawcroft <scott@adafruit.com>
Co-authored-by: Seon Rozenblum <seon@unexpectedmaker.com>
2021-11-24 18:01:34 +05:30
robert-hh 81f706aee4 mimxrt: Support PWM using the FLEXPWM and QTMR modules.
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the
duty cycle.  The basic API is supported as documentated, except that
keyword parameters are accepted for both the instatiaton and the
PWM.init() call.

Extensions: support PWM for channel pairs.  Channel pairs are declared by
supplying 2-element tuples for the pins.  The two channels of a pair must
be the A/B channel of a FLEXPWM module.  These form than a complementary
pair.

Additional supported keyword arguments:

- center=value Defines the center position of a pulse within the pulse
  cycle.  The align keyword is actually shortcut for center.

- sync=True|False: If set to True, the channels will be synchronized to a
  submodule 0 channel, which has already to be enabled.

- align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized
  channels are Center-Aligned or Edge-aligned.  The channels must be either
  complementary a channel pair or a group of synchronized channels.  It may
  as well be applied to a single channel, but withiout any benefit.

- invert= 0..3. Controls ouput inversion of the pins.  Bit 0 controls the
  first pin, bit 1 the second.

- deadtime=time_ns time of complementary channels for delaying the rising
  slope.

- xor=0|1|2 xor causes the output of channel A and B to be xored.  If
  applied to a X channel, it shows the value oif A ^ B.  If applied to an A
  or B channel, both channel show the xored signal for xor=1.  For xor=2,
  the xored signal is split between channels A and B.  See also the
  Reference Manual, chapter about double pulses.  The behavior of xor=2 can
  also be achieved using the center method for locating a pulse within a
  clock period.

The output is enabled for board pins only.

CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal
will not be routed to the output.  That applies only to FLEXPWM pins.  The
use of QTMR pins which are not board pins will be rejected.

As part of this commit, the _WFE() statement is removed from
ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-11-24 13:48:27 +11:00
Scott Shawcroft 927a720de9
Fix I2C and feedback from Dan 2021-11-23 17:23:13 -08:00
gamblor21 f7df39ef88 Re-enable on microbit v2 2021-11-23 13:20:00 -06:00
Jeff Epler b1a3ccb36c
clear out interrupt when freeing the timer
Closes #5418
2021-11-23 13:03:01 -06:00
Pierre Constantineau 81eed3ff4e
Merge branch 'adafruit:main' into seeduino-xiao-rp2040 2021-11-22 17:12:35 -06:00
Pierre Constantineau 401f1fadaf
Merge branch 'adafruit:main' into board-pykey87 2021-11-22 17:11:36 -06:00
Timon a1052d5f73
Initial broadcom port for Raspberry Pi
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
  themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
  mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
  and unnecessary for the vast majority of builds.

Fixes #4314
2021-11-22 14:54:44 -08:00
Damien George 90554d03c0 stm32/boards: Build NUCLEO_WB55 and STM32F769DISC without mboot enabled.
This is to make the builds for all nucleo/discovery boards uniform, so they
can be treated the same by the auto build scripts.

The CI script is updated to explicitly enable mboot and packing, to test
these features.

Signed-off-by: Damien George <damien@micropython.org>
2021-11-22 17:12:16 +11:00
Damien George 01ceb9aca3 stm32/dma: Make DMA2_Stream3 exclusive to SDIO when CYW43 enabled.
This prevents SPI4/5 from being used if SDIO and CYW43 are enabled, because
the DMA for the SDIO is used on an IRQ and must be exclusivly available for
use by the SDIO peripheral.

Signed-off-by: Damien George <damien@micropython.org>
2021-11-22 11:57:37 +11:00
Damien George dfa75f33a5 stm32/sdio: Don't explicitly disable DMA2 on deinit of SDIO.
Because DMA2 may be in use by other peripherals, eg SPI1.

On PYBD-SF6 it's possible to trigger a bug in the existing code by turning
on WLAN and connecting to an AP, pinging the IP address from a PC and
running the following code on the PYBD:

    def spi_test(s):
        while 1:
            s.write('test')
            s.read(4)

    spi_test(machine.SPI(1,100000000))

This will eventually fail with `OSError: [Errno 110] ETIMEDOUT` because
DMA2 was turned off by the CYW43 driver during the SPI1 transfer.

This commit fixes the bug by removing the code that explicitly disables
DMA2.  Instead DMA2 will be automatically disabled after an inactivity
timeout, see commit a96afae90f

Signed-off-by: Damien George <damien@micropython.org>
2021-11-22 11:57:37 +11:00
Peter Boin e83aa252f7 stm32/main: Run optional frozen module at boot.
If a board specifies a filename via MICROPY_BOARD_FROZEN_BOOT_FILE then
that will be run on start up, before the usual boot.py.
2021-11-22 11:56:24 +11:00
gamblor21 5337e45411 Only enable if not disabled 2021-11-21 11:39:42 -06:00
gamblor21 6d412e20c4 Disabling from some boards 2021-11-20 14:04:49 -06:00
gamblor21 d063bf2675 Initial commit for IS31 2021-11-20 13:46:11 -06:00
Nathan Young 7afb4f1129 Temporary: Use same USB PID as the MicroMod STM32 2021-11-20 13:10:41 +01:00
Lorenzo Cappelletti 8f0e304e65 stm32/boards: Add new board MikroElektronika Quail, and F427 support.
Quail (https://www.mikroe.com/quail, PID: MIKROE-1793) is based on an
STM32F427VI CPU, featuring 2048 kB of Flash memory and 192 kB of RAM.  An
on-board Cypress S25FL164K adds 8 MB of SPI Flash.

Quail has 4 mikroBUS(TM) sockets for Mikroe click(TM) board connectivity,
along with 24 screw terminals for connecting additional electronics and two
USB ports (one for programming, the other for external mass storage).

4 UARTs, 2 SPIs and 1 I2C bus are available for communication.

Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti@gmail.com>
2021-11-19 16:33:13 +11:00
Lorenzo Cappelletti 16c7a80874 stm32/boards/MIKROE_CLICKER2_STM32: Add more detail to board.json.
Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti@gmail.com>
2021-11-19 16:32:53 +11:00
iabdalkader 78425208ba nrf/main: Use VFS helper function to mount fs and chdir. 2021-11-19 15:43:04 +11:00
Mike Causer 172a031dff rp2/boards/PIMORONI_PICOLIPO_16MB: Fix 16MB flash size.
Was incorrectly added as 7MB for an 8MB SPI flash, but this board has a
16MB chip, not 8MB, so it should be 15MB leaving 1MB for MicroPython.

Thanks to @robert-hh
2021-11-19 15:34:07 +11:00
Seon Rozenblum 1904833e0c esp32: Add SDCard support for S3, and a GENERIC_S3_SPIRAM board.
Also add support for GPIO 47 and 48 on S3 boards.
2021-11-19 14:05:55 +11:00
oli 0a9335ecaa rp2/rp2_pio: Support exec with sideset.
The rp2.StateMachine.exec errors when supplying a sideset action.  This
commit passes the sideset_opt from the StateMachine though to the parser.
It also adds some value validation to the sideset operator.

Additionally, the "word" method is added to the exec to allow any other
unsupported opcodes.

Fixes issue #7924.
2021-11-19 13:35:28 +11:00
Peter van der Burg 3dc9a42bc2 samd/README.md: Update README to reflect new features and boards. 2021-11-19 11:49:10 +11:00
Peter van der Burg b991902983 samd/boards/SEEED_XIAO: Add new board definition. 2021-11-19 11:48:25 +11:00
Peter van der Burg ef4e63aabc samd/boards/SEEED_WIO_TERMINAL: Add new board definition. 2021-11-19 11:48:12 +11:00
Peter van der Burg 771d673e5c samd/boards/SAMD21_XPLAINED_PRO: Update for flash and pins.
- mpconfigboard.h: flash and USART config
- mpconfigboard.mk: enable LFS1
- pins.c: define pins and LEDs
- pins.h: define structs and consts
2021-11-19 11:47:43 +11:00
Peter van der Burg fb79e58636 samd/boards/ADAFRUIT_TRINKET_M0: Update for flash and pins.
- mpconfigboard.h: flash and USART config
- mpconfigboard.mk: enable LFS1
- pins.c: define pins and LEDs
- pins.h: define structs and consts
2021-11-19 11:47:19 +11:00
Peter van der Burg 3d33dbedc9 samd/boards/MINISAM_M4: Update for flash and pins.
- mpconfigboard.h: flash and USART config
- mpconfigboard.mk: enable LFS1
- pins.c: define pins and LEDs
- pins.h: define structs and consts
2021-11-19 11:46:53 +11:00
Peter van der Burg 199b6a8a8b samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS: Update for flash and pins.
- mpconfigboard.h: flash and USART config
- mpconfigboard.mk: enable LFS1
- pins.c: define pins and LEDs
- pins.h: define structs and consts
2021-11-19 11:46:30 +11:00
Peter van der Burg 72cb4ff596 samd/boards/ADAFRUIT_FEATHER_M0_EXPRESS: Update for flash and pins.
- mpconfigboard.h: flash and USART config
- mpconfigboard.mk: enable LFS1
- pins.c: define pins and LEDs
- pins.h: define structs and consts
2021-11-19 11:44:07 +11:00
Peter van der Burg 2f65ded1a2 samd: Add Pin and LED classes, and machine.unique_id. 2021-11-19 11:43:06 +11:00
Peter van der Burg 2121353602 samd: Add internal flash block device, filesystem and uos support. 2021-11-19 11:42:58 +11:00
Peter van der Burg 4c132614e1 samd/samd_soc: Allow a board to configure the low-level MCU config.
The board specific #defines will be moved to individual boards.
2021-11-19 11:42:47 +11:00
Peter van der Burg cd2223b8fe samd: Integrate latest asf4, add help, more time funcs and uPy features.
- Makefile: update to use new ASF4 files, support frozen manifest, and
  include source files in upcoming commits
- boards/manifest.py: add files to freeze
- boards/samd51p19a.ld: add linker script for this MCU
- help.c: add custom help text
- main.c: execute _boot.py, boot.py and main.py on start-up
- modules/_boot.py: startup file to freeze
- modutime.c: add gmtime, localtime, mktime, time functions
- mpconfigport.h: enabled more features for sys and io and modules
- mphalport.h: add mp_hal_pin_xxx macros
- mphalport.c: add mp_hal_stdio_poll
2021-11-19 11:05:05 +11:00
stijn 5900257dd6 extmod/uplatform: Use generic custom platform string.
Don't force the 'HAL' string to be part of the platform string because
it doesn't have a sensible meaning for all possible platforms, and
swap it with the PLATFORM_ARCH string so the strings which most platforms
have come first.
2021-11-18 10:46:14 +11:00
Scott Shawcroft 3b7d2f1dc3
Merge pull request #5593 from anecdata/ap_extras
Set AP MAC address
2021-11-17 10:26:36 -08:00
Nathan Young 0ff3c0dac0 Board definition for SparkFun Thing Plus - STM32 2021-11-17 19:18:28 +01:00
retsyo e5f9e2febc windows/mpconfigport.h: Enable help and help("modules").
Following a similar change to the unix port in
6430cd3e02
2021-11-17 14:52:39 +11:00
Matt van de Werken a4c0f52714 stm32/led: Support an extra 2 LEDs in board configuration.
Although the pyboard has only 4 LEDs, there are some boards that (may) have
more.  This commit adds 2 more LEDs to the led.c file that if defined in
the board-specific config file will be compiled in.
2021-11-17 14:46:58 +11:00
Pooya Moradi 95ccd9a005 nrf/Makefile: Improve Black Magic Probe commands.
Used batch mode to get rid of the confirmation prompt on flashing.
Used 'compare-sections' to verify flash.
Removed the unnecessary `quit` at the end.
2021-11-17 14:32:02 +11:00
Henk Vergonet d11ff0499f unix/modos: Add support for uos.urandom(n).
Use getrandom function if available, otherwise read from /dev/urandom.

Signed-off-by: Henk.Vergonet@gmail.com
2021-11-17 12:59:38 +11:00
robert-hh 5ed7a748f0 rp2/boards: Add neopixel.py to manifest.py.
Because machine.bitstream is now implemented on the rp2 port.
2021-11-17 10:02:32 +11:00
robert-hh b73d8b045a rp2/machine_bitstream: Implement the machine.bitstream driver.
Timing error is ~20ns at 125MHz, and ~10ns at 250MHz.
2021-11-17 10:01:15 +11:00
Pierre Constantineau da1ce6e80b
Merge branch 'adafruit:main' into board-pykey87 2021-11-16 15:53:42 -06:00
anecdata c2a5ca2fa2
INVERT the sense of the I2C_POWER pin (active low)
I don't have the board to test, but this was reported and discussed on Discord.
2021-11-16 14:47:53 -06:00
anecdata 193e936807 like #5571, but for AP 2021-11-16 12:21:50 -06:00
Dan Halbert 582a923ec9
Merge pull request #5579 from jepler/fix-optimization-same54
same54: Use the same optimization as other sam d5x/e5x
2021-11-16 08:32:08 -05:00
robert-hh 7d7d29dbe2 mimxrt: Fix mp_hal_quiet_timing_enter()/exit() so timer still runs.
The initial code disabled IRQs, which caused the us-ticks timer to stop.
The change here changes the priotity level, such that the timer still runs.
2021-11-16 23:20:06 +11:00
robert-hh 7cc9b257a9 mimxrt/boards: Update the board.json files and add deploy_xx.md files.
- Add board.md files for MIMXRT1060_EVK and MIMXRT1064_EVK warning about
  their experimental state.
- Add separate deploy_teensy.md and deploy_mimxrt.md files.
2021-11-16 23:17:42 +11:00
robert-hh d72d699dad mimxrt/boards: Add the Seeed ARCH MIX board.
The ARCH MIX board exposes the Ethernet Pins at it's connectors.  Therefore
the software is configured for using a LAN8720 PHY device.  Breakout boards
with the LAN8720 are easily available.
2021-11-16 23:11:21 +11:00
iabdalkader c3dceb1c32 rp2/boards: Add support for Arduino Nano RP2040. 2021-11-16 15:05:10 +11:00
Dan Halbert 73430af78b
-O2 without -fno-inline-functions 2021-11-15 22:36:23 -05:00
Dan Halbert bd22667eb5
Merge pull request #5571 from anecdata/set_mac
Set Station MAC address & validate connect SSID len
2021-11-15 20:33:54 -05:00
Pierre Constantineau 4f0fc1eb17
Merge branch 'adafruit:main' into board-pykey87 2021-11-15 16:45:15 -06:00
Scott Shawcroft ba2f32e374
Merge pull request #5578 from jepler/disable-mkfs-fat32
oofatfs: Allow fat32 mkfs to be compiled out.  optimize rainbowio & enable everywhere
2021-11-15 10:57:25 -08:00
Scott Shawcroft 894adc78e9
Merge pull request #5580 from jepler/litex-prototypes
litex: Enable -Werror=missing-prototypes
2021-11-15 10:22:59 -08:00
microDev 733bfbc10a
Merge branch 'main' into set_mac 2021-11-15 20:44:30 +05:30
Pierre Constantineau ce7cd22116 updated pins.c to enable support for PyKey87 2021-11-14 21:56:18 -06:00
Pierre Constantineau 2c3557d4af
Merge branch 'adafruit:main' into seeduino-xiao-rp2040 2021-11-14 21:44:10 -06:00
Jeff Epler edeb31f789
Fix remaining builds 2021-11-13 07:44:17 -06:00
iabdalkader 3745c393c8 rp2: Add support for Nina-W10 WiFi/BT module.
This commit integrates the Nina-W10 driver as an optional component in the
rp2 port.
2021-11-13 23:01:37 +11:00
Jeff Epler 59cb8e91b2
mimxrt1011: enable -Werror=missing-prototypes 2021-11-12 19:30:47 -06:00
Jeff Epler 535f4b3c54
mimxrt10xx: enable Werror 2021-11-12 19:30:43 -06:00
Mike Teachman b6dbbbe82f rp2/machine_i2s: Add I2S protocol support.
This commit adds I2S protocol support for the rp2 port:
- I2S API is consistent with STM32 and ESP32 ports
- I2S configurations supported:
  - master transmit and master receive
  - 16-bit and 32-bit sample sizes
  - mono and stereo formats
  - sampling frequency
  - 3 modes of operation:
    - blocking
    - non-blocking with callback
    - uasyncio
  - internal ring buffer size can be tuned
- DMA IRQs are managed on an I2S object basis, allowing other
  RP2 entities to use DMA IRQs when I2S is not being used
- MicroPython documentation
- tested on Raspberry Pi Pico development board
- build metric changes for this commit: text(+4552), data(0), bss(+8)

Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
2021-11-13 12:27:42 +11:00
MikeTeachman 6d5296e65e stm32,esp32: In machine_i2s, make object reference arrays root pointers.
This change eliminates the risk of the IRQ callback accessing invalid data.
Discussed here:
https://github.com/micropython/micropython/pull/7183#discussion_r660209875

Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
2021-11-13 12:22:42 +11:00
Jeff Epler ac978969f7
litex: Enable -Werror=missing-prototypes 2021-11-12 19:13:51 -06:00
Jeff Epler 1039e1116b
same54: Use the same optimization as other sam d5x/e5x
It's likely that this is a relic of my early testing.
2021-11-12 18:54:56 -06:00
Jeff Epler 1cea871c70
enable rainbowio on unix coverage port 2021-11-12 17:31:14 -06:00
Jeff Epler dfef5014ed
enable rainbowio with newly free space 2021-11-12 17:31:12 -06:00
Jeff Epler 12c95ee9e9
oofatfs: Allow fat32 mkfs to be compiled out
Saves 508 bytes
2021-11-12 17:31:12 -06:00
anecdata 31d45a3f32 fix old bug that was masking new bug 2021-11-12 16:27:13 -06:00
Dan Halbert b9ecb0fdb4
Merge pull request #5575 from jepler/bitmaptools-on-host
Enable bitmaptools on the 'unix' build, 'coverage' variant
2021-11-12 16:16:53 -05:00
Scott Shawcroft 1d76be2dbd
Merge pull request #5574 from microDev1/traceback
Fix traceback object init
2021-11-12 09:30:57 -08:00
Scott Shawcroft 6a8c82d542
Merge pull request #5573 from ladyada/main
fix speed by not rotating
2021-11-12 09:27:46 -08:00
Jeff Epler d55388a17d
Add bitmaptools to unix build 2021-11-12 10:47:18 -06:00
Jeff Epler c6dbc7df3a
Add displayio bitmaps to unix build 2021-11-12 10:47:17 -06:00
microDev b5dd8891e2
turn off `onewireio` on `feather_m0_adalogger` 2021-11-12 20:02:22 +05:30
MikeTeachman 0be3b91f11 stm32,esp32: In machine_i2s, send null samples in underflow situations.
Eliminate noise data from being sent to the I2S peripheral when the
transmitted sample stream is stopped.

Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
2021-11-12 16:50:15 +11:00
Magnus von Wachenfeldt 6d9da27c21 esp32: Support building with latest IDF v5.
The latest ESP-IDF v5.0-dev declares MAJOR_VERSION 5 and MINOR_VERSION 0.
timer_ll_set_alarm_enable() is also changed to timer_ll_set_alarm_value().
2021-11-12 16:40:46 +11:00
anecdata e4f06f69cd maybe fewer bytes 2021-11-11 23:23:52 -06:00
anecdata bb8e9ef483 tweak exception messages (re-tested) 2021-11-11 21:54:41 -06:00
lady ada 104af801b7 fix speed by not rotating 2021-11-11 21:39:23 -05:00
anecdata 18f2019300 Set Station MAC address & validate connect SSID len 2021-11-11 17:04:35 -06:00
Limor "Ladyada" Fried accadf9c25
Merge pull request #5570 from ladyada/main
add esp32s2 tft feather rev A
2021-11-11 17:06:34 -05:00
Scott Shawcroft c1177662cd
Merge pull request #5537 from microDev1/monitor-mode
Add Monitor Mode
2021-11-11 10:10:39 -08:00
Dan Halbert adac5ee596
Merge pull request #5563 from jepler/enable-error-missing-prototypes
Additional missing-prototypes fixes
2021-11-11 11:57:43 -05:00
lady ada 0ba47ed115 comma on 2021-11-11 11:43:44 -05:00
Jeff Epler cd6599ce65
A few more missing-prototypes fixes 2021-11-11 08:42:30 -06:00
lady ada bcec249091 displaaaaaaaaay 2021-11-10 23:13:22 -05:00
Dan Halbert f058c5ec8c fix kicksat-sprite 2021-11-10 23:05:06 -05:00
Jeff Epler 340d6b9213
more missing-prototypes fixes 2021-11-10 21:00:17 -06:00
Dan Halbert e7d9dc323b shrink kicksat-sprite, simmel, pyb_nano_v2 2021-11-10 21:12:41 -05:00
ladyada d30c3ba4c6 nu board w tft 2021-11-10 17:23:29 -05:00
Dan Halbert 58485bc0b1 Switch SAMD51 and SAME51 back to -Os from -O2
The SAMx51 builds were getting very close to full on larger translations. This PR
adds 1400 bytes of enabled features, and pushed some over the edge.
2021-11-10 16:00:38 -05:00
Jeff Epler ebc8359c67
disable missing-prototypes diagnostics in yet another tinyusb file 2021-11-10 12:47:55 -06:00
Jeff Epler 5cba23e04d
More missing-prototypes fixes 2021-11-10 12:22:07 -06:00
Jeff Epler 017b52c455
further raspberrypi fixes 2021-11-10 12:11:06 -06:00
microDev a62675a81a
fix wifi reset and monitor deinit routine 2021-11-10 23:38:44 +05:30
Jeff Epler 9e799a7c74
-Werror=missing-prototypes for nRF 2021-11-10 11:26:54 -06:00
Jeff Epler c9475adb00
Enable -Werror=missing-prototypes on espressif port 2021-11-10 11:07:45 -06:00
lady ada afd035eb56 remove old nopsram version 2021-11-10 12:05:16 -05:00
Jeff Epler 621953c960
Additional missing-prototypes fixes
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -06:00
Dan Halbert a69496b0e7
Merge pull request #5562 from microDev1/traceback
Refactor traceback handling
2021-11-10 11:53:35 -05:00
microDev 53a68f7ce6
turn off `onewireio` on `arduino_nano_33_iot` 2021-11-10 20:25:46 +05:30
Jeff Epler 63fbf98186
Enable -Wmissing-prototypes for atmel-samd 2021-11-09 20:05:00 -06:00
Jeff Epler 20cbd5e635 Disable bitmapio on some boards where it no longer fits 2021-11-08 18:58:33 -06:00
Jeff Epler cbfa41f238 Merge remote-tracking branch 'origin/main' into dither3 2021-11-08 16:46:36 -06:00
Scott Shawcroft bb71f8c9b3
Merge pull request #5544 from jepler/alphablend
bitmaptools: add alphablend
2021-11-08 10:50:03 -08:00
Jeff Epler 6351de6ad1 espressif: Allow -DENABLE_JTAG=0 to force JTAG off
With the Kaluga devkit, the camera interferes with the JTAG function.
However, having DEBUG turned on e.g., to get extended debug information
on the UART debug connection remains useful.

Now, by arranging to add to CFLAGS += -DDEBUG -DENABLE_JTAG=0, this
configuration is easy to achieve.
2021-11-08 10:38:05 -06:00
EmergReanimator 94866fc1e3
Merge branch 'adafruit:main' into stm 2021-11-07 14:19:54 +01:00
EmergReanimator a0074c36d8 Improved accuracy of common_hal_mcu_delay_us of STM port.
SysTick Current Value Register must be cleared before enabling.
2021-11-07 14:19:01 +01:00
Jeff Epler 6790f95953 Fix disabling of FRAMEBUFFERIO on atmel-samd
.. this needs to imply the disabling of RGBMATRIX too
2021-11-05 15:19:01 -05:00
Jeff Epler 4f62b540a2 Disable bitmaptools on thunderpack_v11 2021-11-05 15:18:41 -05:00
Dan Halbert 49207fba2c
Merge pull request #5549 from jepler/samd-watchdog-rounding
atmel-samd: Fix converting watchdog seconds to cycles
2021-11-05 14:39:59 -04:00
lady ada 02573676e7 add KB2040 and fix Trinkey QT2040 pid 2021-11-05 12:43:44 -04:00
Jeff Epler 43b593725b atmel-samd: Fix converting watchdog seconds to cycles
It's intended that the actual timeout always be at least the requested
timeout.  However, due to multiplying by the wrong factor to get from
seconds to cycles, a timeout request of e.g., 8.1s (which is less than
8.192s) would give an actual timeout of 8, not 16 as it should.
2021-11-05 11:40:08 -05:00
Jeff Epler 8e8c44afea Merge remote-tracking branch 'origin/main' into alphablend 2021-11-05 11:24:51 -05:00
Jeff Epler d532ad388b disable framebufferio so bitmaptools can fit 2021-11-05 11:24:03 -05:00
Damien George ff4f1f3ab3 esp8266/boards/GENERIC: Enable f-strings.
Costs 612 bytes of code space.

Signed-off-by: Damien George <damien@micropython.org>
2021-11-05 14:05:54 +11:00
Damien George fa873ce67c minimal/mpconfigport.h: Disable features that are not needed.
Now that there are feature levels, and that this port uses
MICROPY_CONFIG_ROM_LEVEL_MINIMUM, it's easy to see what optional features
can be disabled.  And this commit disables them.

Signed-off-by: Damien George <damien@micropython.org>
2021-11-05 13:12:18 +11:00
Jeff Epler 334a9c85ce Merge remote-tracking branch 'origin/main' into gifio 2021-11-04 20:22:00 -05:00
Scott Shawcroft a08412420e
Merge pull request #5540 from jepler/continuous-capture
ParallelImageCapture: Add continuous capture on espressif
2021-11-04 13:33:32 -07:00
microDev b435e7b56a
update wifi monitor
- rename loss method to lost
- add method to get queued packet count

Co-authored-by: anecdata <16617689+anecdata@users.noreply.github.com>
2021-11-04 16:21:18 +05:30
Jim Mussared c9c55032dc minimal/Makefile: Don't force a 32-bit build.
Word-size specific configuration is now done automatically, so it no longer
requires this to match the ARM configuration.

Also it's less common to have 32-bit compilation support installed, so this
will make it work "out of the box" for more people.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-04 15:59:20 +11:00
Scott Shawcroft 0dfb7a9a2d
Merge pull request #5541 from DavePutz/issue_5477
Corrected number of serial bytes returned
2021-11-03 16:53:15 -07:00
root 1e3215f4ee Corrected number of serial bytes returned 2021-11-03 16:29:05 -05:00
Pierre Constantineau f3eb9ea5e1
Merge branch 'adafruit:main' into seeduino-xiao-rp2040 2021-11-03 14:07:45 -06:00
Jeff Epler a8614a61dc ParallelImageCapture: Add continuous capture on espressif
By having a pair of buffers, the capture hardware can fill one buffer while
Python code (including displayio, etc) operates on the other buffer.  This
increases the responsiveness of camera-using code.

On the Kaluga it makes the following improvements:
 * 320x240 viewfinder at 30fps instead of 15fps using directio
 * 240x240 animated gif capture at 10fps instead of 7.5fps

As discussed at length on Discord, the "usual end user" code will look like
this:

    camera = ...

    with camera.continuous_capture(buffer1, buffer2) as capture:
        for frame in capture:
            # Do something with frame

However, rather than presenting a context manager, the core code consists of
three new functions to start & stop continuous capture, and to get the next
frame.  The reason is twofold.  First, it's simply easier to implement the
context manager object in pure Python.  Second, for more advanced usage, the
context manager may be too limiting, and it's easier to iterate on the right
design in Python code.  In particular, I noticed that adapting the
JPEG-capturing programs to use continuous capture mode needed a change in
program structure.

The camera app was structured as
```python
while True:
    if shutter button was just pressed:
        capture a jpeg frame
    else:
        update the viewfinder
```

However, "capture a jpeg frame" needs to (A) switch the camera settings and (B)
capture into a different, larger buffer then (C) return to the earlier
settings. This can't be done during continuous capture mode. So just
restructuring it as follows isn't going to work:

```python
with camera.continuous_capture(buffer1, buffer2) as capture:
    for frame in capture:
        if shutter button was just pressed:
            capture a jpeg frame, without disturbing continuous capture mode
        else:
            update the viewfinder
```

The continuous mode is only implemented in the espressif port; others
will throw an exception if the associated methods are invoked.  It's not
impossible to implement there, just not a priority, since these micros don't
have enough RAM for two framebuffer copies at any resonable sizes.

The capture code, including single-shot capture, now take mp_obj_t in the
common-hal layer, instead of a buffer & length.  This was done for the
continuous capture mode because it has to identify & return to the user the
proper Python object representing the original buffer.  In the Espressif port,
it was convenient to implement single capture in terms of a multi-capture,
which is why I changed the singleshot routine's signature too.
2021-11-03 11:02:46 -05:00
Pierre Constantineau a75473af96 update to EXTERNAL_FLASH_DEVICES to Puya P25Q16H 2021-11-02 20:52:58 -06:00
Dan Halbert 38c381633b
Merge pull request #5534 from jepler/add-rainbowio
Add rainbowio
2021-11-02 21:57:08 -04:00
Jeff Epler 63e01cde77 we decided not to add rainbowio on simmel 2021-11-02 19:01:05 -05:00
microDev 27b137f931
Merge branch 'main' into monitor-mode 2021-11-02 13:56:56 +05:30
microDev 4e207853f0
rearrange hostname 2021-11-02 12:33:11 +05:30
microDev 95172cf3ce
add monitor class
Co-authored-by: anecdata <16617689+anecdata@users.noreply.github.com>
2021-11-02 12:32:09 +05:30
Jeff Epler 18eaee9beb reenable RAINBOWIO on these boards 2021-11-01 12:52:13 -05:00
Kong Wai Weng 36459c8a5a Fixed whitespace issues. 2021-11-01 16:50:46 +08:00
Kong Wai Weng e0332c1e49 Using 4x spaces instead of a tab. 2021-11-01 16:47:02 +08:00
Kong Wai Weng b64ec36418 Using GP0 as default LED pin. 2021-11-01 16:43:13 +08:00
Kong Wai Weng 0034472778 Reversal of PR #4981. GPIO25 on Maker Pi RP2040 is not connected to anything. 2021-11-01 16:26:40 +08:00
Jim Mussared 693b927687 rp2: Enable optimisations (comp goto, map cache, fast attr).
Computed goto costs 1800 bytes for 5-10% performance.

Map caching and attr fast path costs 130 bytes for up to 30%.

Net effect of those three optimisations:
bm_chaos.py         +16.059% (+/-0.09%)
bm_fannkuch.py      +11.145% (+/-0.01%)
bm_fft.py           +14.604% (+/-0.01%)
bm_float.py         +26.849% (+/-0.08%)
bm_hexiom.py        +34.039% (+/-0.03%)
bm_nqueens.py       +18.333% (+/-0.06%)
bm_pidigits.py       +4.472% (+/-0.03%)
misc_aes.py         +28.765% (+/-0.09%)
misc_mandel.py      +27.116% (+/-0.05%)
misc_pystone.py     +40.299% (+/-0.20%)
misc_raytrace.py    +22.812% (+/-0.07%)

Also enable other EXTRA-level optimisations (module const, return_if_expr,
triple_tuple_assign, factorial, mpz bitwise).

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-01 15:25:45 +11:00
Damien George c62351fbd6 py/mpconfig.h: Revert MICROPY_REPL_INFO to disabled at all levels.
This is an stm32-specific feature that's accessed via the pyb module, so
not something that will be widely enabled.

Signed-off-by: Damien George <damien@micropython.org>
2021-11-01 15:18:22 +11:00
Jim Mussared b1a0ce46d1 rp2/mpconfigport.h: Use the "extra" feature level.
This commit is a no-op change to simplify existing config.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-01 15:02:58 +11:00
Jim Mussared 3041881353 stm32/mpconfigport.h: Use the "extra" feature level.
This commit is a no-op change.  Future improvements can come from making
individual boards use CORE or BASIC.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-01 15:02:22 +11:00
Damien George ad17d9f001 bare-arm/mpconfigport.h: Disable remaining optional features.
Signed-off-by: Damien George <damien@micropython.org>
2021-11-01 14:23:06 +11:00
Damien George b4de39c43c bare-arm/mpconfigport.h: Use MICROPY_CONFIG_ROM_LEVEL_MINIMUM.
To simplify the config.  This commit does not change the build.

Signed-off-by: Damien George <damien@micropython.org>
2021-11-01 14:17:22 +11:00
Scott Shawcroft bf0bef9684
Split listdir entries across two packets
when the MTU of the BLE connection is smaller than the 28 bytes of
the header. (The smallest possible MTU is 20.)

Fixes #5511
2021-10-28 10:57:16 -07:00
Mike Causer 7f14344428 ports: Add images, features and urls to board.json. 2021-10-28 15:25:38 +11:00
Damien George 83827e8e63 stm32/uart: Fix race conditions and clearing status in IRQ handler.
Prior to this commit IRQs on STM32F4 could be lost because SR is cleared by
reading SR then reading DR.  For example, if both RXNE and IDLE IRQs were
active upon entry to the IRQ handler, then IDLE is lost because the code
that handles RXNE comes first and accidentally clears SR (by reading SR
then DR to get the incoming character).

This commit fixes this problem by making the IRQ handler more atomic in the
following operations:
- get current IRQ status flags
- deal with RX character
- clear remaining status flags
- call user handler

On the STM32F4 it's very hard to get this right because the only way to
clear IRQ status flags is to read SR then DR, but the read of DR may read
some data which should remain in the register until the user wants to read
it.  And it won't work to cache the read because RTS/CTS flow control will
then not work.  So instead the new code disables interrupts if the DR is
full and waits for the user to read it before reenabling the interrupts.

Fixes issue mentioned in #4599 and #6082.

Signed-off-by: Damien George <damien@micropython.org>
2021-10-28 13:14:21 +11:00
Mike Causer 07ea1afe74 esp32/boards/ESP32_S2_WROVER: Link to specific deploy_s2 instructions. 2021-10-28 12:58:58 +11:00
Mike Causer 3ace779e8e esp32/boards/LOLIN_S2_PICO: Add LOLIN_S2_PICO board definition files. 2021-10-28 12:58:50 +11:00
Damien George 1e4849557d esp32/usb: Further improve speed of USB CDC output.
Following on from ba940250a5, the change here
makes output about 15 times faster (now up to about 550 kbytes/sec).

tinyusb_cdcacm_write_queue will return the number of bytes written, so
there's no need to use tud_cdc_n_write_available.

Signed-off-by: Damien George <damien@micropython.org>
2021-10-28 11:37:35 +11:00
Seon Rozenblum 5b9c9cd097 esp32/boards: Update board and deploy metadata for UM_xxx boards. 2021-10-28 11:32:13 +11:00
Mike Causer 590ec2ca6e stm32/boards: Add images to board.json for Adafruit and VCC_GND boards. 2021-10-28 09:52:59 +11:00
Mike Causer 5bb14c4e46 esp32/boards/LOLIN_S2_MINI: Add image to board.json. 2021-10-28 09:51:04 +11:00
Jim Mussared 910e9f9111 esp32: Add specific deploy_s2.md instructions for esp32-s2.
In particular the UM S2 boards (and update the features list).

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-28 09:47:47 +11:00
Pierre Constantineau ceeec6f1a0 updated USB PID to match one received from MengDu from Seeed 2021-10-27 08:10:47 -06:00
Pierre Constantineau c9f834f3a1 added LEDs 2021-10-26 21:55:38 -06:00
Pierre Constantineau 0f9e3eed01 initial commit for Seeed Review 2021-10-26 21:48:11 -06:00
Jim Mussared e359b077dd ports: Add board.json for all boards.
This will be used by https://micropython.org/download/ to generate the
full listing of boards and firmware files.

Optionally supports a board.md for additional customisation of the
download page, as well as deploy.md for flashing instructions.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-27 14:04:53 +11:00
Dan Halbert c61ab864da
Update ports/espressif/boards/adafruit_feather_esp32s2/board.c 2021-10-26 17:14:23 -04:00
Limor "Ladyada" Fried 037d893923
Update ports/espressif/boards/adafruit_feather_esp32s2/pins.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2021-10-26 15:55:18 -04:00
Limor "Ladyada" Fried ccb6c5e5a9
Update ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2021-10-26 15:55:11 -04:00
Limor "Ladyada" Fried 5e59fa65ec
Update ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2021-10-26 15:54:49 -04:00
Jeff Epler b881aec4c5 disable gifio on meowbit 2021-10-26 14:24:11 -05:00
lady ada 613f314857 will delete later 2021-10-26 15:09:05 -04:00
lady ada ba4e9797c7 add a nuuuuuboard 2021-10-26 15:05:10 -04:00
Jeff Epler 3e020a73a8 Disable gifio if no displayio & for small boards
Technically all gifio needs from displayio is the definition of
colorspaces, but let's just disable it for now.
2021-10-26 08:54:18 -05:00
Jeff Epler 8c7760b1a6 don't include gifio on samd21 boards 2021-10-26 08:54:18 -05:00
Jeff Epler c34b6f757f Implement gifio.GifWriter
This involves:
 * Adding a new "L8" colorspace for colorconverters
 * factoring out displayio_colorconverter_convert_pixel
 * Making a minimal "colorspace only" version of displayio for the
   unix port (testing purposes)
 * fixing an error message

I only tested writing B&W animated images, with the following script:
```python
import displayio
import gifio

with gifio.GifWriter("foo.gif", 64, 64, displayio.Colorspace.L8) as g:
    for i in range(0, 256, 14):
        data = bytes([i, 255-i] * 32 + [255-i, i] * 32) * 32
        print("add_frame")
        g.add_frame(data)

# expected to raise an error, buffer is not big enough
with gifio.GifWriter("/dev/null", 64, 64, displayio.Colorspace.L8) as g:
    g.add_frame(bytes([3,3,3]))
```
2021-10-26 08:54:18 -05:00
Dan Halbert e868f1b1fe
Merge pull request #5510 from jepler/cmd25-v2
sdcardio: Use CMD25 across multiple writeblocks() calls
2021-10-26 08:46:28 -04:00
Scott Shawcroft 5315348b11
Merge pull request #5425 from maholli/samd-sleep
functioning samd deep sleep ('alarm.time' & 'alarm.pin')
2021-10-25 14:42:12 -07:00
Scott Shawcroft de45382599
Merge pull request #5504 from solderparty/rp2040_stamp
Add the Solder Party RP2040 Stamp board
2021-10-25 14:08:04 -07:00
Jeff Epler d999a88e57 Drop Adafruit_CircuitPython_SD where sdcardio is enabled 2021-10-25 16:07:27 -05:00
Dan Halbert 7377375e8d
Merge pull request #5506 from maholli/nvm-toml-fix
NVM toml fix (MRAM)
2021-10-25 16:50:43 -04:00
Dan Halbert 644272ee8b
Merge pull request #5509 from DavePutz/issue_5469
Added reset of pulsein buffer pointer
2021-10-25 16:35:24 -04:00
Jim Mussared 43467b9c71 extmod/modbluetooth: Add connection interval to gap_connect.
This forwards through directly to the NimBLE and BTStack connect functions.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-26 00:16:53 +11:00
robert-hh 9f6604eb27 mimxrt: Enable the platform module. 2021-10-25 23:54:52 +11:00
robert-hh 4f89c38a6a mimxrt: Optimize the runtime speed.
By moving code to ITCM, like vm, gc, parse, runtime.  The change affects
mostly the execution speed of MicroPython code.  The speed is increased by
up to a factor of 6, especially for MCU with small cache.
2021-10-25 23:54:47 +11:00
robert-hh 90b45efa6a mimxrt/boards/make-pins.py: Allow empty lines and comments in pins.csv. 2021-10-25 23:53:51 +11:00
robert-hh 6754213a9d mimxrt/modmachine: Implement soft_reset() and unique_id() functions. 2021-10-25 23:53:48 +11:00
robert-hh a12e318948 mimxrt/mpconfigport.h: Enable f-strings. 2021-10-25 23:52:35 +11:00
robert-hh c827d4b7ab mimxrt: Extend the help() message and README.md. 2021-10-25 23:52:08 +11:00
robert-hh e7572776c3 mimxrt: Add dht_readinto() to the mimxrt module, and freeze dht.py.
The change affects dht.py from the drivers directory as well to include the
logic for the mimxrt port.
2021-10-25 23:49:28 +11:00
robert-hh 99221cd118 mimxrt: Fix cycle counter for time.ticks_cpu() and machine.bitstream().
Prior to this commit mp_hal_ticks_cpu() was not started properly.  It only
started when the code was executed with a debugger attached, except for the
Teensy (i.MXRT1062) boards.  As an additional fix, the CYYCNT timer is now
started at boot time.

Also rename mp_hal_ticks_cpu_init() to mp_hal_ticks_cpu_enable().
2021-10-25 15:50:44 +11:00
robert-hh 06d1b02014 mimxrt/dma_channel: Fix the DMA channel management.
The MIMXRT1011 has only 16 channels, so size the channel list accordingly.
2021-10-25 15:50:44 +11:00
robert-hh 101d2ddea3 mimxrt/hal: Remove duplicate definitions from flexspi_hyper_flash.h. 2021-10-25 15:50:44 +11:00
robert-hh 68146aa197 mimxrt/boards: Fix the D14/D15 pin assignment of MIMXRT1050/60/64_EVK.
There are several PCB layouts in the market under the same name.
2021-10-25 15:50:38 +11:00
robert-hh c2e4759cfa mimxrt/modmachine: Implement machine.WDT() and machine.reset_cause().
The API follows that of rp2, stm32, esp32, and the docs.

    wdt=machine.WDT(0, timeout)

        Timeout is given in ms. The valid range is 500 to 128000 (128
        seconds) with 500 ms granularity. Values outside of that range will
        be silently aligned.

    wdt.feed()

        Resets the watchdog timer (feeding).

    wdt.timeout_ms(value)

        Sets a new timeout and feeds the watchdog.

        This is a new, preliminary method which is not yet documented.

    reset_cause = machine.reset_cause()

        Values returned:

        1  Power On reset
        3  Watchdog reset
        5  Software reset: state after calling machine.reset()

More elaborate API functions are supported by the MCU, like an interrupt
called a certain time after feeding.  But for port cosistency that is not
implemented.
2021-10-25 15:43:56 +11:00
robert-hh 1866ed7e2e mimxrt/eth: Add LAN support and integrate the network module.
This commit implements 10/100 Mbit Ethernet support in the mimxrt port.

The following boards are configured without ETH network:
- MIMXRT1010_EVK
- Teensy 4.0

The following boards are configured with ETH network:
- MIMXRT1020_EVK
- MIMXRT1050_EVK
- MIMXRT1060_EVK
- MIMXRT1064_EVK
- Teensy 4.1

Ethernet support tested with TEENSY 4.1, MIMRTX1020_EVK and MIMXRT1050_EVK.
Build tested with Teensy 4.0 and MIMXRT1010_EVK to be still working.
Compiles and builds properly for MIMXRT1060_EVK and MIMXRT1064_EVK, but not
tested lacking suitable boards.

Tested functions are:
- ping works bothway
- simple UDP transfer works bothway
- ntptime works
- the ftp server works
- secure socker works
- telnet and webrepl works

The MAC address is 0x02 plus 5 bytes from the manifacturing info field,
which can be considered as unique per device.

Some boards do not wire the RESET and INT pin of the PHY transceiver.  For
operation, these are not required.  If they are defined, they will be used.
2021-10-25 15:14:26 +11:00
root d2febfaf20 Added reset of pulsein buffer pointer 2021-10-24 20:46:18 -05:00
Max Holliday 339cf5ecf9 staying caught up with runtime changes 2021-10-24 15:49:14 -07:00
Max Holliday e45fe3d778
Merge branch 'adafruit:main' into samd-sleep 2021-10-24 15:46:07 -07:00
Pierre Constantineau 3425bcc910 added startup delay multiplier 2021-10-24 14:20:07 -06:00
Max Holliday adbff053ce fix QSPI_SINGLE pin definitions 2021-10-24 12:37:30 -07:00
arturo182 915275e5fd Add the Solder Party RP2040 Stamp board 2021-10-24 17:13:41 +02:00
Max Holliday 943f2b2085 remove interrupt_char.h 2021-10-23 09:01:40 -07:00
Pierre Constantineau 40326ab3f9 fix pre-commit 2021-10-22 18:35:38 -06:00
Pierre Constantineau d6e9e9c3c9 added neopixel to mpconfigboard.h 2021-10-22 18:32:21 -06:00
Philipp Ebensberger 7e62c9707a mimxrt/sdram: Add SDRAM support.
Adds support for SDRAM via `SEMC` peripheral. SDRAM support can be
enabled in the mpconfigboard.mk file by setting `MICROPY_HW_SDRAM_AVAIL`
to `1` and poviding the size of the RAM via `MICROPY_HW_FLASH_SIZE`.

When SDRAM support is enabled the whole SDRAM is currently used used
for MicroPython heap.

Signed-off-by: Philipp Ebensberger
2021-10-22 08:23:24 +02:00
Max Holliday 397b2f6bb5 pin alarm configures pins again before deep sleep 2021-10-21 10:03:46 -07:00
Max Holliday e74a8e38fe
Merge branch 'adafruit:main' into samd-sleep 2021-10-21 09:52:55 -07:00
Scott Shawcroft cf4597c6db
Merge pull request #5484 from dhalbert/samd21-pdmin-fix
fix SAMD21 PDMIn DMA event use
2021-10-20 09:47:13 -07:00
Damien George 30268c93dc stm32/pendsv: Allow a board to add entries for pendsv_schedule_dispatch.
Signed-off-by: Damien George <damien@micropython.org>
2021-10-20 21:20:18 +11:00
Damien George 69522822de stm32/mpbthciport: Allow a board to hook BT HCI poll functions.
Signed-off-by: Damien George <damien@micropython.org>
2021-10-20 21:20:18 +11:00
Damien George 5f2f9044ff stm32/usbd_cdc_interface: Allow a board to hook into USBD CDC RX events.
Signed-off-by: Damien George <damien@micropython.org>
2021-10-20 21:20:18 +11:00
Dan Halbert fc440e7609 move sercom_reset() etc. out of busio/SPI.c to busio/__init__.c 2021-10-19 15:18:32 -04:00
Jeff Epler 39795430a4
Apply suggestions from code review
Eliminates the "pet" function

Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2021-10-19 13:25:28 -05:00
Dan Halbert 79ee78e690 fix SAMD21 PDMIn DMA event use 2021-10-19 13:18:14 -04:00
Jeff Epler d38cf05e59 samd51: Add watchdog timer 2021-10-19 10:52:14 -05:00
Andrew Leech cc42b7c88b unix/modusocket: Support MP_STREAM_POLL in unix socket_ioctl.
Allows asyncio reading of network sockets when MICROPY_PY_USELECT is used
in the build configuration.
2021-10-19 22:48:10 +11:00
Jeff Epler 9eebb3dbab rotaryio: Add the ability to set the divisor
At present, Adafruit's rotary encoders all move 1 quadrature cycle per
detent, so we originally hard-coded division-by-4.  However, other
encoders exist, including ones without detents, ones with 2 detents per
cycle, and others with 4 detents per cycle.

The new `divisor` property and constructor argument allows selecting
a divisor of 1, 2, or 4; with the default of 4 giving backward
compatibility.

The property is not supported (yet?) on espressif MCUs; it throws an
error if a value other than 4 is set.
2021-10-16 09:43:45 -05:00
Dan Halbert 23d2c96476
Merge pull request #5466 from jepler/merge-1.17
Merge 1.17
2021-10-15 23:34:31 -04:00
Jeff Epler 414c2f9da6 Always use python3
.. similar to https://github.com/micropython/micropython/pull/4448
2021-10-15 15:11:21 -05:00
Jeff Epler 4e7c1a4bd4 Rename make_new's parameter to `all_args`
.. and fix two straggling modules that weren't updated at all.
Maybe they're not included in any builds?
2021-10-15 13:49:33 -05:00
microDev 23b24278a7
Merge pull request #5465 from melopero/main
Added D17/Battery Pin definition to melopero shake rp2040
2021-10-15 21:47:47 +05:30
Leonardo La Rocca 45600b1b99
Update ports/raspberrypi/boards/melopero_shake_rp2040/pins.c
Co-authored-by: microDev <70126934+microDev1@users.noreply.github.com>
2021-10-15 16:52:25 +02:00
Damien George ba940250a5 esp32/usb: Improve speed of USB CDC output.
Signed-off-by: Damien George <damien@micropython.org>
2021-10-16 00:23:59 +11:00
Jeff Epler 8d8f83bc05 Merge tag 'v1.17' into merge-1.17
F-strings, new machine.I2S class, ESP32-C3 support and LEGO_HUB_NO6 board

This release of MicroPython adds support for f-strings (PEP-498), with a
few limitations compared to normal Python.  F-strings are essentially
syntactic sugar for "".format() and make formatting strings a lot more
convenient.  Other improvements to the core runtime include pretty printing
OSError when it has two arguments (an errno code and a string), scheduling
of KeyboardInterrupt on the main thread, and support for a single argument
to the optimised form of StopIteration.

In the machine module a new I2S class has been added, with support for
esp32 and stm32 ports.  This provides a consistent API for transmit and
receive of audio data in blocking, non-blocking and asyncio-based
operation.  Also, the json module has support for the "separators" argument
in the dump and dumps functions, and framebuf now includes a way to blit
between frame buffers of different formats using a palette.  A new,
portable machine.bitstream function is also added which can output a stream
of bits with configurable timing, and is used as the basis for driving
WS2812 LEDs in a common way across ports.

There has been some restructuring of the repository directory layout, with
all third-party code now in the lib/ directory.  And a new top-level
directory shared/ has been added with first-party code that was previously
in lib/ moved there.

The docs have seen further improvement with enhancements and additions to
the rp2 parts, as well as a new quick reference for the zephyr port.
The terms master/slave have been replaced with controller/peripheral,
mainly relating to I2C and SPI usage.  And u-module references have been
replaced with just the module name without the u-prefix to help clear up
the intended usage of modules in MicroPython.

For the esp8266 and esp32 ports, hidden networks are now included in WLAN
scan results.  On the esp32 the RMT class is enhanced with idle_level and
write_pulses modes.  There is initial support for ESP32-C3 chips with
GENERIC_C3 and GENERIC_C3_USB boards.

The javascript port has had its Makefile and garbage collector
implementation reworked so it compiles and runs with latest the Emscripten
using asyncify.

The mimxrt port sees the addition of hardware I2C and SPI support, as well
as some additional methods to the machine module.  There is also support
for Hyperflash chips.

The nrf port now has full VFS storage support, enables source-line on
traceback, and has .mpy features consistent with other ports.

For the rp2 port there is now more configurability for boards, and more
boards added.

The stm32 port has a new LEGO_HUB_NO6 board definition with detailed
information how to get this LEGO Hub running stock MicroPython.  There is
also now support to change the CPU frequency on STM32WB MCUs.  And USBD_xxx
descriptor options have been renamed to MICROPY_HW_USB_xxx.

Thanks to everyone who contributed to this release: Amir Gonnen, Andrew
Scheller, Bryan Tong Minh, Chris Wilson, Damien George, Daniel Mizyrycki,
David Lechner, David P, Fernando, finefoot, Frank Pilhofer, Glenn Ruben
Bakke, iabdalkader, Jeff Epler, Jim Mussared, Jonathan Hogg, Josh Klar,
Josh Lloyd, Julia Hathaway, Krzysztof Adamski, Matúš Olekšák, Michael
Weiss, Michel Bouwmans, Mike Causer, Mike Teachman, Ned Konz, NitiKaur,
oclyke, Patrick Van Oosterwijck, Peter Hinch, Peter Züger, Philipp
Ebensberger, robert-hh, Roberto Colistete Jr, Sashkoiv, Seon Rozenblum,
Tobias Thyrrestrup, Tom McDermott, Will Sowerbutts, Yonatan Goldschmidt.

What follows is a detailed list of changes, generated from the git commit
history, and organised into sections.

Main components
===============

all:
- fix signed shifts and NULL access errors from -fsanitize=undefined
- update to point to files in new shared/ directory

py core:
- mpstate: make exceptions thread-local
- mpstate: schedule KeyboardInterrupt on main thread
- mperrno: add MP_ECANCELED error code
- makeqstrdefs.py: don't include .h files explicitly in preprocessing
- mark unused arguments from bytecode decoding macros
- objexcept: pretty print OSError also when it has 2 arguments
- makeversionhdr: add --tags arg to git describe
- vm: simplify handling of MP_OBJ_STOP_ITERATION in yield-from opcode
- objexcept: make mp_obj_exception_get_value support subclassed excs
- support single argument to optimised MP_OBJ_STOP_ITERATION
- introduce and use mp_raise_type_arg helper
- modsys: optimise sys.exit for code size by using exception helpers
- objexcept: make mp_obj_new_exception_arg1 inline
- obj: fix formatting of comment for mp_obj_is_integer
- emitnative: reuse need_reg_all func in need_stack_settled
- emitnative: ensure stack settling is safe mid-branch
- runtime: fix bool unary op for subclasses of native types
- builtinimport: fix condition for including do_execute_raw_code()
- mkrules: automatically build mpy-cross if it doesn't exist
- implement partial PEP-498 (f-string) support
- lexer: clear fstring_args vstr on lexer free
- mkrules.mk: do submodule sync in "make submodules"

extmod:
- btstack: add missing call to mp_bluetooth_hci_uart_deinit
- btstack: check that BLE is active before performing operations
- uasyncio: get addr and bind server socket before creating task
- axtls-include: add axtls_os_port.h to customise axTLS
- update for move of crypto-algorithms, re1.5, uzlib to lib
- moduselect: conditionally compile select()
- nimble: fix leak in l2cap_send if send-while-stalled
- btstack/btstack.mk: use -Wno-implicit-fallthrough, not =0
- utime: always invoke mp_hal_delay_ms when >= to 0ms
- modbluetooth: clamp MTU values to 32->UINT16_MAX
- nimble: allow modbluetooth binding to hook "sent HCI packet"
- nimble: add "memory stalling" mechanism for l2cap_send
- uasyncio: in open_connection use address info in socket creation
- modujson: add support for dump/dumps separators keyword-argument
- modlwip: fix close and clean up of UDP and raw sockets
- modbluetooth: add send_update arg to gatts_write
- add machine.bitstream
- modframebuf: enable blit between different formats via a palette

lib:
- tinyusb: update to version 0.10.1
- pico-sdk: update to version 1.2.0
- utils/stdout_helpers: make mp_hal_stdout_tx_strn_cooked efficient
- axtls: switch to repo at micropython/axtls
- axtls: update to latest axtls 2.1.5 wih additional commits
- re1.5: move re1.5 code from extmod to lib
- uzlib: move uzlib code from extmod to lib
- crypto-algorithms: move crypto-algorithms code from extmod to lib
- update README's based on contents of these dirs

drivers:
- neopixel: add common machine.bitstream-based neopixel module
- neopixel: optimize fill() for speed
- neopixel: reduce code size of driver
- cyw43: fix cyw43_deinit so it can be called many times in a row
- cyw43: make wifi join fail if interface is not active

mpy-cross:
- disable stack check when building with Emscripten

Support components
==================

docs:
- library: document new esp32.RMT features and fix wait_done
- library: warn that ustruct doesn't handle spaces in format strings
- esp8266/tutorial: change flash mode from dio to dout
- replace master/slave with controller/peripheral in I2C and SPI
- rp2: enhance quickref and change image to Pico pinout
- rp2: update general section to give a brief technical overview
- library/utime.rst: clarify behaviour and precision of sleep ms/us
- library/uasyncio.rst: document stream readexactly() method
- library/machine.I2S.rst: fix use of sd pin in examples
- zephyr: add quick reference for the Zephyr port
- library/zephyr: add libraries specific to the Zephyr port
- templates: add unix and zephyr quickref links to top-index
- rename ufoo.rst to foo.rst
- replace ufoo with foo in all docs
- library/index.rst: clarify module naming and purpose
- library/builtins.rst: add module title
- library/network.rst: simplify socket import
- add docs for machine.bitstream and neopixel module
- library: fix usage of :term: for frozen module reference
- esp8266: use monospace for software tools
- reference: mention that slicing a memoryview causes allocation

examples: no changes specific to this component/port

tests:
- extmod: make uasyncio_heaplock test more deterministic
- cpydiff/modules_struct_whitespace_in_format: run black
- extmod/ujson: add tests for dump/dumps separators argument
- run-multitests.py: add broadcast and wait facility
- multi_bluetooth/ble_subscribe.py: add test for subscription
- extmod/vfs_fat_finaliser.py: ensure alloc at never-used GC blocks
- basics: split f-string debug printing to separate file with .exp
- pybnative: make while.py test run on boards without pyb.delay

tools:
- autobuild: add scripts to build release firmware
- remove obsolete build-stm-latest.sh script
- ci.sh: run apt-get update in ci_powerpc_setup
- makemanifest.py: allow passing flags to mpy-tool.py
- autobuild: add mimxrt port to build scripts for nightly builds
- pyboard.py: add cmd-line option to make soft reset configurable
- mpremote: swap order of PID and VID in connect-list output
- ci.sh: build unix dev variant as part of macOS CI
- ci.sh: build GENERIC_C3 board as part of esp32 CI
- autobuild: use separate IDF version to build newer esp32 SoCs
- autobuild: add FeatherS2 and TinyS2 to esp32 auto builds
- mpremote: add seek whence for mounted files
- mpremote: raise OSError on unsupported RemoteFile.seek
- autobuild: add the MIMXRT1050_EVKB board to the daily builds
- ci.sh: add mpy-cross build to nrf port
- codeformat.py: include ports/nrf/modules/nrf in code formatting
- gen-cpydiff.py: don't rename foo to ufoo in diff output
- autobuild: add auto build for Silicognition wESP32
- mpremote: fix connect-list in case VID/PID are None
- mpremote: add "devs" shortcut for "connect list"
- mpremote: remove support for pyb.USB_VCP in/out specialisation
- autobuild: don't use "-B" for make, it's already a fresh build
- pyboard.py: move --no-exclusive/--soft-reset out of mutex group
- pyboard.py: make --no-follow use same variable as --follow
- pyboard.py: add --exclusive to match --no-exclusive
- pyboard.py: make --no-soft-reset consistent with other args
- uncrustify: force 1 newline at end of file
- mpremote: bump version to 0.0.6

CI:
- workflows: add workflow to build and test javascript port
- workflows: switch from Coveralls to Codecov
- workflows: switch from lcov to gcov
- workflows: add workflow to build and test unix dev variant

The ports
=========

all ports:
- use common mp_hal_stdout_tx_strn_cooked instead of custom one
- update for move of crypto-algorithms, uzlib to lib
- rename USBD_VID/PID config macros to MICROPY_HW_USB_VID/PID

bare-arm port: no changes specific to this component/port

cc3200 port: no changes specific to this component/port

esp8266 port:
- add __len__ to NeoPixel driver to support iterating
- Makefile: add more libm files to build
- include hidden networks in WLAN.scan results
- replace esp.neopixel with machine.bitstream
- remove dead code for end_ticks in machine_bitstream

esp32 port:
- boards/sdkconfig.base: disable MEMPROT_FEATURE to alloc from IRAM
- add __len__ to NeoPixel driver to support iterating
- main: allow MICROPY_DIR to be overridden
- esp32_rmt: fix RMT looping in newer IDF versions
- esp32_rmt: enhance RMT with idle_level and write_pulses modes
- add new machine.I2S class for I2S protocol support
- machine_spi: calculate actual attained baudrate
- machine_hw_spi: use a 2 item SPI queue for long transfers
- machine_dac: add MICROPY_PY_MACHINE_DAC option, enable by default
- machine_i2s: add MICROPY_PY_MACHINE_I2S option, enable by default
- fix use of mp_int_t, size_t and uintptr_t
- add initial support for ESP32C3 SoCs
- boards/GENERIC_C3: add generic C3-based board
- modmachine: release the GIL in machine.idle()
- mphalport: always yield at least once in delay_ms
- machine_uart: add flow kw-arg to enable hardware flow control
- boards: add Silicognition wESP32 board configuration
- mpconfigport.h: enable reverse and inplace special methods
- include hidden networks in WLAN.scan results
- makeimg.py: get bootloader and partition offset from sdkconfig
- enable MICROPY_PY_FSTRINGS by default
- machine_hw_spi: release GIL during transfers
- machine_pin: make check for non-output pins respect chip variant
- replace esp.neopixel with machine.bitstream
- remove dead code for end_ticks in machine_bitstream
- boards: add GENERIC_C3_USB board with USB serial/JTAG support

javascript port:
- rework Makefile and GC so it works with latest Emscripten
- Makefile: suppress compiler errors from array bounds
- Makefile: change variable to EXPORTED_RUNTIME_METHODS

mimxrt port:
- move calc_weekday helper function to timeutils
- machine_spi: add the SPI class to the machine module
- moduos: seed the PRNG on boot using the TRNG
- boards: set vfs partition start to 1 MBbyte
- main: skip running main.py if boot.py failed
- main: extend the information returned by help()
- mimxrt_flash: remove commented-out code
- modmachine: add a few minor methods to the machine module
- machine_led: use mp_raise_msg_varg helper
- machine_i2c: add hardware-based machine.I2C to machine module
- add support for Hyperflash chips
- boards: add support for the MIMXRT1050_EVKB board
- machine_pin: implement ioctl for Pin

minimal port:
- Makefile: add support for building with user C modules

nrf port:
- modules: replace master/slave with controller/peripheral in SPI
- boards/common.ld: calculate unused flash region
- modules/nrf: add new nrf module with flash block device
- drivers: add support for using flash block device with SoftDevice
- mpconfigport.h: expose nrf module when MICROPY_PY_NRF is set
- README: update README.md to reflect internal file systems
- mpconfigport.h: tune FAT FS configuration
- Makefile: add _fs_size linker script override from make
- modules/uos: allow a board to configure MICROPY_VFS_FAT/LFS1/LFS2
- mpconfigport.h: enable MICROPY_PY_IO_FILEIO when an FS is enabled
- qstrdefsport.h: add entries for in-built FS mount points
- main: add auto mount and auto format hook for internal flash FS
- boards: enable needed features for FAT/LFS1/LFS2
- facilitate use of freeze manifest
- boards: set FROZEN_MANIFEST blank when SD present on nrf51 targets
- modules/scripts: add file system formatting script
- Makefile: set default manifest file for all targets
- mphalport: add dummy function for mp_hal_time_ns()
- boards: enable MICROPY_VFS_LFS2 for all target boards
- modules/uos: add ilistdir to uos module
- modules/nrf: add function to enable/disable DCDC
- enable source line on tracebacks
- set .mpy features consistent with documentation and other ports

pic16bit port: no changes specific to this component/port

powerpc port: no changes specific to this component/port

qemu-arm port: no changes specific to this component/port

rp2 port:
- use 0=Monday datetime convention in RTC
- machine_rtc: in RTC.datetime, compute weekday automatically
- CMakeLists.txt: suppress compiler errors for pico-sdk and tinyusb
- tusb_config.h: set CFG_TUD_CDC_EP_BUFSIZE to 256
- machine_uart: add hardware flow control support
- machine_uart: allow overriding default machine UART pins
- machine_i2c: allow boards to configure I2C pins using new macros
- machine_spi: allow boards to configure SPI pins using new macros
- machine_uart: fix poll ioctl to also check hardware FIFO
- machine_uart: fix read when FIFO has chars but ringbuf doesn't
- tusb_port: allow boards to configure USB VID and PID
- boards/ADAFRUIT_FEATHER_RP2040: configure custom VID/PID
- boards/ADAFRUIT_FEATHER_RP2040: configure I2C/SPI default pins
- boards/SPARKFUN_PROMICRO: configure UART/I2C/SPI default pins
- boards/SPARKFUN_THINGPLUS: configure I2C/SPI default pins
- boards: add Adafruit ItsyBitsy RP2040
- boards: add Adafruit QT Py RP2040
- boards: add Pimoroni Pico LiPo 4MB
- boards: add Pimoroni Pico LiPo 16MB
- boards: add Pimoroni Tiny 2040
- CMakeLists.txt: allow a board's cmake to set the manifest path
- enable MICROPY_PY_FSTRINGS by default
- Makefile: add "submodules" target, to match other ports
- rp2_flash: disable IRQs while calling flash_erase/program
- CMakeLists.txt: add option to enable double tap reset to bootrom
- mpconfigport.h: allow boards to add root pointers

samd port:
- add support for building with user C modules

stm32 port:
- softtimer: add soft_timer_reinsert() helper function
- mpbthciport: change from systick to soft-timer for BT scheduling
- provide a custom BTstack runloop that integrates with soft timer
- usb: make irq's default trigger enable all events
- boardctrl: skip running main.py if boot.py had an error
- sdio: fix undefined reference to DMA stream on H7
- dma: add DMAMUX configuration for H7 to fix dma_nohal_init
- main: call mp_deinit() at end of main
- adc: allow using ADC12 and ADC3 for H7
- adc: define the ADC instance used for internal channels
- adc: simplify and generalise how pin_adcX table is defined
- add new machine.I2S class for I2S protocol support
- boards/NUCLEO_F446RE: fix I2C1 pin assignment to match datasheet
- replace master/slave with controller/peripheral in I2C and SPI
- systick: always POLL_HOOK when delaying for milliseconds
- sdram: make SDRAM test cache aware, and optional failure with msg
- boards/NUCLEO_F446RE: enable CAN bus support
- boards: add support for SparkFun STM32 MicroMod Processor board
- uart: fix LPUART1 baudrate set/get
- uart: support low baudrates on LPUART1
- boards/STM32F429DISC: set correct UART2 pins and add UART3/6
- boards/NUCLEO_F439ZI: add board definition for NUCLEO_F439ZI
- boards/LEGO_HUB_NO6: add board definition for LEGO_HUB_NO6
- Makefile: update to only pull in used Bluetooth library
- README.md: update supported MCUs, and submodule and mboot use
- usbd_desc: rename USBD_xxx descriptor opts to MICROPY_HW_USB_xxx
- usbd_cdc_interface: rename USBD_CDC_xx opts to MICROPY_HW_USB_xx
- powerctrl: support changing frequency on WB MCUs
- boards/NUCLEO_H743ZI2: add modified version of NUCLEO_H743ZI
- mbedtls: fix compile warning about uninitialized val
- enable MICROPY_PY_FSTRINGS by default
- add implementation of machine.bitstream
- Makefile: allow GIT_SUBMODULES and LIBS to be extended
- stm32_it: support TIM17 IRQs on WB MCUs
- disable computed goto on constrained boards
- storage: make extended-block-device more configurable
- boards/LEGO_HUB_NO6: change SPI flash storage to use hardware SPI
- boards/LEGO_HUB_NO6: skip first 1MiB of SPI flash for storage
- boards/LEGO_HUB_NO6: add make commands to backup/restore firmware

teensy port: no changes specific to this component/port

unix port:
- modffi: add option to lock GC in callback, and cfun access
- Makefile: add back LIB_SRC_C to list of object files
- variants: enable help and help("modules") on standard and dev
- Makefile: disable error compression on arm-linux-gnueabi-gcc

windows port:
- Makefile: add .exe extension to executables name
- appveyor: update to VS 2017 and use Python 3.8 for build/test

zephyr port:
- machine_spi: add support for hardware SPI
2021-10-15 08:20:54 -05:00
Damien George 549448e8bb esp32: Enable optimisations and move code to iRAM to boost performance.
This commit enables some significant optimisations for esp32:
- move the VM to iRAM
- move hot parts of the runtime to iRAM (map lookup, load global/name,
  mp_obj_get_type)
- enable MICROPY_OPT_LOAD_ATTR_FAST_PATH
- enable MICROPY_OPT_MAP_LOOKUP_CACHE
- disable assertions
- change from -Os to -O2 for compilation

It's hard to measure performance on esp32 due to external flash and
hardware caching.  But this set of changes improves performance compared to
master by (on a TinyPICO with the GENERIC build, using IDF 4.2.2, running
at 160MHz):

diff of scores (higher is better)
N=100 M=100    esp32-master -> esp32-perf       diff      diff% (error%)
bm_chaos.py           71.28 ->     268.08 :  +196.80 = +276.094% (+/-0.04%)
bm_fannkuch.py        44.10 ->      69.31 :   +25.21 = +57.166% (+/-0.01%)
bm_fft.py           1385.27 ->    2538.23 : +1152.96 = +83.230% (+/-0.01%)
bm_float.py         1060.94 ->    3900.62 : +2839.68 = +267.657% (+/-0.03%)
bm_hexiom.py          10.90 ->      32.79 :   +21.89 = +200.826% (+/-0.02%)
bm_nqueens.py       1000.83 ->    2372.87 : +1372.04 = +137.090% (+/-0.01%)
bm_pidigits.py       288.13 ->     664.40 :  +376.27 = +130.590% (+/-0.46%)
misc_aes.py          102.45 ->     345.69 :  +243.24 = +237.423% (+/-0.01%)
misc_mandel.py      1016.58 ->    2121.92 : +1105.34 = +108.731% (+/-0.01%)
misc_pystone.py      632.91 ->    1801.87 : +1168.96 = +184.696% (+/-0.08%)
misc_raytrace.py      76.66 ->     281.78 :  +205.12 = +267.571% (+/-0.05%)
viper_call0.py       210.63 ->     273.17 :   +62.54 = +29.692% (+/-0.01%)
viper_call1a.py      208.45 ->     269.51 :   +61.06 = +29.292% (+/-0.00%)
viper_call1b.py      185.44 ->     228.25 :   +42.81 = +23.086% (+/-0.01%)
viper_call1c.py      185.86 ->     228.90 :   +43.04 = +23.157% (+/-0.01%)
viper_call2a.py      207.10 ->     267.25 :   +60.15 = +29.044% (+/-0.00%)
viper_call2b.py      173.76 ->     209.42 :   +35.66 = +20.523% (+/-0.00%)

Five tests have more than 3x speed up (200%+).

The performance of the tests bm_fft, bm_pidigits and misc_aes now scale
with CPU frequency (eg changing frequency to 240MHz boosts the performance
of these by 50%), which means they are no longer influenced by timing of
external flash access.  (The viper_call* tests did previously scale with
CPU frequency, and they still do.)

Turning off assertions reduces code size by about 80k, and going from -Os
to -O2 costs about 100k, so the net change in code size (for the GENERIC
board) is about +20k.

If a board wants to enable assertions, or use -Os instead of -O2, that's
still possible by overriding the sdkconfig parameters.

Signed-off-by: Damien George <damien@micropython.org>
2021-10-16 00:07:11 +11:00
iabdalkader eea6cd85b3 stm32/sdram: Enforce gcc opt, and use volatile and DSB in sdram_test.
Ensures consistent behaviour and resolves the D-Cache bug (the "exhaustive"
argument being lost due to cache being turned off) when O0 is used.

The changes in this commit are:

- Change -O0 to -Os because "gcc is considered broken at -O0" according to
  https://github.com/ARM-software/CMSIS_5/issues/620#issuecomment-550235656

- Use volatile for mem_base so the compiler doesn't optimise away reads or
  writes to the SDRAM, which is being tested.

- Use DSB to prevent any other compiler optimisations that would change the
  testing logic.

- Use alternating pattern/antipattern in exhaustive test to catch more
  hardware/configuration errors.

Implementation adapted by @andrewleech, taken directly from investigation
by @iabdalkader and @dpgeorge.

See #7841 and #7869 for further discussion.
2021-10-15 17:59:31 +11:00
evildave666 97e64ebd8c add i2c singleton for s2 mini 2021-10-15 13:22:35 +09:00
Leonardo La Rocca 376c3a1bab
Merge branch 'adafruit:main' into main 2021-10-14 19:33:55 +02:00
root 9a8ebb0ef0 added battery pin definition 2021-10-14 18:41:09 +02:00
Bruce Segal 5310f304a0 Add board definitio for Lolin/Wemos S2-Pico 2021-10-13 13:27:56 -07:00
Limor "Ladyada" Fried 1099716986
Merge pull request #5457 from jepler/espressif-cam-missed-frame
eespressif: ParallelImageCapture: keep peripheral running
2021-10-11 20:25:18 -04:00
Max Holliday 7cbcc2f9ec updating pycubed board defs & including 2021-10-11 15:34:58 -07:00
Max Holliday 37bddecf54 adding CIRCUITPY_ALARM checks to port.c 2021-10-11 15:03:57 -06:00
Jeff Epler 6abb7dd461 eespressif: ParallelImageCapture: keep peripheral running
Otherwise, a lot of frames were being dropped, leading to a low framerate
in the "directio" demo for OV5640 cameras
2021-10-11 15:37:57 -05:00
Max Holliday 5c4f903328 rearranging port.c include order for common-hal/alarm 2021-10-11 13:31:29 -07:00
Max Holliday e7324fa7c3 fixing pre-commit stuff 2021-10-10 16:40:00 -07:00
Max Holliday e136cbd007 forgot to commit port.c 2021-10-10 12:16:15 -07:00
Max Holliday dcb5fd280a alarm.wake_alarm works for pin and time. Pin & time can both be set at once 2021-10-10 12:01:04 -07:00
Max Holliday 752bf6e4e0 correcting which nina-fw commit to use 2021-10-09 15:14:03 -07:00
Max Holliday 4f631f2bb3 fixing nina-fw certs maybe? 2021-10-09 15:09:55 -07:00
Max Holliday 238b07c3af Fixed merge conflict for circuitpython.pot 2021-10-09 14:28:20 -07:00
Max Holliday 112739e247 minor tweaks 2021-10-09 14:50:55 -06:00
Max Holliday d66d7d476c
Update ports/atmel-samd/mpconfigport.mk
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2021-10-09 12:33:05 -06:00
Max Holliday 8486502e65 reworked fake sleep. functional for pin and time 2021-10-09 11:44:10 -06:00
Dan Halbert 4c45364dca
Merge pull request #5442 from jpconstantineau/board-xiao-kb
Add new board variant: Seeed XIAO targeted for Keyboards/HID Devices
2021-10-08 18:19:58 -04:00
Dan Halbert f0e2945747 clarify RP2040 IncrementalEncoder sequential pin message 2021-10-08 10:40:58 -04:00
Pierre Constantineau 37d3adfe4f updated PID from Seeed provided VID/PID 2021-10-08 07:15:18 -06:00
Pierre Constantineau 002383691c changing MICROPY_HW_BOARD_NAME from Dongle to DK 2021-10-07 21:57:04 -06:00
Scott Shawcroft df10543bee
Merge pull request #3768 from microDev1/i2c-S2
ESP32S2: Support for i2cperipheral
2021-10-07 10:07:47 -07:00
microDev 620ef26385
Merge pull request #5437 from pewpew-game/stage-picosystem
PicoSystem: freeze the Stage library
2021-10-07 21:38:14 +05:30
Jeff Epler 14ec6b70cf
Merge pull request #5403 from blues/add-strm32l4t5-swan-support
stm32l4r5 Swan support
2021-10-07 11:00:59 -05:00
Radomir Dopieralski d76eda153b PicoSystem: freeze the Stage library 2021-10-07 15:01:18 +02:00
microDev 647e589a6a
rename `i2c_num_status` to `peripherals_i2c_get_free_num` 2021-10-07 14:12:14 +05:30
microDev a3aeefd92c
Merge pull request #5430 from microDev1/patch
Convert all modules to use `MP_REGISTER_MODULE`
2021-10-07 09:44:11 +05:30
Scott Shawcroft 98ee9ee019
Merge pull request #5435 from jpconstantineau/m60-updates
adding battery monitoring pins to M60
2021-10-06 17:58:28 -07:00
Scott Shawcroft d2add4b4fd
Merge pull request #5409 from skieast/ai_thinker_esp32-c3s
Add AIThinker ESP32-C3S_Kit board
2021-10-06 17:25:26 -07:00
Pierre Constantineau ed68e1f047 fix pre-commit trailing whitespace 2021-10-06 17:46:30 -06:00
Pierre Constantineau 79e68a7404 adding battery monitoring pins to M60 2021-10-06 17:41:49 -06:00
Limor "Ladyada" Fried 218667377c
Merge pull request #5398 from Gadgetoid/patch-picosystem-displayio
PicoSystem: Add DisplayIO to board config
2021-10-06 10:12:29 -04:00
Scott Shawcroft 04459f5e2a
Merge branch 'main' into ai_thinker_esp32-c3s 2021-10-05 14:28:17 -07:00
Scott Shawcroft 39886701d6
Merge pull request #5404 from microDev1/microdev-micro-c3
Add board MicroDev microC3
2021-10-05 13:31:24 -07:00
microDev a46aa48e23
Convert more modules to use MP_REGISTER_MODULE
Convert espidf, os, rp2pio, samd and time to use MP_REGISTER_MODULE.

Related to #5183.
2021-10-05 16:58:24 +05:30
Josh Gadeken 881724b529
[#4701] Correct DAC clock speed comments for SAMD21 and SAMD51 2021-10-04 22:18:26 -06:00
Max Holliday 6811c5e881 c formatting... 2021-10-04 15:44:46 -06:00
Max Holliday 0dd276ba79 c formatting 2021-10-04 15:04:55 -06:00
Max Holliday 2ff038f08b fixing c formatting 2021-10-04 14:55:44 -06:00
microDev d9eafffa6a
i2cperipheral implementation for esp32s2 2021-10-05 01:02:55 +05:30
EmergReanimator e636db713f Lose dependency to USB via CIRCUITPY_USB define for atmel port. 2021-10-04 10:57:39 +02:00
Max Holliday 6a8b4f5f07 fixed c formating 2021-10-03 23:13:58 -06:00
Max Holliday 5ceb72009e fixed c formating for pre-commit check 2021-10-03 22:42:04 -06:00
Max Holliday b95325e3c7
Merge branch 'samd-sleep' into samd-sleep-v1 2021-10-03 17:16:27 -06:00
Lucian Copeland f748d66128 Setup outline for SAMD alarm module 2021-10-03 14:57:44 -07:00
Max Holliday 7a703aaa64 adding comments 2021-10-02 15:00:18 -06:00
Max Holliday 433a901ffb
Merge branch 'adafruit:main' into samd-sleep-v1 2021-10-02 14:56:15 -06:00
microDev 8b5ea98271
minor updates for board microdev_micro_s2 2021-10-02 17:10:46 +05:30
Max Holliday 79cd10ac85 cleaning up TimeAlarm and PinAlarm 2021-10-01 17:36:04 -06:00
Max Holliday cd28d50e7a
Merge branch 'adafruit:main' into samd-sleep-v1 2021-10-01 16:13:06 -06:00
microDev 26fbb4eb85
add esp32c3 documentation in readme 2021-10-01 01:26:05 +05:30
Phil Howard 2fc6a72cc7 PicoSystem: Add DisplayIO & Stage to board config
* Bring up PicoSystem's display with DisplayIO
* Add stage game library
* Add supporting modules - AUDIOIO and KEYPAD
2021-09-30 13:57:03 +01:00
Matthew McGowan e54073b95b feat(swan_r5):bootloader build (UF2_BOOTLOADER=2) does not set the ISR vector table. 2021-09-29 20:40:37 -07:00
Bruce Segal b3a46955ea Add AIThinker ESP32-C3S_Kit board 2021-09-29 18:52:16 -07:00
Max Holliday d536be7228 working samd deep sleep timealarm and pinalarm (sketchy) 2021-09-29 11:44:15 -06:00
Matthew McGowan 1c1eb49b36 fix(swan_r5):revert changes to GPIO ports. While these ports are available on the L4R5, they aren't used. This fixes a build error on the stm32f412zg_discovery. 2021-09-28 18:52:03 -07:00
Matthew McGowan 9b179ffbe4 style(swan_r5): pre-commit whitespace style changes 2021-09-28 18:52:03 -07:00
Matthew McGowan 295cc18190 style(swan_r5): pre-commit whitespace style changes 2021-09-28 18:52:03 -07:00
Matthew McGowan 8a3fb7bd13 fix(swan_r5):fixes timer definitions in the array. Requires padding to match peripheral with interrupt handler index. 2021-09-28 18:52:02 -07:00
Matthew McGowan 7b7b4997a4 docs(swan_r5): misc comments/formatting 2021-09-28 18:52:02 -07:00
Matthew McGowan 599368373e feat(swan_r5): user button tested 2021-09-28 18:52:02 -07:00
Matthew McGowan 40c3b5c7e6 docs(swan_r5):todo cleanup 2021-09-28 18:52:02 -07:00
Matthew McGowan 88f6bb2cf2 chore(swan_r5):pwmio test 2021-09-28 18:52:02 -07:00
Matthew McGowan 9d27d249cf chore(swan_r5):tests used to smoke test the board functionality 2021-09-28 18:52:02 -07:00
Matthew McGowan 2a05b22f42 reworks memory map for flash 2021-09-28 18:52:02 -07:00
Brandon Satrom 48f67d007e feat: add Blues Swan R5 support
complete pin mapping for Feather pins

stubbed out files needed for complilation. still to be modified

0 out all CPY modules in mpconfigboard.mk until we get the build running

add csv for pin generation for STM32L4R5

add F4R5 references in peripherals files

refactored out board files BECAUSE I AM AN IDIOT; add L4 series system clocks file from CubeMX

took a guess at the number of USB endpoint pairs to get the build done

guess was close, but wrong. It is 8

clean up peripheral DEFs

Fixes build error:
```
In file included from ../../py/mpstate.h:33,
                 from ../../py/mpstate.c:27:
../../py/misc.h: In function 'vstr_str':
../../py/misc.h:196:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 static inline char *vstr_str(vstr_t *vstr) {
 ^~~~~~
```
Sleuthing steps:
* verify that the feather_stm32f4_express board builds correctly
* put a `#error` at the bottom of the `mpstate.c` file.
* build for the feather and swan boards, with V=2 to capture the build command for that file.
* use a differencing tool to inspect the differences between the two invocations
* inspecting the differences, I saw a missing `-mcpu=cortex-m4` I tested by adding that to the Swan build command. The file built fine (stopping at the hard error, but no other warnings.)

A grep through the sources revealed where this flag was being set for the stm ports.

With this commit, the build gets further, but does not complete. The next exciting episode in this unfolding coding saga is just a commit away!

working build with minimal set of modules for the Blues Swan r5

chore:change header copyright name to Blues Wireless Contributors

USB operational.  Fixed up clocks to be hardwired for LSE no HSE case. (Trying to combine HSE in there made the code much more complex, and I don't have a board to test it out on.)

USART working

adds support for `ENABLE_3V3` and `DISCHARGE_3V3` pins.  I am surprised that pin definitions are quite low-level and don't include default direction and state, so the code currently has to initialize `ENABLE_3V3` pin as output.  The LED takes over a second to discharge, so I wonder if the board startup code is not having the desired affect.

short circuit implementation of backup memory for the STM32L4

all the ports

remove company name from board name to be consistent with the Arduino board definition.

add default pins for I2C, SPI and UART, so that `board.I2C` et al. works as expected.  Confirmed I2C timing.

fix board name

fix incorrect pin definition. add test to allow manual check of each output pin

analog IO

code changes for WebUSB. Doesn't appear to work, will revisit later.

ensure that `sys.platform` is available

checkin missing file

feat: make room for a larger filesystem so the sensor tutorial will fit on the device.

fix:(stm32l4r5zi.csv): merged AF0-7 and AF8-15 into single lines and removed extraneous headers mixed in with the data.

fix(parse_af_csv.py): pin index in the csv is 0 not 1, and AF index made 1 larger

chore(Swan R5): update peripherals pins from `parse_af_csv.py` output

optimize flash sector access
2021-09-28 18:52:02 -07:00
microDev 317751bd79
add board microdev_micro_c3 2021-09-29 00:14:00 +05:30
Scott Shawcroft fab27f6be6
Merge pull request #5394 from microDev1/c3-port
Add initial esp32c3 support
2021-09-28 10:31:11 -07:00
Scott Shawcroft aa52d726de
Merge pull request #5395 from PontusO/main
Added Challenger RP2040 LTE board.
2021-09-27 11:19:28 -07:00
Feyn ed18c1f2b8
Fix a critical "typo"
Current compiled downloads are unusable because MICROPY_QSPI_CS is defined as the wrong pin
2021-09-26 13:47:05 +02:00
Pontus Oldberg 5649887d34 Added support for the Challenger NB RP2040 WiFi board. 2021-09-26 07:54:07 +02:00
Pontus Oldberg 7d002478ef Added Challenger RP2040 LTE board. 2021-09-26 07:15:30 +02:00
microDev 3da86b0ac2
add initial esp32c3 support 2021-09-26 09:39:40 +05:30