Skip to content

Commit f2d1023

Browse files
authored
Merge branch 'adafruit:main' into main
2 parents c7b28eb + 07f8ceb commit f2d1023

File tree

49 files changed

+1425
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1425
-285
lines changed

.github/workflows/ports_windows.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on:
55
pull_request:
66
paths:
77
- '.github/workflows/*.yml'
8-
- 'tools/**'
9-
- 'py/**'
108
- 'extmod/**'
119
- 'lib/**'
10+
- 'mpy-cross/**'
1211
- 'ports/unix/**'
1312
- 'ports/windows/**'
13+
- 'py/**'
14+
- 'requirements*.txt'
15+
- 'tools/**'
1416

1517
concurrency:
1618
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -64,7 +66,8 @@ jobs:
6466
pip install wheel
6567
# requirements_dev.txt doesn't install on windows. (with msys2 python)
6668
# instead, pick a subset for what we want to do
67-
pip install cascadetoml jinja2 typer intelhex
69+
# Undo the pin of typer & click when undoing it in requirements-dev.txt
70+
pip install cascadetoml jinja2 typer==0.4.0 click==8.0.4 intelhex
6871
# check that installed packages work....?
6972
which python; python --version; python -c "import cascadetoml"
7073
which python3; python3 --version; python3 -c "import cascadetoml"

locale/sv.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
88
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
9-
"PO-Revision-Date: 2022-03-19 16:56+0000\n"
9+
"PO-Revision-Date: 2022-03-23 08:58+0000\n"
1010
"Last-Translator: Jonny Bergdahl <[email protected]>\n"
1111
"Language-Team: LANGUAGE <[email protected]>\n"
1212
"Language: sv\n"
@@ -2452,7 +2452,7 @@ msgstr "Det går inte att läsa färgpalettdata"
24522452

24532453
#: ports/espressif/common-hal/mdns/Server.c
24542454
msgid "Unable to start mDNS query"
2455-
msgstr ""
2455+
msgstr "Det gick inte att starta mDNS-frågan"
24562456

24572457
#: shared-bindings/nvm/ByteArray.c
24582458
msgid "Unable to write to nvm."
@@ -3691,11 +3691,11 @@ msgstr "loopback + tyst läge stöds inte av kringutrustning"
36913691

36923692
#: ports/espressif/common-hal/mdns/Server.c
36933693
msgid "mDNS already initialized"
3694-
msgstr ""
3694+
msgstr "mDNS har redan initierats"
36953695

36963696
#: ports/espressif/common-hal/mdns/Server.c
36973697
msgid "mDNS only works with built-in WiFi"
3698-
msgstr ""
3698+
msgstr "mDNS fungerar bara med inbyggt WiFi"
36993699

37003700
#: py/parse.c
37013701
msgid "malformed f-string"

ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
LD_FILE = boards/samd51x20-bootloader-external-flash.ld
22
USB_VID = 0x1b4f
3-
USB_PID = 0x0020 # Used by uf2 bootloader
3+
# Used by uf2 bootloader
4+
USB_PID = 0x0020
45
USB_PRODUCT = "SparkFun MicroMod SAMD51 Processor"
56
USB_MANUFACTURER = "SparkFun Electronics"
67

ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
LD_FILE = boards/samd51x20-bootloader-external-flash.ld
22
USB_VID = 0x1b4f
3-
USB_PID = 0x0016 # Used by uf2 bootloader
3+
# Used by uf2 bootloader
4+
USB_PID = 0x0016
45
USB_PRODUCT = "SparkFun SAMD51 Thing+"
56
USB_MANUFACTURER = "SparkFun Electronics"
67

ports/espressif/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ SRC_C += \
262262
endif
263263
endif
264264

265+
ifeq ($(IDF_TARGET),esp32c3)
266+
SRC_C += \
267+
supervisor/usb_serial_jtag.c
268+
endif
269+
265270
$(BUILD)/i2s_lcd_esp32s2_driver.o: CFLAGS += -Wno-sign-compare
266271

