Skip to content

Update espressif boards flash config #6927

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

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 9 additions & 7 deletions ports/espressif/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,13 @@ $(BUILD)/esp-idf:

TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults

UF2_BOOTLOADER ?= $(if $(filter $(IDF_TARGET),esp32s2 esp32s3),1)
ifeq ($(UF2_BOOTLOADER), 1)
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults
else
UF2_BOOTLOADER ?= $(if $(filter $(IDF_TARGET),esp32 esp32c3),0)
ifeq ($(UF2_BOOTLOADER), 0)
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults
else ifeq ($(CIRCUITPY_DUALBANK), 0)
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota.defaults
else
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults
endif

ifeq ($(DEBUG), 1)
Expand Down Expand Up @@ -433,10 +435,10 @@ FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_

ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset --baud 921600

ifeq ($(UF2_BOOTLOADER),1)
all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2
else
ifeq ($(UF2_BOOTLOADER),0)
all: $(BUILD)/firmware.bin
else
all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2
endif

.PHONY: esp-idf-stamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

OPTIMIZATION_FLAGS = -Os
CIRCUITPY_ESP32_CAMERA = 0

CIRCUITPY_DUALBANK = 0
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

OPTIMIZATION_FLAGS = -Os
CIRCUITPY_ESP32_CAMERA = 0

CIRCUITPY_DUALBANK = 0
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

CIRCUITPY_ESP32_CAMERA = 0
CIRCUITPY_DUALBANK = 0

# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/mixgo_ce_serial/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

CIRCUITPY_ESP32_CAMERA = 0
CIRCUITPY_DUALBANK = 0

FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/mixgo_cp_lib/mixgoce_lib
CIRCUITPY_ESP32_CAMERA = 0
2 changes: 1 addition & 1 deletion ports/espressif/boards/mixgo_ce_udisk/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

CIRCUITPY_ESP32_CAMERA = 0
CIRCUITPY_DUALBANK = 0

FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/mixgo_cp_lib/mixgoce_lib
CIRCUITPY_ESP32_CAMERA = 0
11 changes: 6 additions & 5 deletions ports/espressif/esp-idf-config/partitions-2MB-no-uf2.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
# bootloader.bin,, 0x1000, 32K
# partition table,, 0x8000, 4K
nvs, data, nvs, 0x9000, 20K,
app, app, factory, 0x10000, 1408K,
user_fs, data, fat, 0x170000, 576K,
# bootloader.bin,, 0x1000, 32K
# partition table,, 0x8000, 4K
nvs, data, nvs, 0x9000, 20K,
otadata, data, ota, 0xe000, 8K,
app, app, factory, 0x10000, 1472K,
user_fs, data, fat, 0x180000, 512K,
9 changes: 9 additions & 0 deletions ports/espressif/esp-idf-config/partitions-4MB-no-ota.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
# bootloader.bin,, 0x1000, 32K
# partition table,, 0x8000, 4K
nvs, data, nvs, 0x9000, 20K,
otadata, data, ota, 0xe000, 8K,
ota_0, 0, ota_0, 0x10000, 1536K,
uf2, app, factory, 0x190000, 256K,
user_fs, data, fat, 0x1d0000, 2240K,
18 changes: 18 additions & 0 deletions ports/espressif/esp-idf-config/sdkconfig-4MB-no-ota.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Serial flasher config
#
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
# end of Serial flasher config

CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-ota.csv"
#
# Partition Table
#
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-no-ota.csv"
# end of Partition Table