Skip to content

Commit 0dcc659

Browse files
committed
Swap to IDF release/4.2 branch for stability
1 parent 1ad49d9 commit 0dcc659

File tree

14 files changed

+36
-39
lines changed

14 files changed

+36
-39
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
153153
[submodule "ports/esp32s2/esp-idf"]
154154
path = ports/esp32s2/esp-idf
155-
url = https://github.com/jepler/esp-idf.git
155+
url = https://github.com/adafruit/esp-idf.git
156156
[submodule "ports/esp32s2/certificates/nina-fw"]
157157
path = ports/esp32s2/certificates/nina-fw
158158
url = https://github.com/adafruit/nina-fw.git

ports/esp32s2/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp32s2 \
143143
-Tesp32s2.peripherals.ld \
144144
-Lesp-idf/components/esp_rom/esp32s2/ld \
145145
-Tesp32s2.rom.ld \
146-
-Tesp32s2.rom.api.ld \
147146
-Tesp32s2.rom.libgcc.ld \
148147
-Tesp32s2.rom.newlib-data.ld \
149148
-Tesp32s2.rom.newlib-funcs.ld \
@@ -276,7 +275,7 @@ menuconfig: $(BUILD)/esp-idf/config
276275
# qstr builds include headers so we need to make sure they are up to date
277276
$(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h
278277

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

281280
ESP_IDF_COMPONENTS_INCLUDE = driver freertos log soc
282281

@@ -288,11 +287,11 @@ ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENT
288287
MBEDTLS_COMPONENTS_LINK = crypto tls x509
289288
MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a)
290289

291-
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libxt_hal.a
290+
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libhal.a
292291
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a librtc.a libsmartconfig.a libphy.a
293292
BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/esp32s2/, $(BINARY_WIFI_BLOBS))
294293

295-
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a esp-idf/components/xtensa/esp32s2/libxt_hal.a
294+
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a
296295
ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/esp32s2/esp32s2_out.ld $(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld
297296

298297
FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE)
@@ -308,7 +307,6 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
308307
esp-idf/esp32s2/ld/esp32s2.project.ld \
309308
esp-idf/esp_event/libesp_event.a \
310309
esp-idf/esp_netif/libesp_netif.a \
311-
esp-idf/esp_rom/libesp_rom.a \
312310
esp-idf/esp_system/libesp_system.a \
313311
esp-idf/esp_wifi/libesp_wifi.a \
314312
esp-idf/lwip/liblwip.a \

ports/esp32s2/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 "supervisor/esp_port.h"
3434

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

4141
void common_hal_alarm_pin_pin_alarm_construct(alarm_pin_pin_alarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull) {

ports/esp32s2/common-hal/analogio/AnalogIn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include "common-hal/microcontroller/Pin.h"
3131

32-
#include "components/hal/include/hal/adc_types.h"
32+
#include "components/soc/include/hal/adc_types.h"
3333
#include "FreeRTOS.h"
3434
#include "freertos/semphr.h"
3535
#include "py/obj.h"

ports/esp32s2/common-hal/busio/I2C.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include "common-hal/microcontroller/Pin.h"
3131

32-
#include "components/hal/include/hal/i2c_types.h"
32+
#include "components/soc/include/hal/i2c_types.h"
3333
#include "FreeRTOS.h"
3434
#include "freertos/semphr.h"
3535
#include "py/obj.h"

ports/esp32s2/common-hal/busio/SPI.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self,
273273
self->bits = bits;
274274
self->target_frequency = baudrate;
275275
self->hal_context.timing_conf = &self->timing_conf;
276-
esp_err_t result = spi_hal_cal_clock_conf(&self->hal_context,
276+
esp_err_t result = spi_hal_get_clock_conf(&self->hal_context,
277277
self->target_frequency,
278278
128 /* duty_cycle */,
279279
self->connected_through_gpio,
@@ -366,7 +366,8 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou
366366
burst_length = sizeof(hal->hw->data_buf);
367367
// When switching to non-DMA, we need to make sure DMA is off. Otherwise,
368368
// the S2 will transmit zeroes instead of our data.
369-
spi_ll_txdma_disable(hal->hw);
369+
hal->hw->dma_out_link.dma_tx_ena = 0;
370+
hal->hw->dma_out_link.stop = 1;
370371
}
371372

372373
// This rounds up.

ports/esp32s2/common-hal/busio/SPI.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#include "common-hal/microcontroller/Pin.h"
3131

3232
#include "components/driver/include/driver/spi_common_internal.h"
33-
#include "components/hal/include/hal/spi_hal.h"
34-
#include "components/hal/include/hal/spi_types.h"
33+
#include "components/soc/include/hal/spi_hal.h"
34+
#include "components/soc/include/hal/spi_types.h"
3535
#include "py/obj.h"
3636

3737
typedef struct {

ports/esp32s2/common-hal/busio/UART.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include "common-hal/microcontroller/Pin.h"
3131

32-
#include "components/hal/include/hal/uart_types.h"
32+
#include "components/soc/include/hal/uart_types.h"
3333
#include "py/obj.h"
3434

3535
typedef struct {

ports/esp32s2/common-hal/digitalio/DigitalInOut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include "components/driver/include/driver/gpio.h"
3232

33-
#include "components/hal/include/hal/gpio_hal.h"
33+
#include "components/soc/include/hal/gpio_hal.h"
3434

3535
void common_hal_digitalio_digitalinout_never_reset(
3636
digitalio_digitalinout_obj_t *self) {

ports/esp32s2/common-hal/microcontroller/Pin.c

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

3434
#include "components/driver/include/driver/gpio.h"
35-
#include "components/hal/include/hal/gpio_hal.h"
35+
#include "components/soc/include/hal/gpio_hal.h"
3636

3737
#ifdef MICROPY_HW_NEOPIXEL
3838
bool neopixel_in_use;

0 commit comments

Comments
 (0)