267272
ifneq ($(CIRCUITPY_USB),0)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2021 microDev
7+
* Copyright (c) 2021 skieast/Bruce Segal
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining a copy
10+
* of this software and associated documentation files (the "Software"), to deal
11+
* in the Software without restriction, including without limitation the rights
12+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
* copies of the Software, and to permit persons to whom the Software is
14+
* furnished to do so, subject to the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included in
17+
* all copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
* THE SOFTWARE.
26+
*/
27+
28+
#include "shared-bindings/microcontroller/Pin.h"
29+
#include "supervisor/board.h"
30+
31+
#include "components/driver/include/driver/gpio.h"
32+
#include "soc/usb_serial_jtag_struct.h"
33+
34+
void board_init(void) {
35+
}
36+
37+
bool board_requests_safe_mode(void) {
38+
return false;
39+
}
40+
41+
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
42+
return false;
43+
}
44+
45+
void reset_board(void) {
46+
}
47+
48+
void board_deinit(void) {
49+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2021 microDev
7+
* Copyright (c) 2021 skieast/Bruce Segal
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining a copy
10+
* of this software and associated documentation files (the "Software"), to deal
11+
* in the Software without restriction, including without limitation the rights
12+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
* copies of the Software, and to permit persons to whom the Software is
14+
* furnished to do so, subject to the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included in
17+
* all copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
* THE SOFTWARE.
26+
*/
27+
28+
// Board setup
29+
#define MICROPY_HW_BOARD_NAME "Adafruit QT Py ESP32C3"
30+
#define MICROPY_HW_MCU_NAME "ESP32-C3FN4"
31+
32+
// Status LED
33+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO2)
34+
35+
#define CIRCUITPY_BOARD_I2C (1)
36+
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO6, .sda = &pin_GPIO5}}
37+
38+
#define CIRCUITPY_BOARD_SPI (1)
39+
#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO10, .mosi = &pin_GPIO7, .miso = &pin_GPIO8}}
40+
41+
#define CIRCUITPY_BOARD_UART (1)
42+
#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}}
43+
44+
// For entering safe mode
45+
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9)
46+
47+
// Explanation of how a user got into safe mode
48+
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
49+
50+
#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CIRCUITPY_CREATOR_ID = 0x0000239A
2+
CIRCUITPY_CREATION_ID = 0x00010001
3+
4+
IDF_TARGET = esp32c3
5+
6+
INTERNAL_FLASH_FILESYSTEM = 1
7+
8+
CIRCUITPY_ESP_FLASH_MODE=dio
9+
CIRCUITPY_ESP_FLASH_FREQ=80m
10+
CIRCUITPY_ESP_FLASH_SIZE=4MB
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2021 microDev
7+
* Copyright (c) 2021 skieast/Bruce Segal
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining a copy
10+
* of this software and associated documentation files (the "Software"), to deal
11+
* in the Software without restriction, including without limitation the rights
12+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
* copies of the Software, and to permit persons to whom the Software is
14+
* furnished to do so, subject to the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included in
17+
* all copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
* THE SOFTWARE.
26+
*/
27+
28+
#include "shared-bindings/board/__init__.h"
29+
30+
#include "shared-bindings/board/__init__.h"
31+
32+
CIRCUITPY_BOARD_BUS_SINGLETON(stemma_i2c, i2c, 1)
33+
34+
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
35+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
36+
37+
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO9) },
38+
{ MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO9) },
39+
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO9) },
40+
41+
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO4) },
42+
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO4) },
43+
44+
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO3) },
45+
{ MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO3) },
46+
47+
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO1) },
48+
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO1) },
49+
50+
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO0) },
51+
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO0) },
52+
53+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO5) },
54+
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO5) },
55+
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO5) },
56+
57+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) },
58+
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) },
59+
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) },
60+
61+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO21) },
62+
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO21) },
63+
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO21) },
64+
65+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO20) },
66+
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO20) },
67+
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO20) },
68+
69+
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO7) },
70+
{ MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO7) },
71+
72+
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO10) },
73+
{ MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO10) },
74+
75+
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO8) },
76+
{ MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO8) },
77+
78+
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO2) },
79+
80+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
81+
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
82+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
83+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
84+
};
85+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Automatically generated file. DO NOT EDIT.
2+
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
3+
#
4+
# Bootloader config
5+
#
6+
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
7+
# CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set
8+
CONFIG_BOOTLOADER_LOG_LEVEL=0
9+
# end of Bootloader config
10+
11+
#
12+
# Serial flasher config
13+
#
14+
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
15+
# end of Serial flasher config
16+
17+
#
18+
# Partition Table
19+
#
20+
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv"
21+
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv"
22+
# end of Partition Table
23+
24+
#
25+
# Compiler options
26+
#
27+
# CONFIG_COMPILER_SAVE_RESTORE_LIBCALLS is not set
28+
# end of Compiler options
29+
30+
#
31+
# Component config
32+
#
33+
#
34+
# ESP System Settings
35+
#
36+
# CONFIG_ESP_SYSTEM_USE_EH_FRAME is not set
37+
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
38+
# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set
39+
# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set
40+
# end of ESP System Settings
41+
42+
#
43+
# LWIP
44+
#
45+
CONFIG_LWIP_LOCAL_HOSTNAME="Adafruit-QTPy-ESP32C3"
46+
# end of LWIP
47+
48+
#
49+
# SPI Flash driver
50+
#
51+
# CONFIG_SPI_FLASH_AUTO_SUSPEND is not set
52+
# end of SPI Flash driver
53+
54+
# end of Component config
55+
56+
#
57+
# Deprecated options for backward compatibility
58+
#
59+
# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
60+
CONFIG_LOG_BOOTLOADER_LEVEL=0
61+
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set
62+
# end of Deprecated options for backward compatibility

ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#
2+
# Component config
3+
#
4+
#
5+
# ESP32S3-Specific
6+
#
17
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
28
#
39
# SPI RAM config
@@ -9,12 +15,10 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
915
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
1016
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
1117
CONFIG_SPIRAM_SIZE=2097152
12-
# end of SPI RAM config
13-
14-
CONFIG_DEFAULT_PSRAM_CLK_IO=30
1518
#
1619
# PSRAM Clock and CS IO for ESP32S3
1720
#
21+
CONFIG_DEFAULT_PSRAM_CLK_IO=30
1822
CONFIG_DEFAULT_PSRAM_CS_IO=26
1923
# end of PSRAM Clock and CS IO for ESP32S3
2024

@@ -30,8 +34,14 @@ CONFIG_SPIRAM_USE_MEMMAP=y
3034
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
3135
# CONFIG_SPIRAM_USE_MALLOC is not set
3236
CONFIG_SPIRAM_MEMTEST=y
37+
# end of SPI RAM config
38+
39+
# end of ESP32S3-Specific
40+
3341
#
3442
# LWIP
3543
#
3644
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
3745
# end of LWIP
46+
47+
# end of Component config

0 commit comments

Comments
 (0)