Skip to content
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

esp32s2: Reserve UART pins only if DEBUG=1 is set to address issue 3811 #3817

Merged
merged 3 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
python-version: 3.8
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy
Expand Down
2 changes: 1 addition & 1 deletion ports/esp32s2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ CFLAGS += -DSTACK_CANARY_VALUE=0xa5a5a5a5

#Debugging/Optimization
ifeq ($(DEBUG), 1)
CFLAGS += -ggdb
CFLAGS += -DDEBUG -ggdb
OPTIMIZATION_FLAGS ?= -Og
# You may want to enable these flags to make setting breakpoints easier.
# CFLAGS += -fno-inline -fno-ipa-sra
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */

busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL);
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/electroniccats_bastwifi/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */
}

bool board_requests_safe_mode(void) {
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/espressif_kaluga_1/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */
}

bool board_requests_safe_mode(void) {
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/espressif_saola_1_wroom/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */
}

bool board_requests_safe_mode(void) {
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/espressif_saola_1_wrover/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */
}

bool board_requests_safe_mode(void) {
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/microdev_micro_s2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */

// SPI Flash and RAM
common_hal_never_reset_pin(&pin_GPIO26);
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/muselab_nanoesp32_s2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */
}

bool board_requests_safe_mode(void) {
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/targett_module_clip_wroom/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */

// Crystal
common_hal_never_reset_pin(&pin_GPIO15);
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/targett_module_clip_wrover/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */

//Crystal
common_hal_never_reset_pin(&pin_GPIO15);
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32s2/boards/unexpectedmaker_feathers2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */

// SPI Flash and RAM
common_hal_never_reset_pin(&pin_GPIO26);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO20);

// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */

// SPI Flash and RAM
common_hal_never_reset_pin(&pin_GPIO26);
Expand Down