Skip to content

Commit 66b8559

Browse files
committed
Change submodule, rework all includes
1 parent d6da406 commit 66b8559

File tree

39 files changed

+89
-82
lines changed

39 files changed

+89
-82
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@
144144
[submodule "frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center"]
145145
path = frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center
146146
url = https://github.com/adafruit/Adafruit_CircuitPython_BLE_Apple_Notification_Center
147-
[submodule "ports/esp32s2/esp-idf"]
148-
path = ports/esp32s2/esp-idf
149-
url = https://github.com/tannewt/esp-idf.git
150147
[submodule "frozen/Adafruit_CircuitPython_RFM9x"]
151148
path = frozen/Adafruit_CircuitPython_RFM9x
152149
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM9x.git
153150
[submodule "frozen/Adafruit_CircuitPython_RFM69"]
154151
path = frozen/Adafruit_CircuitPython_RFM69
155152
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
153+
[submodule "ports/esp32s2/esp-idf"]
154+
path = ports/esp32s2/esp-idf
155+
url = https://github.com/espressif/esp-idf.git

ports/esp32s2/Makefile

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -73,30 +73,37 @@ INC += -I./peripherals
7373
INC += -I../../lib/mp-readline
7474
INC += -I../../lib/tinyusb/src
7575
INC += -I../../supervisor/shared/usb
76-
INC += -Iesp-idf/components/freertos/include/freertos
77-
INC += -Iesp-idf/components/freertos/xtensa/include
78-
INC += -Iesp-idf/components/esp32s2/include
79-
INC += -Iesp-idf/components/xtensa/esp32s2/include
80-
INC += -Iesp-idf/components/esp_common/include
81-
INC += -Iesp-idf/components/esp_event/include
82-
INC += -Iesp-idf/components/esp_netif/include
83-
INC += -Iesp-idf/components/esp_ringbuf/include
84-
INC += -Iesp-idf/components/esp_rom/include
85-
INC += -Iesp-idf/components/esp_wifi/include
86-
INC += -Iesp-idf/components/xtensa/include
87-
INC += -Iesp-idf/components/esp_timer/include
88-
INC += -Iesp-idf/components/mbedtls/mbedtls/include
89-
INC += -Iesp-idf/components/mbedtls/port/include/
90-
INC += -Iesp-idf/components/newlib/platform_include
91-
INC += -Iesp-idf/components/lwip/lwip/src/include
92-
INC += -Iesp-idf/components/lwip/port/esp32/include
93-
INC += -Iesp-idf/components/lwip/include/apps/sntp
94-
INC += -Iesp-idf/components/soc/include
95-
INC += -Iesp-idf/components/soc/src/esp32s2/include
96-
INC += -Iesp-idf/components/soc/soc/include
97-
INC += -Iesp-idf/components/soc/soc/esp32s2/include
98-
INC += -Iesp-idf/components/heap/include
99-
INC += -Iesp-idf/components/esp_system/include
76+
77+
INC += -isystem esp-idf
78+
INC += -isystem esp-idf/components/driver/include
79+
INC += -isystem esp-idf/components/hal/esp32s2/include
80+
INC += -isystem esp-idf/components/hal/include
81+
82+
INC += -isystem esp-idf/components/freertos/include/freertos
83+
INC += -isystem esp-idf/components/freertos/xtensa/include
84+
INC += -isystem esp-idf/components/esp32s2/include
85+
INC += -isystem esp-idf/components/xtensa/esp32s2/include
86+
INC += -isystem esp-idf/components/esp_common/include
87+
INC += -isystem esp-idf/components/esp_event/include
88+
INC += -isystem esp-idf/components/esp_netif/include
89+
INC += -isystem esp-idf/components/esp_ringbuf/include
90+
INC += -isystem esp-idf/components/esp_rom/include
91+
INC += -isystem esp-idf/components/esp_wifi/include
92+
INC += -isystem esp-idf/components/xtensa/include
93+
INC += -isystem esp-idf/components/esp_timer/include
94+
INC += -isystem esp-idf/components/mbedtls/mbedtls/include
95+
INC += -isystem esp-idf/components/mbedtls/port/include/
96+
INC += -isystem esp-idf/components/newlib/platform_include
97+
INC += -isystem esp-idf/components/lwip/lwip/src/include
98+
INC += -isystem esp-idf/components/lwip/port/esp32/include
99+
INC += -isystem esp-idf/components/lwip/include/apps/sntp
100+
INC += -isystem esp-idf/components/hal/include
101+
INC += -isystem esp-idf/components/soc/include
102+
INC += -isystem esp-idf/components/soc/src/esp32s2/include
103+
INC += -isystem esp-idf/components/soc/soc/include
104+
INC += -isystem esp-idf/components/soc/soc/esp32s2/include
105+
INC += -isystem esp-idf/components/heap/include
106+
INC += -isystem esp-idf/components/esp_system/include
100107
INC += -I$(BUILD)/esp-idf/config
101108

