8000 Switch to esp-idf master for ESP32-S3 support · tannewt/circuitpython@c0f4542 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0f4542

Browse files
committed
Switch to esp-idf master for ESP32-S3 support
It'll be 4.4 at some point
1 parent 3cc4f25 commit c0f4542

File tree

9 files changed

+35
-26
lines changed

9 files changed

+35
-26
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
url = https://github.com/hathach/st_driver.git
126126
[submodule "lib/protomatter"]
127127
path = lib/protomatter
128-
url = https://github.com/adafruit/Adafruit_Protomatter
128+
url = https://github.com/tannewt/Adafruit_Protomatter
129129
[submodule "frozen/Adafruit_CircuitPython_LSM6DS"]
130130
path = frozen/Adafruit_CircuitPython_LSM6DS
131131
url = https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS
@@ -153,7 +153,7 @@
153153
[submodule "ports/espressif/esp-idf"]
154154
path = ports/espressif/esp-idf
155155
url = https://github.com/espressif/esp-idf.git
156-
branch = release/v4.3
156+
branch = master
157157
[submodule "ports/espressif/certificates/nina-fw"]
158158
path = ports/espressif/certificates/nina-fw
159159
url = https://github.com/adafruit/nina-fw.git

lib/protomatter

ports/espressif/Makefile

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ INC += -isystem esp-idf/components/esp32s2/include
8686
INC += -isystem esp-idf/components/esp_common/include
8787
INC += -isystem esp-idf/components/esp_event/include
8888
INC += -isystem esp-idf/components/esp_hw_support/include
89+
INC += -isystem esp-idf/components/esp_hw_support/include/soc
8990
INC += -isystem esp-idf/components/esp_netif/include
9091
INC += -isystem esp-idf/components/esp_pm/include
9192
INC += -isystem esp-idf/components/esp_ringbuf/include
@@ -97,6 +98,7 @@ INC += -isystem esp-idf/components/freertos/include
9798
INC += -isystem esp-idf/components/freertos/include/freertos
9899
INC += -isystem esp-idf/components/freertos/port/xtensa/include
99100
INC += -isystem esp-idf/components/hal/include
101+
INC += -isystem esp-idf/components/hal/platform_port/include
100102
INC += -isystem esp-idf/components/hal/esp32s2/include
101103
INC += -isystem esp-idf/components/heap/include
102104
INC += -isystem esp-idf/components/log/include/
@@ -143,17 +145,22 @@ LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTo
143145

144146
LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp32s2 \
145147
-L$(BUILD)/esp-idf/esp-idf/esp32s2/ld \
148+
-L$(BUILD)/esp-idf/esp-idf/esp_system/ld \
146149
-Lesp-idf/components/esp32s2/ld \
147150
-Lesp-idf/components/esp_rom/esp32s2/ld \
148-
-Tesp32s2_out.ld \
149-
-Tesp32s2.project.ld \
150-
-Tesp32s2.peripherals.ld \
151-
-Tesp32s2.rom.ld \
152-
-Tesp32s2.rom.api.ld \
153-
-Tesp32s2.rom.libgcc.ld \
154-
-Tesp32s2.rom.newlib-data.ld \
155-
-Tesp32s2.rom.newlib-funcs.ld \
156-
-Tesp32s2.rom.spiflash.ld
151+
-Lesp-idf/components/soc/esp32s2/ld \
152+
-Lesp-idf/components/esp_wifi/lib/esp32s2 \
153+
-T memory.ld \
154+
-T sections.ld \
155+
-T esp32s2.rom.ld \
156+
-T esp32s2.rom.api.ld \
157+
-T esp32s2.rom.libgcc.ld \
158+
-T esp32s2.rom.newlib-funcs.ld \
159+
-T esp32s2.rom.newlib-data.ld \
160+
-T esp32s2.rom.spiflash.ld \
161+
-T esp32s2.peripherals.ld
162+
163+
# -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl
157164

158165
LDFLAGS += -Wl,-Bstatic \
159166
-Wl,--no-warn-mismatch \
@@ -276,16 +283,16 @@ menuconfig: $(BUILD)/esp-idf/config
276283
# qstr builds include headers so we need to make sure they are up to date
277284
$(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h
278285

279-
ESP_IDF_COMPONENTS_LINK = app_update bootloader_support driver efuse esp32s2 esp_adc_cal esp_common esp_event esp_hw_support esp_netif esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant xtensa
286+
ESP_IDF_COMPONENTS_LINK = app_update bootloader_support driver efuse esp_adc_cal esp_common esp_phy esp_event esp_hw_support esp_netif esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant xtensa
280287

281288
ESP_IDF_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a)
282289
ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a)
283290

