Skip to content

Commit d869b44

Browse files
committed
further ESP32 sdkconfig fixes; add CIRCUITPY_STATUS_BAR
1 parent 76e32dc commit d869b44

File tree

5 files changed

+41
-32
lines changed

5 files changed

+41
-32
lines changed

ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ LONGINT_IMPL = MPZ
1010
# so increase it to 32.
1111
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
1212

13+
CIRCUITPY_STATUS_BAR = 0
14+
CIRCUITPY_WEB_WORKFLOW = 0
15+
1316
CIRCUITPY_ESP_FLASH_MODE = dio
1417
CIRCUITPY_ESP_FLASH_FREQ = 40m
1518
CIRCUITPY_ESP_FLASH_SIZE = 8MB

ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,30 @@ CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv"
88
#
99
# SPI RAM config
1010
#
11-
CONFIG_ESP32_SPIRAM_SUPPORT=y
1211
# CONFIG_SPIRAM_TYPE_AUTO is not set
1312
CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
1413
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
1514
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
15+
CONFIG_SPIRAM_SIZE=2097152
16+
CONFIG_SPIRAM_SPEED_40M=y
17+
CONFIG_SPIRAM=y
18+
CONFIG_SPIRAM_BOOT_INIT=y
19+
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
20+
CONFIG_SPIRAM_USE_MEMMAP=y
21+
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
22+
# CONFIG_SPIRAM_USE_MALLOC is not set
23+
CONFIG_SPIRAM_MEMTEST=y
24+
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
25+
# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set
26+
CONFIG_SPIRAM_CACHE_WORKAROUND=y
27+
28+
#
29+
# SPI RAM config
30+
#
31+
CONFIG_ESP32_SPIRAM_SUPPORT=y
32+
# CONFIG_SPIRAM_TYPE_AUTO is not set
33+
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
34+
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
1635

1736
### # Uncomment to send log output to TX/RX pins on Feather ESP32V2
1837
### #

ports/espressif/esp-idf-config/sdkconfig-esp32.defaults

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -269,26 +269,6 @@ CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
269269
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
270270
# CONFIG_ESP32_SPIRAM_SUPPORT is not set
271271

272-
#
273-
# SPI RAM config
274-
#
275-
# CONFIG_SPIRAM_TYPE_AUTO is not set
276-
# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set
277-
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
278-
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
279-
CONFIG_SPIRAM_SIZE=-1
280-
CONFIG_SPIRAM_SPEED_40M=y
281-
CONFIG_SPIRAM=y
282-
CONFIG_SPIRAM_BOOT_INIT=y
283-
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
284-
CONFIG_SPIRAM_USE_MEMMAP=y
285-
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
286-
# CONFIG_SPIRAM_USE_MALLOC is not set
287-
CONFIG_SPIRAM_MEMTEST=y
288-
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
289-
# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set
290-
CONFIG_SPIRAM_CACHE_WORKAROUND=y
291-
292272
#
293273
# SPIRAM cache workaround debugging
294274
#

py/circuitpy_mpconfig.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,9 @@ CFLAGS += -DCIRCUITPY_SSL=$(CIRCUITPY_SSL)
366366
CIRCUITPY_STAGE ?= 0
367367
CFLAGS += -DCIRCUITPY_STAGE=$(CIRCUITPY_STAGE)
368368

369+
CIRCUITPY_STATUS_BAR ?= $(CIRCUITPY_WEB_WORKFLOW)
370+
CFLAGS += -DCIRCUITPY_STATUS_BAR=$(CIRCUITPY_STATUS_BAR)
371+
369372
CIRCUITPY_STORAGE ?= 1
370373
CFLAGS += -DCIRCUITPY_STORAGE=$(CIRCUITPY_STORAGE)
371374

supervisor/shared/workflow.c

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,26 @@
4646
#endif
4747
static background_callback_t workflow_background_cb;
4848

49+
#if CIRCUITPY_STATUS_BAR
4950
static void supervisor_workflow_update_status_bar(void) {
50-
// // Neighboring "" "" are concatenated by the compiler. Without this separation, the hex code
51-
// // doesn't get terminated after two following characters and the value is invalid.
52-
// // This is the OSC command to set the title and the icon text. It can be up to 255 characters
53-
// // but some may be cut off.
54-
// serial_write("\x1b" "]0;");
55-
// serial_write("🐍 ");
56-
// #if CIRCUITPY_WEB_WORKFLOW
57-
// supervisor_web_workflow_status();
58-
// #endif
59-
// // Send string terminator
60-
// serial_write("\x1b" "\\");
51+
// Neighboring "" "" are concatenated by the compiler. Without this separation, the hex code
52+
// doesn't get terminated after two following characters and the value is invalid.
53+
// This is the OSC command to set the title and the icon text. It can be up to 255 characters
54+
// but some may be cut off.
55+
serial_write("\x1b" "]0;");
56+
serial_write("🐍 ");
57+
#if CIRCUITPY_WEB_WORKFLOW
58+
supervisor_web_workflow_status();
59+
#endif
60+
// Send string terminator
61+
serial_write("\x1b" "\\");
6162
}
63+
#endif
6264

6365
static void workflow_background(void *data) {
66+
#if CIRCUITPY_STATUS_BAR
6467
supervisor_workflow_update_status_bar();
68+
#endif
6569
}
6670

6771
// Called during a VM reset. Doesn't actually reset things.

0 commit comments

Comments
 (0)