102109
CFLAGS += -DHAVE_CONFIG_H \
@@ -256,7 +263,7 @@ menuconfig: $(BUILD)/esp-idf/config
256263
$(HEADER_BUILD)/qstr.i.last: | $(BUILD)/esp-idf/config/sdkconfig.h
257264

258265
# Order here matters
259-
ESP_IDF_COMPONENTS_LINK = freertos log esp_system 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
266+
ESP_IDF_COMPONENTS_LINK = freertos log hal esp_system 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
260267

261268
ESP_IDF_COMPONENTS_INCLUDE = driver freertos log soc
262269

@@ -268,11 +275,11 @@ ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENT
268275
MBEDTLS_COMPONENTS_LINK = crypto tls x509
269276
MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a)
270277

271-
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libhal.a
278+
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libxt_hal.a
272279
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a librtc.a libsmartconfig.a libphy.a
273280
BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/esp32s2/, $(BINARY_WIFI_BLOBS))
274281

275-
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a esp-idf/components/xtensa/esp32s2/libhal.a
282+
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a esp-idf/components/xtensa/esp32s2/libxt_hal.a
276283
ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/esp32s2/esp32s2_out.ld $(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld
277284

278285
FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE)

ports/esp32s2/bindings/espidf/__init__.c

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

3030
#include "bindings/espidf/__init__.h"
3131

32-
#include "esp-idf/components/heap/include/esp_heap_caps.h"
32+
#include "components/heap/include/esp_heap_caps.h"
3333

3434
//| """Direct access to a few ESP-IDF details. This module *should not* include any functionality
3535
//| that could be implemented by other frameworks. It should only include ESP-IDF specific

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "py/mperrno.h"
2929
#include "py/runtime.h"
3030

31-
#include "driver/i2c.h"
31+
#include "components/driver/include/driver/i2c.h"
3232

3333
#include "shared-bindings/microcontroller/__init__.h"
3434
#include "shared-bindings/microcontroller/Pin.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 "esp-idf/components/soc/include/hal/i2c_types.h"
32+
#include "components/hal/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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self,
266266
self->bits = bits;
267267
self->target_frequency = baudrate;
268268
self->hal_context.timing_conf = &self->timing_conf;
269-
esp_err_t result = spi_hal_get_clock_conf(&self->hal_context,
269+
esp_err_t result = spi_hal_cal_clock_conf(&self->hal_context,
270270
self->target_frequency,
271271
128 /* duty_cycle */,
272272
self->connected_through_gpio,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

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

32-
#include "esp-idf/components/driver/include/driver/spi_common_internal.h"
33-
#include "esp-idf/components/soc/include/hal/spi_hal.h"
34-
#include "esp-idf/components/soc/include/hal/spi_types.h"
32+
#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"
3535
#include "py/obj.h"
3636

3737
typedef struct {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "shared-bindings/microcontroller/__init__.h"
2828
#include "shared-bindings/busio/UART.h"
2929

30-
#include "driver/uart.h"
30+
#include "components/driver/include/driver/uart.h"
3131

3232
#include "mpconfigport.h"
3333
#include "lib/utils/interrupt_char.h"

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 "esp-idf/components/soc/include/hal/uart_types.h"
32+
#include "components/hal/include/hal/uart_types.h"
3333
#include "py/obj.h"
3434

3535
typedef struct {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#include "py/runtime.h"
2929
#include "supervisor/shared/translate.h"
3030

31-
#include "driver/gpio.h"
31+
#include "components/driver/include/driver/gpio.h"
3232

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

3535
void common_hal_digitalio_digitalinout_never_reset(
3636
digitalio_digitalinout_obj_t *self) {

0 commit comments

Comments
 (0)