forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Enable Web Workflow on Feather ESP32 V2 #6685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* This file is part of the MicroPython project, http://micropython.org/ | ||
* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2020 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 "supervisor/board.h" | ||
#include "mpconfigboard.h" | ||
#include "shared-bindings/microcontroller/Pin.h" | ||
#include "components/driver/include/driver/gpio.h" | ||
#include "components/hal/include/hal/gpio_hal.h" | ||
#include "common-hal/microcontroller/Pin.h" | ||
|
||
void board_init(void) { | ||
reset_board(); | ||
} | ||
|
||
bool board_requests_safe_mode(void) { | ||
return false; | ||
} | ||
|
||
void reset_board(void) { | ||
// Turn on NeoPixel power by default. | ||
gpio_set_direction(8, GPIO_MODE_DEF_OUTPUT); | ||
gpio_set_level(8, true); | ||
} | ||
|
||
void board_deinit(void) { | ||
// Turn off NeoPixel | ||
gpio_set_direction(8, GPIO_MODE_DEF_OUTPUT); | ||
gpio_set_level(8, false); | ||
} |
49 changes: 49 additions & 0 deletions
49
ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* This file is part of the MicroPython project, http://micropython.org/ | ||
* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2022 Dan Halbert 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. | ||
*/ | ||
|
||
#define MICROPY_HW_BOARD_NAME "Adafruit QT Py ESP32 PICO" | ||
#define MICROPY_HW_MCU_NAME "ESP32" | ||
|
||
#define MICROPY_HW_NEOPIXEL (&pin_GPIO5) | ||
|
||
#define CIRCUITPY_BOARD_I2C (2) | ||
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO33, .sda = &pin_GPIO4}, \ | ||
{.scl = &pin_GPIO19, .sda = &pin_GPIO22}} | ||
|
||
#define CIRCUITPY_BOARD_SPI (1) | ||
#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO14, .mosi = &pin_GPIO13, .miso = &pin_GPIO12}} | ||
|
||
#define CIRCUITPY_BOARD_UART (1) | ||
#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO32, .rx = &pin_GPIO7}} | ||
|
||
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) | ||
|
||
// Explanation of how a user got into safe mode | ||
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing BOOT button at start up.\n") | ||
|
||
// UART pins attached to the USB-serial converter chip | ||
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) | ||
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) |
15 changes: 15 additions & 0 deletions
15
ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CIRCUITPY_CREATOR_ID = 0x0000239A | ||
CIRCUITPY_CREATION_ID = 0x00320003 | ||
|
||
IDF_TARGET = esp32 | ||
|
||
INTERNAL_FLASH_FILESYSTEM = 1 | ||
LONGINT_IMPL = MPZ | ||
|
||
# The default queue depth of 16 overflows on release builds, | ||
# so increase it to 32. | ||
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 | ||
|
||
CIRCUITPY_ESP_FLASH_MODE = dio | ||
CIRCUITPY_ESP_FLASH_FREQ = 40m | ||
CIRCUITPY_ESP_FLASH_SIZE = 8MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#include "shared-bindings/board/__init__.h" | ||
|
||
CIRCUITPY_BOARD_BUS_SINGLETON(stemma_i2c, i2c, 1) | ||
|
||
STATIC const mp_rom_map_elem_t board_module_globals_table[] = { | ||
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, | ||
{ MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO26) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO25) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO25) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO27) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO27) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO15) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO15) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO4) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO4) }, | ||
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO4) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO33) }, | ||
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO33) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO32) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO32) }, | ||
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO32) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO7) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO7) }, | ||
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO7) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO13) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO13) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO14) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO14) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO12) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO12) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO8) }, | ||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO5) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO19) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO19) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO22) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO22) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, | ||
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, | ||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, | ||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, | ||
}; | ||
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# | ||
# Partition Table | ||
# | ||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" | ||
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" | ||
# end of Partition Table | ||
|
||
# | ||
# SPI RAM config | ||
# | ||
# CONFIG_SPIRAM_TYPE_AUTO is not set | ||
CONFIG_SPIRAM_TYPE_ESPPSRAM16=y | ||
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set | ||
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set | ||
CONFIG_SPIRAM_SIZE=2097152 | ||
CONFIG_SPIRAM_SPEED_40M=y | ||
CONFIG_SPIRAM=y | ||
CONFIG_SPIRAM_BOOT_INIT=y | ||
CONFIG_SPIRAM_IGNORE_NOTFOUND=y | ||
CONFIG_SPIRAM_USE_MEMMAP=y | ||
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set | ||
# CONFIG_SPIRAM_USE_MALLOC is not set | ||
CONFIG_SPIRAM_MEMTEST=y | ||
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set | ||
# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set | ||
CONFIG_SPIRAM_CACHE_WORKAROUND=y | ||
|
||
# | ||
# SPI RAM config | ||
# | ||
CONFIG_ESP32_SPIRAM_SUPPORT=y | ||
# CONFIG_SPIRAM_TYPE_AUTO is not set | ||
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set | ||
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set | ||
|
||
### # Uncomment to send log output to TX/RX pins on Feather ESP32V2 | ||
### # | ||
### # ESP System Settings | ||
### # | ||
### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y | ||
### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set | ||
### CONFIG_ESP_CONSOLE_UART_CUSTOM=y | ||
### # CONFIG_ESP_CONSOLE_NONE is not set | ||
### CONFIG_ESP_CONSOLE_UART=y | ||
### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y | ||
### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set | ||
### CONFIG_ESP_CONSOLE_UART_NUM=0 | ||
### CONFIG_ESP_CONSOLE_UART_TX_GPIO=8 | ||
### CONFIG_ESP_CONSOLE_UART_RX_GPIO=7 | ||
### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 | ||
### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set | ||
### # end of ESP System Settings |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.