284291
MBEDTLS_COMPONENTS_LINK = crypto tls x509
285292
MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a)
286293

287-
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libxt_hal.a
288-
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a librtc.a libsmartconfig.a libphy.a
294+
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libxt_hal.a esp-idf/components/esp_phy/lib/esp32s2/libphy.a
295+
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a
289296
BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/esp32s2/, $(BINARY_WIFI_BLOBS))
290297

291298
ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/esp32s2/libxt_hal.a
@@ -305,8 +312,7 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
305312
esp-idf/bootloader_support/libbootloader_support.a \
306313
esp-idf/driver/libdriver.a \
307314
esp-idf/efuse/libefuse.a \
308-
esp-idf/esp32s2/libesp32s2.a \
309-
esp-idf/esp32s2/ld/esp32s2.project.ld \
315+
esp-idf/esp_system/__ldgen_output_sections.ld \
310316
esp-idf/esp_adc_cal/libesp_adc_cal.a \
311317
esp-idf/esp_common/libesp_common.a \
312318
esp-idf/esp_event/libesp_event.a \

ports/espressif/common-hal/alarm/pin/PinAlarm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
#include "shared-bindings/microcontroller/__init__.h"
3434

3535
#include "components/driver/include/driver/rtc_io.h"
36-
#include "components/esp_system/include/esp_sleep.h"
36+
#include "components/esp_hw_support/include/esp_sleep.h"
3737
#include "components/hal/esp32s2/include/hal/gpio_ll.h"
38-
#include "components/xtensa/include/esp_debug_helpers.h"
38+
#include "components/esp_system/include/esp_debug_helpers.h"
3939
#include "components/freertos/include/freertos/FreeRTOS.h"
4040

4141
void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, const mcu_pin_obj_t *pin, bool value, bool edge, bool pull) {

ports/espressif/common-hal/frequencyio/FrequencyIn.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
#include "py/runtime.h"
3030

31+
#include "esp-idf/components/soc/esp32s2/include/soc/pcnt_struct.h"
32+
#include "esp-idf/components/soc/esp32s2/include/soc/timer_group_struct.h"
33+
3134
static void IRAM_ATTR pcnt_overflow_handler(void *self_in) {
3235
frequencyio_frequencyin_obj_t *self = self_in;
3336
// reset counter
@@ -56,11 +59,11 @@ static void IRAM_ATTR timer_interrupt_handler(void *self_in) {
5659
// reset interrupt
5760
timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0);
5861
if (self->timer.idx) {
59-
device->int_clr.t1 = 1;
62+
device->int_clr_timers.t1_int_clr = 1;
6063
} else {
61-
device->int_clr.t0 = 1;
64+
device->int_clr_timers.t0_int_clr = 1;
6265
}
63-
device->hw_timer[self->timer.idx].config.alarm_en = 1;
66+
device->hw_timer[self->timer.idx].config.tx_alarm_en = 1;
6467
}
6568

6669
static void init_pcnt(frequencyio_frequencyin_obj_t *self) {

ports/espressif/esp-idf

Submodule esp-idf updated 4302 files

ports/espressif/mphalport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "py/mpstate.h"
3232
#include "py/gc.h"
3333

34-
#include "components/xtensa/include/esp_debug_helpers.h"
34+
#include "components/esp_system/include/esp_debug_helpers.h"
3535
#include "components/esp_rom/include/esp32s2/rom/ets_sys.h"
3636

3737
void mp_hal_delay_us(mp_uint_t delay) {

ports/espressif/supervisor/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#include "peripherals/touch.h"
6060
#include "components/esp_rom/include/esp32s2/rom/ets_sys.h"
6161
#include "components/heap/include/esp_heap_caps.h"
62-
#include "components/xtensa/include/esp_debug_helpers.h"
62+
#include "components/esp_system/include/esp_debug_helpers.h"
6363
#include "components/soc/esp32s2/include/soc/cache_memory.h"
6464
#include "components/soc/esp32s2/include/soc/rtc_cntl_reg.h"
6565

ports/espressif/supervisor/usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "components/driver/include/driver/periph_ctrl.h"
3737
#include "components/esp_rom/include/esp32s2/rom/gpio.h"
3838
#include "components/hal/esp32s2/include/hal/gpio_ll.h"
39-
#include "components/soc/esp32s2/include/soc/usb_periph.h"
39+
#include "components/soc/include/soc/usb_periph.h"
4040

4141
#include "freertos/FreeRTOS.h"
4242
#include "freertos/task.h"

0 commit comments

Comments
 (0)
0