Skip to content

Commit e85bb9f

Browse files
committed
2 parents e9b9cac + 5a053f9 commit e85bb9f

File tree

6 files changed

+93
-22
lines changed

6 files changed

+93
-22
lines changed

ports/espressif/boards/microdev_micro_c3/mpconfigboard.h

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,31 @@
2525
*/
2626

2727
// Board setup
28-
#define MICROPY_HW_BOARD_NAME "MicroDev microC3"
29-
#define MICROPY_HW_MCU_NAME "ESP32-C3FN4"
28+
#define MICROPY_HW_BOARD_NAME "MicroDev microC3"
29+
#define MICROPY_HW_MCU_NAME "ESP32-C3FN4"
3030

3131
// Status LEDs
32-
#define MICROPY_HW_NEOPIXEL (&pin_GPIO7)
33-
#define MICROPY_HW_NEOPIXEL_COUNT (2)
32+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO7)
33+
#define MICROPY_HW_NEOPIXEL_COUNT (2)
3434

35-
#define MICROPY_HW_LED_STATUS (&pin_GPIO8)
35+
#define MICROPY_HW_LED_STATUS (&pin_GPIO8)
3636

3737
// Default bus pins
38-
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO4)
39-
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO5)
38+
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO4)
39+
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO5)
4040

41-
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO1)
42-
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO2)
43-
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO3)
41+
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO1)
42+
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO2)
43+
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO3)
4444

45-
#define DEFAULT_UART_BUS_RX (&pin_GPIO20)
46-
#define DEFAULT_UART_BUS_TX (&pin_GPIO21)
45+
#define DEFAULT_UART_BUS_RX (&pin_GPIO20)
46+
#define DEFAULT_UART_BUS_TX (&pin_GPIO21)
4747

48-
// Serial over UART
49-
#define CIRCUITPY_CONSOLE_UART_RX DEFAULT_UART_BUS_RX
50-
#define CIRCUITPY_CONSOLE_UART_TX DEFAULT_UART_BUS_TX
48+
// For REPL over built-in USB Serial
49+
#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1)
50+
51+
// For entering safe mode
52+
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9)
53+
54+
// Explanation of how a user got into safe mode
55+
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")

ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ IDF_TARGET = esp32c3
55

66
INTERNAL_FLASH_FILESYSTEM = 1
77

8-
CIRCUITPY_ESP_FLASH_MODE = qio
8+
CIRCUITPY_ESP_FLASH_MODE = dio
99
CIRCUITPY_ESP_FLASH_FREQ = 80m
1010
CIRCUITPY_ESP_FLASH_SIZE = 4MB
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,70 @@
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+
35+
#
36+
# PHY
37+
#
38+
CONFIG_ESP_PHY_ENABLE_USB=y
39+
# end of PHY
40+
41+
#
42+
# ESP System Settings
43+
#
44+
# CONFIG_ESP_SYSTEM_USE_EH_FRAME is not set
45+
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
46+
# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set
47+
# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set
48+
# end of ESP System Settings
49+
150
#
251
# LWIP
352
#
453
CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microC3"
554
# end of LWIP
55+
56+
#
57+
# SPI Flash driver
58+
#
59+
# CONFIG_SPI_FLASH_AUTO_SUSPEND is not set
60+
# end of SPI Flash driver
61+
62+
# end of Component config
63+
64+
#
65+
# Deprecated options for backward compatibility
66+
#
67+
# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
68+
CONFIG_LOG_BOOTLOADER_LEVEL=0
69+
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set
70+
# end of Deprecated options for backward compatibility

ports/espressif/common-hal/microcontroller/__init__.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
9797
#endif
9898
break;
9999
case RUNMODE_NORMAL:
100-
#if defined(CONFIG_IDF_TARGET_ESP32)
101-
safe_mode_on_next_reset(NO_SAFE_MODE);
102-
#else
103100
// revert back to normal boot
101+
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
104102
REG_WRITE(RTC_RESET_CAUSE_REG, 0); // reset uf2
103+
#endif
105104
REG_WRITE(RTC_CNTL_STORE0_REG, 0); // reset safe mode
105+
#if !defined(CONFIG_IDF_TARGET_ESP32)
106106
REG_WRITE(RTC_CNTL_OPTION1_REG, 0); // reset bootloader
107107
#endif
108108
break;
@@ -112,10 +112,12 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
112112
break;
113113
case RUNMODE_BOOTLOADER:
114114
// DFU download
115-
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C3)
115+
#if defined(CONFIG_IDF_TARGET_ESP32)
116116
mp_arg_error_invalid(MP_QSTR_run_mode);
117117
#else
118+
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
118119
chip_usb_set_persist_flags(USBDC_BOOT_DFU);
120+
#endif
119121
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT);
120122
#endif
121123
break;

shared-module/displayio/Display.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ void common_hal_displayio_display_set_auto_refresh(displayio_display_obj_t *self
399399
}
400400

401401
void displayio_display_background(displayio_display_obj_t *self) {
402-
common_hal_displayio_display_set_brightness(self, 1.0);
403402
if (self->auto_refresh && (supervisor_ticks_ms64() - self->core.last_refresh) > self->native_ms_per_frame) {
404403
_refresh_display(self);
405404
}

supervisor/shared/web_workflow/static/directory.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010
<body>
1111
<h1><a href="/"><img src="/favicon.ico"/></a>&nbsp;<span id="path"></span></h1>
12-
<div id="usbwarning" style="display: none;">ℹ️ USB is using the storage. Only allowing reads. See <a href="https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage">the CircuitPython Essentials: Storage guide</a> for details.</div>
12+
<div id="usbwarning" style="display: none;">ℹ️ USB is using the storage. Only allowing reads. Try ejecting the CIRCUITPY drive. See <a href="https://learn.adafruit.com/3654/device-setup#disabling-usb-mass-storage-3125964">Getting Started with Web Workflow</a> for details.</div>
1313
<template id="row"><tr><td></td><td></td><td><a class="path"></a></td><td class="modtime"></td><td><button class="rename">✏️ Rename</button></td><td><button class="delete">🗑️ Delete</button></td><td><a class="edit_link" href=""><button>📝 Edit</button></a></td></tr></template>
1414
<table>
1515
<thead><tr><th>Type</th><th>Size</th><th>Path</th><th>Modified</th><th colspan="3"></th></tr></thead>

0 commit comments

Comments
 (0)