From 41a85b71fc6934c589d505e48e7bf3aeb5e1a642 Mon Sep 17 00:00:00 2001 From: Sabas Date: Wed, 22 Jan 2020 20:30:33 -0600 Subject: [PATCH 01/22] init nfc copy --- ports/atmel-samd/boards/nfc_copy/board.c | 38 ++++++++++++++ .../boards/nfc_copy/mpconfigboard.h | 50 +++++++++++++++++++ .../boards/nfc_copy/mpconfigboard.mk | 11 ++++ ports/atmel-samd/boards/nfc_copy/pins.c | 21 ++++++++ 4 files changed, 120 insertions(+) create mode 100644 ports/atmel-samd/boards/nfc_copy/board.c create mode 100644 ports/atmel-samd/boards/nfc_copy/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/nfc_copy/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/nfc_copy/pins.c diff --git a/ports/atmel-samd/boards/nfc_copy/board.c b/ports/atmel-samd/boards/nfc_copy/board.c new file mode 100644 index 000000000..c8e20206a --- /dev/null +++ b/ports/atmel-samd/boards/nfc_copy/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" + +void board_init(void) +{ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/nfc_copy/mpconfigboard.h b/ports/atmel-samd/boards/nfc_copy/mpconfigboard.h new file mode 100644 index 000000000..126b2119f --- /dev/null +++ b/ports/atmel-samd/boards/nfc_copy/mpconfigboard.h @@ -0,0 +1,50 @@ +#define MICROPY_HW_BOARD_NAME "Electronic Cats NFC Copy Cat" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +// No microcontroller.nvm +#define CIRCUITPY_INTERNAL_NVM_SIZE 0 + +#define DEFAULT_I2C_BUS_SCL (&pin_PA08) +#define DEFAULT_I2C_BUS_SDA (&pin_PA09) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA16) +#define DEFAULT_SPI_BUS_MISO (&pin_PA19) + +#define DEFAULT_UART_BUS_RX (&pin_PA01) +#define DEFAULT_UART_BUS_TX (&pin_PA00) + +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +// USB is always used. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 +#define IGNORE_PIN_PB01 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB04 1 +#define IGNORE_PIN_PB05 1 +#define IGNORE_PIN_PB06 1 +#define IGNORE_PIN_PB07 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PB10 1 +#define IGNORE_PIN_PB11 1 +#define IGNORE_PIN_PB12 1 +#define IGNORE_PIN_PB13 1 +#define IGNORE_PIN_PB14 1 +#define IGNORE_PIN_PB15 1 +#define IGNORE_PIN_PB16 1 +#define IGNORE_PIN_PB17 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PB30 1 +#define IGNORE_PIN_PB31 1 +#define IGNORE_PIN_PB00 1 diff --git a/ports/atmel-samd/boards/nfc_copy/mpconfigboard.mk b/ports/atmel-samd/boards/nfc_copy/mpconfigboard.mk new file mode 100644 index 000000000..582c584d8 --- /dev/null +++ b/ports/atmel-samd/boards/nfc_copy/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1209 +USB_PID = 0xBAB8 +USB_PRODUCT = "NFC Copy Cat" +USB_MANUFACTURER = "Electronic Cats" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE +CIRCUITPY_SMALL_BUILD = 1 diff --git a/ports/atmel-samd/boards/nfc_copy/pins.c b/ports/atmel-samd/boards/nfc_copy/pins.c new file mode 100644 index 000000000..46a7ed3c9 --- /dev/null +++ b/ports/atmel-samd/boards/nfc_copy/pins.c @@ -0,0 +1,21 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) }, // IRQ + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA06) }, // IN_A + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA07) }, // IN_B + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA10) }, // LED + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA11) }, // LED + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA14) }, // LED + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_PA27) }, // Switch + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_PA28) }, // Switch + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PA18) }, // CS + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 8b5fd95897b967e5077527f50657ac4ded39a9aa Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:42:51 +1000 Subject: [PATCH 02/22] tests/basics/set_pop.py: Sort set before printing for consistent output. --- tests/basics/set_pop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/basics/set_pop.py b/tests/basics/set_pop.py index 5e1196c9f..e951ca593 100644 --- a/tests/basics/set_pop.py +++ b/tests/basics/set_pop.py @@ -15,4 +15,4 @@ while s: print(s.pop()) # last pop() should trigger the optimisation for i in range(N): s.add(i) # check that we can add the numbers back to the set -print(list(s)) +print(sorted(s)) From 4c4f81f8f2f68a5dc47d37ba185a2506224d7159 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:43:47 +1000 Subject: [PATCH 03/22] tests/basics/int_big_error.py: Use bytearray to test for int overflow. In Python 3.7 "1 >> (big int)" is now allowed, it no longer raises an OverflowError. So use bytearray to test big-int conversion overflow. --- tests/basics/int_big_error.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/basics/int_big_error.py b/tests/basics/int_big_error.py index e036525d1..79809aef1 100644 --- a/tests/basics/int_big_error.py +++ b/tests/basics/int_big_error.py @@ -17,9 +17,9 @@ try: except TypeError: print("TypeError") -# overflow because rhs of >> is being converted to machine int +# overflow because arg of bytearray is being converted to machine int try: - 1 >> i + bytearray(i) except OverflowError: print('OverflowError') From 8f0147cf00e3fa8db283adbd1698c60fbe76a62a Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:46:04 +1000 Subject: [PATCH 04/22] tests: Modify tests that print repr of an exception with 1 arg. In Python 3.7 the behaviour of repr() of an exception with one argument changed: it no longer prints a trailing comma in the argument list. See https://bugs.python.org/issue30399 This patch modifies tests that rely on this behaviour to not rely on it. And the python34.py test is updated to include a test for this behaviour with a .exp file. --- tests/basics/dict1.py | 2 +- tests/basics/exception1.py | 1 - tests/basics/generator_return.py | 2 +- tests/basics/python34.py | 6 +++++- tests/basics/python34.py.exp | 1 + tests/basics/subclass_native3.py | 4 ++-- tests/basics/try_as_var.py | 2 +- tests/misc/sys_exc_info.py | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/basics/dict1.py b/tests/basics/dict1.py index 20fa9def3..0cec51173 100644 --- a/tests/basics/dict1.py +++ b/tests/basics/dict1.py @@ -27,7 +27,7 @@ print({1:1} == {2:1}) try: {}[0] except KeyError as er: - print('KeyError', er, repr(er), er.args) + print('KeyError', er, er.args) # unsupported unary op try: diff --git a/tests/basics/exception1.py b/tests/basics/exception1.py index 739dd3275..d83764cb9 100644 --- a/tests/basics/exception1.py +++ b/tests/basics/exception1.py @@ -1,7 +1,6 @@ print(repr(IndexError())) print(str(IndexError())) -print(repr(IndexError("foo"))) print(str(IndexError("foo"))) a = IndexError(1, "test", [100, 200]) diff --git a/tests/basics/generator_return.py b/tests/basics/generator_return.py index a3ac88575..5814ce837 100644 --- a/tests/basics/generator_return.py +++ b/tests/basics/generator_return.py @@ -7,4 +7,4 @@ print(next(g)) try: print(next(g)) except StopIteration as e: - print(repr(e)) + print(type(e), e.args) diff --git a/tests/basics/python34.py b/tests/basics/python34.py index 36531f11c..4030db143 100644 --- a/tests/basics/python34.py +++ b/tests/basics/python34.py @@ -1,4 +1,4 @@ -# tests that differ when running under Python 3.4 vs 3.5/3.6 +# tests that differ when running under Python 3.4 vs 3.5/3.6/3.7 try: exec @@ -36,3 +36,7 @@ test_syntax("del ()") # can't delete empty tuple (in 3.6 we can) import sys print(sys.version[:3]) print(sys.version_info[0], sys.version_info[1]) + +# from basics/exception1.py +# in 3.7 no comma is printed if there is only 1 arg (in 3.4-3.6 one is printed) +print(repr(IndexError("foo"))) diff --git a/tests/basics/python34.py.exp b/tests/basics/python34.py.exp index 590fc364f..848017130 100644 --- a/tests/basics/python34.py.exp +++ b/tests/basics/python34.py.exp @@ -11,3 +11,4 @@ SyntaxError SyntaxError 3.4 3 4 +IndexError('foo',) diff --git a/tests/basics/subclass_native3.py b/tests/basics/subclass_native3.py index bd99ab0d6..6745b77bb 100644 --- a/tests/basics/subclass_native3.py +++ b/tests/basics/subclass_native3.py @@ -7,12 +7,12 @@ print(repr(e)) print(e.args) try: - raise MyExc("Some error") + raise MyExc("Some error", 1) except MyExc as e: print("Caught exception:", repr(e)) try: - raise MyExc("Some error2") + raise MyExc("Some error2", 2) except Exception as e: print("Caught exception:", repr(e)) diff --git a/tests/basics/try_as_var.py b/tests/basics/try_as_var.py index 0a92f1cae..4f02f9c10 100644 --- a/tests/basics/try_as_var.py +++ b/tests/basics/try_as_var.py @@ -1,7 +1,7 @@ try: raise ValueError(534) except ValueError as e: - print(repr(e)) + print(type(e), e.args) # Var bound in except block is automatically deleted try: diff --git a/tests/misc/sys_exc_info.py b/tests/misc/sys_exc_info.py index 4bb2c61e8..bf9438e46 100644 --- a/tests/misc/sys_exc_info.py +++ b/tests/misc/sys_exc_info.py @@ -9,7 +9,7 @@ def f(): print(sys.exc_info()[0:2]) try: - 1/0 + raise ValueError('value', 123) except: print(sys.exc_info()[0:2]) f() From 764e65fb11ab6aa80c540a8f9d15237f406d62fd Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:50:21 +1000 Subject: [PATCH 05/22] tests/basics: Provide .exp files for generator tests that fail PEP479. PEP479 (see https://www.python.org/dev/peps/pep-0479/) prohibited raising StopIteration from within a generator (it is turned into a RuntimeError). This behaviour was introduced in Python 3.5 and in 3.7 was made compulsory. Until uPy implements PEP479, this patch adds .py.exp files for the relevant tests so they can be run under Python 3.7. --- tests/basics/gen_yield_from.py.exp | 14 ++++++++++++++ tests/basics/gen_yield_from_close.py.exp | 20 ++++++++++++++++++++ tests/basics/gen_yield_from_throw.py.exp | 6 ++++++ tests/basics/generator_close.py.exp | 10 ++++++++++ 4 files changed, 50 insertions(+) create mode 100644 tests/basics/gen_yield_from.py.exp create mode 100644 tests/basics/gen_yield_from_close.py.exp create mode 100644 tests/basics/gen_yield_from_throw.py.exp create mode 100644 tests/basics/generator_close.py.exp diff --git a/tests/basics/gen_yield_from.py.exp b/tests/basics/gen_yield_from.py.exp new file mode 100644 index 000000000..507f2b9ca --- /dev/null +++ b/tests/basics/gen_yield_from.py.exp @@ -0,0 +1,14 @@ +here1 +3 +here2 +[1, 2] +here1 +None +here2 +[1, 2] +here1 +123 +here2 +[1, 2] +444 +[0, 1, 2] diff --git a/tests/basics/gen_yield_from_close.py.exp b/tests/basics/gen_yield_from_close.py.exp new file mode 100644 index 000000000..a44d1353d --- /dev/null +++ b/tests/basics/gen_yield_from_close.py.exp @@ -0,0 +1,20 @@ +-1 +1 +StopIteration +-1 +1 +2 +leaf caught GeneratorExit and swallowed it +delegating caught GeneratorExit +StopIteration +-1 +1 +2 +leaf caught GeneratorExit and raised StopIteration instead +delegating caught GeneratorExit +StopIteration +123 +RuntimeError +0 +1 +close diff --git a/tests/basics/gen_yield_from_throw.py.exp b/tests/basics/gen_yield_from_throw.py.exp new file mode 100644 index 000000000..6ce97ad86 --- /dev/null +++ b/tests/basics/gen_yield_from_throw.py.exp @@ -0,0 +1,6 @@ +1 +got ValueError from upstream! +str1 +got TypeError from downstream! +123 +got StopIteration from downstream! diff --git a/tests/basics/generator_close.py.exp b/tests/basics/generator_close.py.exp new file mode 100644 index 000000000..fcd583935 --- /dev/null +++ b/tests/basics/generator_close.py.exp @@ -0,0 +1,10 @@ +None +StopIteration +1 +None +StopIteration +[1, 2] +None +StopIteration +None +ValueError From aa10e5c3343d0947eb5a813e8a5025205dc1efd4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 13 Dec 2019 13:49:34 +1100 Subject: [PATCH 06/22] tests: Add .exp files for basics/parser and import/import_override. Because CPython 3.8.0 now produces different output: - basics/parser.py: CPython does not allow '\\\n' as input. - import/import_override: CPython imports _io. --- tests/basics/parser.py.exp | 3 +++ tests/import/import_override.py.exp | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 tests/basics/parser.py.exp create mode 100644 tests/import/import_override.py.exp diff --git a/tests/basics/parser.py.exp b/tests/basics/parser.py.exp new file mode 100644 index 000000000..4d9886a09 --- /dev/null +++ b/tests/basics/parser.py.exp @@ -0,0 +1,3 @@ +SyntaxError +SyntaxError +SyntaxError diff --git a/tests/import/import_override.py.exp b/tests/import/import_override.py.exp new file mode 100644 index 000000000..365248da6 --- /dev/null +++ b/tests/import/import_override.py.exp @@ -0,0 +1,2 @@ +import import1b None 0 +456 From ffe73a4c3fb1329e5598f135aa11bed2943fb481 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 1 Apr 2020 16:13:19 -0500 Subject: [PATCH 07/22] workflows: use current (3.8) python now the need for 3.5 has been fixed --- .github/workflows/build.yml | 18 +++++++++--------- .github/workflows/create_website_pr.yml | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6ba3725c..b56fb35b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,10 +16,10 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - name: Set up Python 3.5 + - name: Set up Python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.5 + python-version: 3.8 - name: Install deps run: | sudo apt-get install -y eatmydata @@ -42,7 +42,7 @@ jobs: make -C ports/unix -j2 make -C ports/unix coverage -j2 - name: Test all - run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 + run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 working-directory: tests - name: Print failure info run: | @@ -54,10 +54,10 @@ jobs: working-directory: tests if: failure() - name: Native Tests - run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native + run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native working-directory: tests - name: mpy Tests - run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float + run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float working-directory: tests - name: Docs run: sphinx-build -E -W -b html . _build/html @@ -244,10 +244,10 @@ jobs: - "xinabox_cs11" steps: - - name: Set up Python 3.5 + - name: Set up Python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.5 + python-version: 3.8 - name: Install deps run: | sudo apt-get install -y gettext @@ -290,10 +290,10 @@ jobs: - "fomu" steps: - - name: Set up Python 3.5 + - name: Set up Python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.5 + python-version: 3.8 - name: Install deps run: | sudo apt-get install -y gettext diff --git a/.github/workflows/create_website_pr.yml b/.github/workflows/create_website_pr.yml index 69ca8f12b..963fadd3d 100644 --- a/.github/workflows/create_website_pr.yml +++ b/.github/workflows/create_website_pr.yml @@ -12,10 +12,10 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - name: Set up Python 3.5 + - name: Set up Python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.5 + python-version: 3.8 - name: Install deps run: | pip install requests sh click From 9845a064ad22dd6cc6c720a8b765978a16e71ff7 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 2 Apr 2020 11:21:22 +0800 Subject: [PATCH 08/22] ports: fomu: move more functions into ram for stability The SPI flash on current Fomu firmware is slow. Circuitpython runs XIP from SPI flash, and so execution time can also be slow. Ordinarily this isn't a problem, however certain operations are time-sensitive. In particular, USB function needs to be handled quickly in order to prevent the host from re-enumerating the device. Place several critical TinyUSB structures into RAM, as well as several hot functions that are frequently called. This reduces execution time at the expense of system memory, and greatly improves system stability. Signed-off-by: Sean Cross --- ports/litex/boards/fomu/fomu-spi.ld | 40 ++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/ports/litex/boards/fomu/fomu-spi.ld b/ports/litex/boards/fomu/fomu-spi.ld index 161ba607b..486c3cad1 100644 --- a/ports/litex/boards/fomu/fomu-spi.ld +++ b/ports/litex/boards/fomu/fomu-spi.ld @@ -26,8 +26,42 @@ SECTIONS . = ALIGN(4); _sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.itcm.*) /* Instruction Tightly Coupled Memory */ - *(.dtcm_data.*) /* Data Tightly Coupled Memory */ + *(.itcm.*) /* Instruction Tightly Coupled Memory */ + *(.dtcm_data.*) /* Data Tightly Coupled Memory */ + + *(.text.cmp_lfn) + *(.text.qstr_find_strn) + *(.text.dcd_edpt_xfer) + *(.text.pop_rule) + *(.text.ff_wtoupper) + *(.text.dir_find) + *(.text.push_rule) + *(.text.csr_writel) + *(.text.csr_readl) + *(.text.timer0_ev_pending_write) + *(.text.autoreload_tick) + *(.text.filesystem_tick) + *(.text.usb_background) + + *(.text.dcd_*) + *(.text.tud_control_*) + *(.text.tud_cdc_n_write_flush) + *(.text.tud_task) + *(.text.tu_edpt_dir) + *(.text.tu_fifo_empty) + *(.text.usbd_edpt_busy) + *(.text.irq_getmask) + *(.text.irq_setmask) + *(.text.irq_pending) + *(.text._osal_q_lock) + *(.text.osal_queue_receive) + + *(.text.mp_obj_get_type) + *(.text.mp_parse) + *(.text.parse_compile_execute) + *(.text.mp_map_lookup) + *(.text.mp_execute_bytecode) /* Note: this function is 7kb */ + *(.ramtext) /* .text* sections (code) */ *(.ramtext*) /* .text* sections (code) */ *(.data) /* .data sections */ @@ -63,7 +97,7 @@ SECTIONS _sbss = .; /* define a global symbol at bss start; used by startup code */ *(.bss) *(.bss*) - *(.dtcm_bss.*) /* Data Tightly Coupled Memory */ + *(.dtcm_bss.*) /* Data Tightly Coupled Memory */ *(.sbss) *(.sbss*) *(COMMON) From 08f369ea9671e49196fc5ca9e699632798b47f84 Mon Sep 17 00:00:00 2001 From: arturo182 Date: Mon, 6 Apr 2020 22:10:12 +0200 Subject: [PATCH 09/22] mimxrt1011: Only re-init SPI when it's actually needed If some crazy code (*cough* FourWire) decides to reconfigure the bus before every transfer, it might get a bit slow... --- ports/mimxrt10xx/common-hal/busio/SPI.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index b262d1a46..24a6dbff6 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -210,6 +210,18 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) { bool common_hal_busio_spi_configure(busio_spi_obj_t *self, uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t bits) { + + LPSPI_Enable(self->spi, false); + uint32_t tcrPrescaleValue; + self->baudrate = LPSPI_MasterSetBaudRate(self->spi, baudrate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue); + LPSPI_Enable(self->spi, true); + + if ((polarity == common_hal_busio_spi_get_polarity(self)) && + (phase == common_hal_busio_spi_get_phase(self)) && + (bits == ((self->spi->TCR & LPSPI_TCR_FRAMESZ_MASK) >> LPSPI_TCR_FRAMESZ_SHIFT)) + 1) { + return true; + } + lpspi_master_config_t config = { 0 }; LPSPI_MasterGetDefaultConfig(&config); @@ -221,11 +233,6 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, LPSPI_Deinit(self->spi); LPSPI_MasterInit(self->spi, &config, LPSPI_MASTER_CLK_FREQ); - LPSPI_Enable(self->spi, false); - uint32_t tcrPrescaleValue; - self->baudrate = LPSPI_MasterSetBaudRate(self->spi, config.baudRate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue); - LPSPI_Enable(self->spi, true); - return true; } From fa7e35ab4add4786203ffeed0d26ce0aa3b56f1f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 6 Apr 2020 16:38:51 -0700 Subject: [PATCH 10/22] Don't upgrade to Sphinx 3 The doc build doesn't complete and is likely broken for the inline RST. We can move to 3 when we move the inline docs to Python stubs. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b56fb35b8..455f83a21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: run: | sudo apt-get install -y eatmydata sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 - pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml + pip install requests sh click setuptools cpp-coveralls "Sphinx<3" sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml - name: Versions run: | gcc --version From 4ee6754ccd531bb50e059e9a4d962dee5c93bae3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 8 Apr 2020 10:32:54 -0700 Subject: [PATCH 11/22] Save backlight_on_high correctly. Fixes #2750 --- shared-module/displayio/Display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 820fbcce6..2edded927 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -69,6 +69,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self, self->auto_brightness = auto_brightness; self->first_manual_refresh = !auto_refresh; self->data_as_commands = data_as_commands; + self->backlight_on_high = backlight_on_high; self->native_frames_per_second = native_frames_per_second; self->native_ms_per_frame = 1000 / native_frames_per_second; From 1c45a261c4ec26ea2d6a286e9ac54371980e0e41 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Thu, 9 Apr 2020 08:44:35 -0500 Subject: [PATCH 12/22] network.rst: remove duplicate method directive --- docs/library/network.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/library/network.rst b/docs/library/network.rst index cdcc5f323..bd32267fe 100644 --- a/docs/library/network.rst +++ b/docs/library/network.rst @@ -247,7 +247,7 @@ Methods nic.ifconfig(('192.168.0.4', '255.255.255.0', '192.168.0.1', '8.8.8.8')) .. method:: wlan.config('param') -.. method:: wlan.config(param=value, ...) + wlan.config(param=value, ...) Get or set general network interface parameters. These methods allow to work with additional parameters beyond standard IP configuration (as dealt with by From 61bab8e62e4cd4f0585bc387cde2943d6c4c8033 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Thu, 9 Apr 2020 08:45:26 -0500 Subject: [PATCH 13/22] ulab/__init__.rst: fix attribute name; uint8 -> uint16 --- shared-bindings/ulab/__init__.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/ulab/__init__.rst b/shared-bindings/ulab/__init__.rst index 1379e56f3..d8c10dcc8 100644 --- a/shared-bindings/ulab/__init__.rst +++ b/shared-bindings/ulab/__init__.rst @@ -126,7 +126,7 @@ Array type codes Type code for unsigned integers in the range 0 .. 255 inclusive, like the 'H' typecode of `array.array` -.. attribute:: uint8 +.. attribute:: uint16 Type code for unsigned integers in the range 0 .. 65535 inclusive, like the 'h' typecode of `array.array` From cb818ca83266af6eae846bdc6e4be5f8fe722e6e Mon Sep 17 00:00:00 2001 From: sommersoft Date: Thu, 9 Apr 2020 08:47:33 -0500 Subject: [PATCH 14/22] conf.py: update deprecated stylesheet API; 'add_stylesheet()' renamed to 'add_css_file()' --- conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 1dde709d7..f71e09adc 100644 --- a/conf.py +++ b/conf.py @@ -357,4 +357,4 @@ intersphinx_mapping = {"cpython": ('https://docs.python.org/3/', None), "register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None)} def setup(app): - app.add_stylesheet("customstyle.css") + app.add_css_file("customstyle.css") From ae07ced795e51653ce6d69e5a2d30688ca420dd4 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Thu, 9 Apr 2020 08:49:32 -0500 Subject: [PATCH 15/22] conf.py: drop '.h' docs rendering (nothing to build); fix deprecated 'source_parsers' usage --- conf.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/conf.py b/conf.py index f71e09adc..19542ad9f 100644 --- a/conf.py +++ b/conf.py @@ -17,7 +17,7 @@ import json import sys import os -from recommonmark.parser import CommonMarkParser +import recommonmark # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -55,16 +55,20 @@ extensions = [ 'sphinx.ext.todo', 'sphinx.ext.coverage', 'rstjinja', - 'c2rst' + 'c2rst', + 'recommonmark', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['templates'] # The suffix of source filenames. -source_suffix = ['.rst', '.md', '.c', '.h'] +source_suffix = { + '.rst': 'restructuredtext', + '.md': 'markdown', + '.c': '' +} -source_parsers = {'.md': CommonMarkParser} # The encoding of source files. #source_encoding = 'utf-8-sig' From 4ac88e4df87f37cd4eba832174b58ffacc5aca90 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Thu, 9 Apr 2020 09:13:02 -0500 Subject: [PATCH 16/22] build.yml: unpin Sphinx install; --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 455f83a21..b56fb35b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: run: | sudo apt-get install -y eatmydata sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 - pip install requests sh click setuptools cpp-coveralls "Sphinx<3" sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml + pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml - name: Versions run: | gcc --version From 49771b4d7f46a056579d3690977e772fa91f30b5 Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Thu, 9 Apr 2020 14:27:51 -0500 Subject: [PATCH 17/22] Update to v1.3 --- .../boards/{nfc_copy => nfc_copy_cat}/board.c | 0 .../{nfc_copy => nfc_copy_cat}/mpconfigboard.h | 13 +++++++------ .../{nfc_copy => nfc_copy_cat}/mpconfigboard.mk | 5 ++++- .../boards/{nfc_copy => nfc_copy_cat}/pins.c | 5 ++--- 4 files changed, 13 insertions(+), 10 deletions(-) rename ports/atmel-samd/boards/{nfc_copy => nfc_copy_cat}/board.c (100%) rename ports/atmel-samd/boards/{nfc_copy => nfc_copy_cat}/mpconfigboard.h (84%) rename ports/atmel-samd/boards/{nfc_copy => nfc_copy_cat}/mpconfigboard.mk (67%) rename ports/atmel-samd/boards/{nfc_copy => nfc_copy_cat}/pins.c (83%) diff --git a/ports/atmel-samd/boards/nfc_copy/board.c b/ports/atmel-samd/boards/nfc_copy_cat/board.c similarity index 100% rename from ports/atmel-samd/boards/nfc_copy/board.c rename to ports/atmel-samd/boards/nfc_copy_cat/board.c diff --git a/ports/atmel-samd/boards/nfc_copy/mpconfigboard.h b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.h similarity index 84% rename from ports/atmel-samd/boards/nfc_copy/mpconfigboard.h rename to ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.h index 126b2119f..3790d23ff 100644 --- a/ports/atmel-samd/boards/nfc_copy/mpconfigboard.h +++ b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.h @@ -1,23 +1,24 @@ #define MICROPY_HW_BOARD_NAME "Electronic Cats NFC Copy Cat" #define MICROPY_HW_MCU_NAME "samd21e18" +#define MICROPY_HW_LED_STATUS (&pin_PA14) + #define MICROPY_PORT_A (0) #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) +#define SPI_FLASH_MOSI_PIN &pin_PA08 +#define SPI_FLASH_MISO_PIN &pin_PA11 +#define SPI_FLASH_SCK_PIN &pin_PA09 +#define SPI_FLASH_CS_PIN &pin_PA10 + // No microcontroller.nvm #define CIRCUITPY_INTERNAL_NVM_SIZE 0 -#define DEFAULT_I2C_BUS_SCL (&pin_PA08) -#define DEFAULT_I2C_BUS_SDA (&pin_PA09) - #define DEFAULT_SPI_BUS_SCK (&pin_PA17) #define DEFAULT_SPI_BUS_MOSI (&pin_PA16) #define DEFAULT_SPI_BUS_MISO (&pin_PA19) -#define DEFAULT_UART_BUS_RX (&pin_PA01) -#define DEFAULT_UART_BUS_TX (&pin_PA00) - #define IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA20 1 #define IGNORE_PIN_PA21 1 diff --git a/ports/atmel-samd/boards/nfc_copy/mpconfigboard.mk b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk similarity index 67% rename from ports/atmel-samd/boards/nfc_copy/mpconfigboard.mk rename to ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk index 582c584d8..4f6d1e70d 100644 --- a/ports/atmel-samd/boards/nfc_copy/mpconfigboard.mk +++ b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk @@ -6,6 +6,9 @@ USB_MANUFACTURER = "Electronic Cats" CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 -INTERNAL_FLASH_FILESYSTEM = 1 +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "GD25Q16C" LONGINT_IMPL = NONE + CIRCUITPY_SMALL_BUILD = 1 diff --git a/ports/atmel-samd/boards/nfc_copy/pins.c b/ports/atmel-samd/boards/nfc_copy_cat/pins.c similarity index 83% rename from ports/atmel-samd/boards/nfc_copy/pins.c rename to ports/atmel-samd/boards/nfc_copy_cat/pins.c index 46a7ed3c9..ebe6e89e4 100644 --- a/ports/atmel-samd/boards/nfc_copy/pins.c +++ b/ports/atmel-samd/boards/nfc_copy_cat/pins.c @@ -4,8 +4,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) }, // IRQ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA06) }, // IN_A { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA07) }, // IN_B - { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA10) }, // LED - { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA11) }, // LED + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA05) }, // LED + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA04) }, // LED { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA14) }, // LED { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_PA27) }, // Switch { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_PA28) }, // Switch @@ -15,7 +15,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PA18) }, // CS - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 1d64c51b7e84a72f443e6bc43cdd0d2e7520247b Mon Sep 17 00:00:00 2001 From: sommersoft Date: Thu, 9 Apr 2020 15:14:26 -0500 Subject: [PATCH 18/22] build.yml: pin Sphinx to '<4' --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b56fb35b8..333c98846 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: run: | sudo apt-get install -y eatmydata sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 - pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml + pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml - name: Versions run: | gcc --version From 2a47623283911c8ebac6152560affc8c419dbddf Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Thu, 9 Apr 2020 17:00:42 -0500 Subject: [PATCH 19/22] update build.yml --- .github/workflows/build.yml | 81 +++++++++++++++++++++++++++++++------ 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 921a40d27..8e4b6f2d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,8 @@ jobs: python-version: 3.5 - name: Install deps run: | - sudo apt-get install -y gettext librsvg2-bin + sudo apt-get install -y eatmydata + sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml - name: Versions run: | @@ -66,6 +67,54 @@ jobs: run: python3 -u ci_new_boards_check.py working-directory: tools + - name: Build mpy-cross.static-raspbian + run: make -C mpy-cross -j2 -f Makefile.static-raspbian + - uses: actions/upload-artifact@v1.0.0 + with: + name: mpy-cross.static-raspbian + path: mpy-cross/mpy-cross.static-raspbian + + - name: Build mpy-cross.static + run: make -C mpy-cross -j2 -f Makefile.static + - uses: actions/upload-artifact@v1.0.0 + with: + name: mpy-cross.static-amd64-linux + path: mpy-cross/mpy-cross.static + + - name: Build mpy-cross.static-mingw + run: make -C mpy-cross -j2 -f Makefile.static-mingw + - uses: actions/upload-artifact@v1.0.0 + with: + name: mpy-cross.static-x64-windows + path: mpy-cross/mpy-cross.static.exe + + mpy-cross-mac: + runs-on: macos-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Install deps + run: | + brew link --force gettext + - name: Versions + run: | + gcc --version + python3 --version + msgfmt --version + - uses: actions/checkout@v1 + with: + submodules: true + - name: CircuitPython version + run: git describe --dirty --always --tags + - name: Build mpy-cross + run: make -C mpy-cross -j2 + - uses: actions/upload-artifact@v1.0.0 + with: + name: mpy-cross-macos-catalina + path: mpy-cross/mpy-cross + build-arm: runs-on: ubuntu-16.04 needs: test @@ -73,14 +122,18 @@ jobs: fail-fast: false matrix: board: + - "TG-Watch02A" - "aramcon_badge_2019" - "arduino_mkr1300" - "arduino_mkrzero" - "arduino_nano_33_ble" + - "arduino_nano_33_iot" - "arduino_zero" - "bast_pro_mini_m0" - "capablerobot_usbhub" - "catwan_usbstick" + - "circuitbrains_basic_m0" + - "circuitbrains_deluxe_m4" - "circuitplayground_bluefruit" - "circuitplayground_express" - "circuitplayground_express_crickit" @@ -95,6 +148,9 @@ jobs: - "electronut_labs_blip" - "electronut_labs_papyr" - "escornabot_makech" + - "espruino_pico" + - "espruino_wifi" + - "feather_bluefruit_sense" - "feather_m0_adalogger" - "feather_m0_basic" - "feather_m0_express" @@ -103,6 +159,7 @@ jobs: - "feather_m0_rfm9x" - "feather_m0_supersized" - "feather_m4_express" + - "feather_m7_1011" - "feather_mimxrt1011" - "feather_mimxrt1062" - "feather_nrf52840_express" @@ -113,12 +170,15 @@ jobs: - "hallowing_m0_express" - "hallowing_m4_express" - "imxrt1010_evk" + - "imxrt1020_evk" + - "imxrt1060_evk" - "itsybitsy_m0_express" - "itsybitsy_m4_express" - "itsybitsy_nrf52840_express" - "kicksat-sprite" - "makerdiary_nrf52840_mdk" - "makerdiary_nrf52840_mdk_usb_dongle" + - "meowbit_v121" - "meowmeow" - "metro_m0_express" - "metro_m4_airlift_lite" @@ -126,6 +186,8 @@ jobs: - "metro_nrf52840_express" - "mini_sam_m4" - "monster_m4sk" + - "ndgarage_ndbit6" + - "nfc_copy_cat" - "ohs2020_badge" - "openbook_m4" - "particle_argon" @@ -140,6 +202,7 @@ jobs: - "pybadge" - "pybadge_airlift" - "pyboard_v11" + - "pycubed" - "pygamer" - "pygamer_advance" - "pyportal" @@ -158,17 +221,21 @@ jobs: - "sparkfun_redboard_turbo" - "sparkfun_samd21_dev" - "sparkfun_samd21_mini" + - "sparkfun_samd51_thing_plus" - "spresense" - "stm32f411ce_blackpill" - "stm32f411ve_discovery" - "stm32f412zg_discovery" + - "stm32f4_discovery" - "stringcar_m0_express" + - "teensy40" - "teknikio_bluebird" - "trellis_m4_express" - "trinket_m0" - "trinket_m0_haxpress" - "uchip" - "ugame10" + - "winterbloom_big_honking_button" - "winterbloom_sol" - "xinabox_cc03" - "xinabox_cs11" @@ -208,14 +275,4 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) - - name: Install upload deps - run: | - pip install uritemplate - - name: Upload to Release - run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py" - working-directory: tools - env: - UPLOAD_URL: ${{ github.event.release.upload_url }} - ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }} - if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested') + if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) \ No newline at end of file From 0e06a88fdd078d5ffc995113b89acfcc637b441e Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Thu, 9 Apr 2020 17:19:06 -0500 Subject: [PATCH 20/22] update YML --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36cf1e83a..7111b2f36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -325,4 +325,4 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) + if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) \ No newline at end of file From abf79de785b8cdd516d8bd546236263e943485a5 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Sat, 11 Apr 2020 08:59:51 -0400 Subject: [PATCH 21/22] Fix bad submodule path The repository URL for extmod/ulab had a trailing slash, causing errors when trying to clone it. Closes #2762 --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 5c3387077..365d9ff72 100644 --- a/.gitmodules +++ b/.gitmodules @@ -109,7 +109,7 @@ url = https://github.com/adafruit/Adafruit_CircuitPython_Register.git [submodule "extmod/ulab"] path = extmod/ulab - url = https://github.com/v923z/micropython-ulab/ + url = https://github.com/v923z/micropython-ulab [submodule "frozen/Adafruit_CircuitPython_ESP32SPI"] path = frozen/Adafruit_CircuitPython_ESP32SPI url = https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI From 8797e3347f892d39880f4f92967b1fd664ca5dbe Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Sat, 11 Apr 2020 09:05:42 -0400 Subject: [PATCH 22/22] Fix maximum keycode in keyboard HID descriptor The HID descriptor reported by circuitpython erroneously limited the maximum keycode to 101, which prevented circuitpython from sending a number of otherwise valid keycodes. Closes #274 --- tools/hid_report_descriptors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hid_report_descriptors.py b/tools/hid_report_descriptors.py index 92c962d59..07ed26744 100644 --- a/tools/hid_report_descriptors.py +++ b/tools/hid_report_descriptors.py @@ -68,9 +68,9 @@ def keyboard_hid_descriptor(report_id): 0x81, 0x02, # Input (Data, Variable, Absolute) 0x81, 0x01, # Input (Constant) 0x19, 0x00, # Usage Minimum (0) - 0x29, 101, # Usage Maximum (101) + 0x29, 0xDD, # Usage Maximum (221) 0x15, 0x00, # Logical Minimum (0) - 0x25, 101, # Logical Maximum (101) + 0x25, 0xDD, # Logical Maximum (221) 0x75, 0x08, # Report Size (8) 0x95, 0x06, # Report Count (6) 0x81, 0x00, # Input (Data, Array)