Swap to IDF release/4.2 branch for stability
This commit is contained in:
parent
1ad49d9a18
commit
0dcc659d53
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -152,7 +152,7 @@
|
|||||||
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
|
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
|
||||||
[submodule "ports/esp32s2/esp-idf"]
|
[submodule "ports/esp32s2/esp-idf"]
|
||||||
path = ports/esp32s2/esp-idf
|
path = ports/esp32s2/esp-idf
|
||||||
url = https://github.com/jepler/esp-idf.git
|
url = https://github.com/adafruit/esp-idf.git
|
||||||
[submodule "ports/esp32s2/certificates/nina-fw"]
|
[submodule "ports/esp32s2/certificates/nina-fw"]
|
||||||
path = ports/esp32s2/certificates/nina-fw
|
path = ports/esp32s2/certificates/nina-fw
|
||||||
url = https://github.com/adafruit/nina-fw.git
|
url = https://github.com/adafruit/nina-fw.git
|
||||||
|
@ -143,7 +143,6 @@ LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp32s2 \
|
|||||||
-Tesp32s2.peripherals.ld \
|
-Tesp32s2.peripherals.ld \
|
||||||
-Lesp-idf/components/esp_rom/esp32s2/ld \
|
-Lesp-idf/components/esp_rom/esp32s2/ld \
|
||||||
-Tesp32s2.rom.ld \
|
-Tesp32s2.rom.ld \
|
||||||
-Tesp32s2.rom.api.ld \
|
|
||||||
-Tesp32s2.rom.libgcc.ld \
|
-Tesp32s2.rom.libgcc.ld \
|
||||||
-Tesp32s2.rom.newlib-data.ld \
|
-Tesp32s2.rom.newlib-data.ld \
|
||||||
-Tesp32s2.rom.newlib-funcs.ld \
|
-Tesp32s2.rom.newlib-funcs.ld \
|
||||||
@ -276,7 +275,7 @@ menuconfig: $(BUILD)/esp-idf/config
|
|||||||
# qstr builds include headers so we need to make sure they are up to date
|
# qstr builds include headers so we need to make sure they are up to date
|
||||||
$(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h
|
$(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
ESP_IDF_COMPONENTS_INCLUDE = driver freertos log soc
|
ESP_IDF_COMPONENTS_INCLUDE = driver freertos log soc
|
||||||
|
|
||||||
@ -288,11 +287,11 @@ ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENT
|
|||||||
MBEDTLS_COMPONENTS_LINK = crypto tls x509
|
MBEDTLS_COMPONENTS_LINK = crypto tls x509
|
||||||
MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a)
|
MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a)
|
||||||
|
|
||||||
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libxt_hal.a
|
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libhal.a
|
||||||
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a librtc.a libsmartconfig.a libphy.a
|
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a librtc.a libsmartconfig.a libphy.a
|
||||||
BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/esp32s2/, $(BINARY_WIFI_BLOBS))
|
BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/esp32s2/, $(BINARY_WIFI_BLOBS))
|
||||||
|
|
||||||
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a esp-idf/components/xtensa/esp32s2/libxt_hal.a
|
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a
|
||||||
ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/esp32s2/esp32s2_out.ld $(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld
|
ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/esp32s2/esp32s2_out.ld $(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld
|
||||||
|
|
||||||
FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE)
|
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
|
|||||||
esp-idf/esp32s2/ld/esp32s2.project.ld \
|
esp-idf/esp32s2/ld/esp32s2.project.ld \
|
||||||
esp-idf/esp_event/libesp_event.a \
|
esp-idf/esp_event/libesp_event.a \
|
||||||
esp-idf/esp_netif/libesp_netif.a \
|
esp-idf/esp_netif/libesp_netif.a \
|
||||||
esp-idf/esp_rom/libesp_rom.a \
|
|
||||||
esp-idf/esp_system/libesp_system.a \
|
esp-idf/esp_system/libesp_system.a \
|
||||||
esp-idf/esp_wifi/libesp_wifi.a \
|
esp-idf/esp_wifi/libesp_wifi.a \
|
||||||
esp-idf/lwip/liblwip.a \
|
esp-idf/lwip/liblwip.a \
|
||||||
|
@ -33,9 +33,9 @@
|
|||||||
#include "supervisor/esp_port.h"
|
#include "supervisor/esp_port.h"
|
||||||
|
|
||||||
#include "components/driver/include/driver/rtc_io.h"
|
#include "components/driver/include/driver/rtc_io.h"
|
||||||
#include "components/esp_system/include/esp_sleep.h"
|
#include "components/esp32s2/include/esp_sleep.h"
|
||||||
#include "components/freertos/include/freertos/FreeRTOS.h"
|
#include "components/freertos/include/freertos/FreeRTOS.h"
|
||||||
#include "components/hal/esp32s2/include/hal/gpio_ll.h"
|
#include "components/soc/src/esp32s2/include/hal/gpio_ll.h"
|
||||||
#include "components/xtensa/include/esp_debug_helpers.h"
|
#include "components/xtensa/include/esp_debug_helpers.h"
|
||||||
|
|
||||||
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) {
|
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) {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "common-hal/microcontroller/Pin.h"
|
#include "common-hal/microcontroller/Pin.h"
|
||||||
|
|
||||||
#include "components/hal/include/hal/adc_types.h"
|
#include "components/soc/include/hal/adc_types.h"
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "common-hal/microcontroller/Pin.h"
|
#include "common-hal/microcontroller/Pin.h"
|
||||||
|
|
||||||
#include "components/hal/include/hal/i2c_types.h"
|
#include "components/soc/include/hal/i2c_types.h"
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
@ -273,7 +273,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self,
|
|||||||
self->bits = bits;
|
self->bits = bits;
|
||||||
self->target_frequency = baudrate;
|
self->target_frequency = baudrate;
|
||||||
self->hal_context.timing_conf = &self->timing_conf;
|
self->hal_context.timing_conf = &self->timing_conf;
|
||||||
esp_err_t result = spi_hal_cal_clock_conf(&self->hal_context,
|
esp_err_t result = spi_hal_get_clock_conf(&self->hal_context,
|
||||||
self->target_frequency,
|
self->target_frequency,
|
||||||
128 /* duty_cycle */,
|
128 /* duty_cycle */,
|
||||||
self->connected_through_gpio,
|
self->connected_through_gpio,
|
||||||
@ -366,7 +366,8 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou
|
|||||||
burst_length = sizeof(hal->hw->data_buf);
|
burst_length = sizeof(hal->hw->data_buf);
|
||||||
// When switching to non-DMA, we need to make sure DMA is off. Otherwise,
|
// When switching to non-DMA, we need to make sure DMA is off. Otherwise,
|
||||||
// the S2 will transmit zeroes instead of our data.
|
// the S2 will transmit zeroes instead of our data.
|
||||||
spi_ll_txdma_disable(hal->hw);
|
hal->hw->dma_out_link.dma_tx_ena = 0;
|
||||||
|
hal->hw->dma_out_link.stop = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This rounds up.
|
// This rounds up.
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
#include "common-hal/microcontroller/Pin.h"
|
#include "common-hal/microcontroller/Pin.h"
|
||||||
|
|
||||||
#include "components/driver/include/driver/spi_common_internal.h"
|
#include "components/driver/include/driver/spi_common_internal.h"
|
||||||
#include "components/hal/include/hal/spi_hal.h"
|
#include "components/soc/include/hal/spi_hal.h"
|
||||||
#include "components/hal/include/hal/spi_types.h"
|
#include "components/soc/include/hal/spi_types.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "common-hal/microcontroller/Pin.h"
|
#include "common-hal/microcontroller/Pin.h"
|
||||||
|
|
||||||
#include "components/hal/include/hal/uart_types.h"
|
#include "components/soc/include/hal/uart_types.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "components/driver/include/driver/gpio.h"
|
#include "components/driver/include/driver/gpio.h"
|
||||||
|
|
||||||
#include "components/hal/include/hal/gpio_hal.h"
|
#include "components/soc/include/hal/gpio_hal.h"
|
||||||
|
|
||||||
void common_hal_digitalio_digitalinout_never_reset(
|
void common_hal_digitalio_digitalinout_never_reset(
|
||||||
digitalio_digitalinout_obj_t *self) {
|
digitalio_digitalinout_obj_t *self) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
|
|
||||||
#include "components/driver/include/driver/gpio.h"
|
#include "components/driver/include/driver/gpio.h"
|
||||||
#include "components/hal/include/hal/gpio_hal.h"
|
#include "components/soc/include/hal/gpio_hal.h"
|
||||||
|
|
||||||
#ifdef MICROPY_HW_NEOPIXEL
|
#ifdef MICROPY_HW_NEOPIXEL
|
||||||
bool neopixel_in_use;
|
bool neopixel_in_use;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit d06744f5efc382c61cbad8758107cec308feef09
|
Subproject commit ebe7784258d8c10e9cc334ccc00c3fd270746c8b
|
@ -35,9 +35,9 @@
|
|||||||
#include "esp32s2_peripherals_config.h"
|
#include "esp32s2_peripherals_config.h"
|
||||||
#include "esp-idf/config/sdkconfig.h"
|
#include "esp-idf/config/sdkconfig.h"
|
||||||
|
|
||||||
#include "components/hal/include/hal/gpio_types.h"
|
#include "components/soc/include/hal/gpio_types.h"
|
||||||
#include "components/hal/include/hal/adc_types.h"
|
#include "components/soc/include/hal/adc_types.h"
|
||||||
#include "components/hal/include/hal/touch_sensor_types.h"
|
#include "components/soc/include/hal/touch_sensor_types.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PIN_PREFIX_FIELDS
|
PIN_PREFIX_FIELDS
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#include "peripherals/rmt.h"
|
#include "peripherals/rmt.h"
|
||||||
#include "peripherals/pcnt.h"
|
#include "peripherals/pcnt.h"
|
||||||
#include "peripherals/timer.h"
|
#include "peripherals/timer.h"
|
||||||
#include "components/esp_rom/include/esp_rom_uart.h"
|
#include "components/esp_rom/include/esp32s2/rom/ets_sys.h"
|
||||||
#include "components/heap/include/esp_heap_caps.h"
|
#include "components/heap/include/esp_heap_caps.h"
|
||||||
#include "components/xtensa/include/esp_debug_helpers.h"
|
#include "components/xtensa/include/esp_debug_helpers.h"
|
||||||
#include "components/soc/soc/esp32s2/include/soc/cache_memory.h"
|
#include "components/soc/soc/esp32s2/include/soc/cache_memory.h"
|
||||||
@ -93,7 +93,9 @@ safe_mode_t port_init(void) {
|
|||||||
esp_timer_create(&args, &_sleep_timer);
|
esp_timer_create(&args, &_sleep_timer);
|
||||||
|
|
||||||
// Send the ROM output out of the UART. This includes early logs.
|
// Send the ROM output out of the UART. This includes early logs.
|
||||||
esp_rom_install_channel_putc(1, esp_rom_uart_putc);
|
#ifdef DEBUG
|
||||||
|
ets_install_uart_printf();
|
||||||
|
#endif
|
||||||
|
|
||||||
heap = NULL;
|
heap = NULL;
|
||||||
never_reset_module_internal_pins();
|
never_reset_module_internal_pins();
|
||||||
|
@ -34,8 +34,7 @@
|
|||||||
#include "components/driver/include/driver/periph_ctrl.h"
|
#include "components/driver/include/driver/periph_ctrl.h"
|
||||||
#include "components/driver/include/driver/gpio.h"
|
#include "components/driver/include/driver/gpio.h"
|
||||||
#include "components/esp_rom/include/esp32s2/rom/gpio.h"
|
#include "components/esp_rom/include/esp32s2/rom/gpio.h"
|
||||||
#include "components/esp_rom/include/esp_rom_gpio.h"
|
#include "components/soc/src/esp32s2/include/hal/gpio_ll.h"
|
||||||
#include "components/hal/esp32s2/include/hal/gpio_ll.h"
|
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
@ -77,23 +76,20 @@ static void configure_pins (usb_hal_context_t *usb)
|
|||||||
* Introduce additional parameters in usb_hal_context_t when adding support
|
* Introduce additional parameters in usb_hal_context_t when adding support
|
||||||
* for USB Host.
|
* for USB Host.
|
||||||
*/
|
*/
|
||||||
for ( const usb_iopin_dsc_t *iopin = usb_periph_iopins; iopin->pin != -1; ++iopin ) {
|
for (const usb_iopin_dsc_t* iopin = usb_periph_iopins; iopin->pin != -1; ++iopin) {
|
||||||
if ( (usb->use_external_phy) || (iopin->ext_phy_only == 0) ) {
|
if ((usb->use_external_phy) || (iopin->ext_phy_only == 0)) {
|
||||||
esp_rom_gpio_pad_select_gpio(iopin->pin);
|
gpio_pad_select_gpio(iopin->pin);
|
||||||
if ( iopin->is_output ) {
|
if (iopin->is_output) {
|
||||||
esp_rom_gpio_connect_out_signal(iopin->pin, iopin->func, false, false);
|
gpio_matrix_out(iopin->pin, iopin->func, false, false);
|
||||||
|
} else {
|
||||||
|
gpio_matrix_in(iopin->pin, iopin->func, false);
|
||||||
|
gpio_pad_input_enable(iopin->pin);
|
||||||
}
|
}
|
||||||
else {
|
gpio_pad_unhold(iopin->pin);
|
||||||
esp_rom_gpio_connect_in_signal(iopin->pin, iopin->func, false);
|
|
||||||
if ( (iopin->pin != GPIO_FUNC_IN_LOW) && (iopin->pin != GPIO_FUNC_IN_HIGH) ) {
|
|
||||||
gpio_ll_input_enable(&GPIO, iopin->pin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
esp_rom_gpio_pad_unhold(iopin->pin);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !usb->use_external_phy ) {
|
if (!usb->use_external_phy) {
|
||||||
gpio_set_drive_capability(USBPHY_DM_NUM, GPIO_DRIVE_CAP_3);
|
gpio_set_drive_capability(USBPHY_DP_NUM, GPIO_DRIVE_CAP_3);
|
||||||
gpio_set_drive_capability(USBPHY_DP_NUM, GPIO_DRIVE_CAP_3);
|
gpio_set_drive_capability(USBPHY_DP_NUM, GPIO_DRIVE_CAP_3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user