From c77523503bfebbcb3ea74465928145b7ccf5b625 Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Wed, 26 Aug 2020 14:48:46 -0400 Subject: [PATCH 1/4] Fix trailing whitespace errors across ports and docs --- docs/porting.rst | 43 +++++++++++++------ ports/esp32s2/mpconfigport.mk | 7 +-- .../stm/boards/espruino_pico/mpconfigboard.mk | 3 +- .../mpconfigboard.mk | 3 +- .../stm/boards/meowbit_v121/mpconfigboard.mk | 3 +- 5 files changed, 40 insertions(+), 19 deletions(-) diff --git a/docs/porting.rst b/docs/porting.rst index db4ae76262..6cd59fefb1 100644 --- a/docs/porting.rst +++ b/docs/porting.rst @@ -51,10 +51,15 @@ as a natural "TODO" list. An example minimal build list is shown below: .. code-block:: makefile # These modules are implemented in ports//common-hal: - CIRCUITPY_MICROCONTROLLER = 0 # Typically the first module to create - CIRCUITPY_DIGITALIO = 0 # Typically the second module to create + + # Typically the first module to create + CIRCUITPY_MICROCONTROLLER = 0 + # Typically the second module to create + CIRCUITPY_DIGITALIO = 0 + # Other modules: CIRCUITPY_ANALOGIO = 0 CIRCUITPY_BUSIO = 0 + CIRCUITPY_COUNTIO = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_PULSEIO = 0 CIRCUITPY_OS = 0 @@ -63,22 +68,34 @@ as a natural "TODO" list. An example minimal build list is shown below: CIRCUITPY_AUDIOIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 + CIRCUITPY_SDCARDIO = 0 + CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 - CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO (stub ok) + # Requires SPI, PulseIO (stub ok): + CIRCUITPY_DISPLAYIO = 0 # These modules are implemented in shared-module/ - they can be included in # any port once their prerequisites in common-hal are complete. - CIRCUITPY_BITBANGIO = 0 # Requires DigitalIO - CIRCUITPY_GAMEPAD = 0 # Requires DigitalIO - CIRCUITPY_PIXELBUF = 0 # Requires neopixel_write or SPI (dotstar) - CIRCUITPY_RANDOM = 0 # Requires OS - CIRCUITPY_STORAGE = 0 # Requires OS, filesystem - CIRCUITPY_TOUCHIO = 0 # Requires Microcontroller - CIRCUITPY_USB_HID = 0 # Requires USB - CIRCUITPY_USB_MIDI = 0 # Requires USB - CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 # Does nothing without I2C - CIRCUITPY_ULAB = 0 # No requirements, but takes extra flash + # Requires DigitalIO: + CIRCUITPY_BITBANGIO = 0 + # Requires DigitalIO + CIRCUITPY_GAMEPAD = 0 + # Requires neopixel_write or SPI (dotstar) + CIRCUITPY_PIXELBUF = 0 + # Requires OS + CIRCUITPY_RANDOM = 0 + # Requires OS, filesystem + CIRCUITPY_STORAGE = 0 + # Requires Microcontroller + CIRCUITPY_TOUCHIO = 0 + # Requires USB + CIRCUITPY_USB_HID = 0 + CIRCUITPY_USB_MIDI = 0 + # Does nothing without I2C + CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 + # No requirements, but takes extra flash + CIRCUITPY_ULAB = 0 Step 2: Init -------------- diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index 152e5c8030..3ddcf5d613 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -25,8 +25,9 @@ CIRCUITPY_COUNTIO = 0 # These modules are implemented in shared-module/ - they can be included in # any port once their prerequisites in common-hal are complete. -CIRCUITPY_RANDOM = 0 # Requires OS -CIRCUITPY_USB_MIDI = 0 # Requires USB -CIRCUITPY_ULAB = 1 # No requirements, but takes extra flash +# Requires OS +CIRCUITPY_RANDOM = 0 +# Requires USB +CIRCUITPY_USB_MIDI = 0 CIRCUITPY_MODULE ?= none diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.mk b/ports/stm/boards/espruino_pico/mpconfigboard.mk index 201237c9d6..b1b023dd58 100644 --- a/ports/stm/boards/espruino_pico/mpconfigboard.mk +++ b/ports/stm/boards/espruino_pico/mpconfigboard.mk @@ -10,7 +10,8 @@ MCU_VARIANT = STM32F401xE MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_default.ld -LD_FILE = boards/STM32F401xd_fs.ld # use for internal flash +# use for internal flash +LD_FILE = boards/STM32F401xd_fs.ld # Disable ulab as we're nearly out of space on this board due to # INTERNAL_FLASH_FILESYSTEM. It can probably be reenabled if we enable diff --git a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk index 2b2c0d6db5..4d0bd4598d 100644 --- a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk +++ b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk @@ -13,5 +13,6 @@ MCU_PACKAGE = LQFP64 LD_COMMON = boards/common_default.ld LD_DEFAULT = boards/STM32F405_default.ld -LD_BOOT = boards/STM32F405_boot.ld # UF2 boot option +# UF2 boot option +LD_BOOT = boards/STM32F405_boot.ld UF2_OFFSET = 0x8010000 diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index 852836ef8f..a638183019 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -18,4 +18,5 @@ OPTIMIZATION_FLAGS = -Os LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F401xe_boot.ld -# LD_FILE = boards/STM32F401xe_fs.ld # use for internal flash +# use for internal flash +# LD_FILE = boards/STM32F401xe_fs.ld From ad733e6c4a33b830fe430599c372d1fa51ed1b2e Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Wed, 26 Aug 2020 17:37:05 -0400 Subject: [PATCH 2/4] rename reader tool --- tools/mpconfig_category_reader.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/mpconfig_category_reader.py diff --git a/tools/mpconfig_category_reader.py b/tools/mpconfig_category_reader.py new file mode 100644 index 0000000000..2f813931e8 --- /dev/null +++ b/tools/mpconfig_category_reader.py @@ -0,0 +1,31 @@ +filepath = '../py/circuitpy_mpconfig.mk' +with open(filepath) as fp: + line = fp.readline() + cnt = 1 + fullbuild = [] + defon = [] + defoff = [] + while line: + wordlist = line.split() + if wordlist: + if wordlist[-1] == "$(CIRCUITPY_FULL_BUILD)": + fullbuild.append(wordlist[0]) + elif wordlist[-1] == "0": + defoff.append(wordlist[0]) + elif wordlist[-1] == "1": + defon.append(wordlist[0]) + line = fp.readline() + cnt += 1 + + print(str(cnt) + " Lines Read\n") + print("\nFULL BUILDS ------------------------") + for string in fullbuild: + print(string) + + print("\nON BUILDS ------------------------") + for string in defon: + print(string) + + print("\nOFF BUILDS ------------------------") + for string in defoff: + print(string) From 553ac576ebd59941965ef7615fdb15bd2bdc347e Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Wed, 26 Aug 2020 17:48:29 -0400 Subject: [PATCH 3/4] Disable ulab --- ports/esp32s2/mpconfigport.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index 3ddcf5d613..b7cd635044 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -29,5 +29,7 @@ CIRCUITPY_COUNTIO = 0 CIRCUITPY_RANDOM = 0 # Requires USB CIRCUITPY_USB_MIDI = 0 +# Too large for the partition table! +CIRCUITPY_ULAB = 0 CIRCUITPY_MODULE ?= none From 200a296b5cf6851b72460d49fdb3be43980f2d9b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 26 Aug 2020 20:41:25 -0500 Subject: [PATCH 4/4] conf.py (docs): Reorder the steps of the doc build Since e121e267adacf6, the shared bindings matrix uses the stubs. Therefore, we must build them! This should fix the failure to build the docs on readthedocs.org. Neither @sommersoft nor I saw this locally since we had previously built the stubs. github CI didn't see it, because it manually builds the stubs in an earlier step of the build process, and does not clean the tree in between. --- conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 4a8b72584e..256ca922c7 100644 --- a/conf.py +++ b/conf.py @@ -42,6 +42,9 @@ master_doc = 'docs/index' # Grab the JSON values to use while building the module support matrix # in 'shared-bindings/index.rst' +# The stubs must be built before we calculate the shared bindings matrix +subprocess.check_output(["make", "stubs"]) + #modules_support_matrix = shared_bindings_matrix.support_matrix_excluded_boards() modules_support_matrix = shared_bindings_matrix.support_matrix_by_board() @@ -77,7 +80,6 @@ source_suffix = { '.md': 'markdown', } -subprocess.check_output(["make", "stubs"]) extensions.append('autoapi.extension') autoapi_type = 'python'