Skip to content

Commit 707264b

Browse files
committed
WiFiC3: replace old build script
1 parent 96457bc commit 707264b

13 files changed

+45
-2309
lines changed

libraries/WiFi/extra/0001-ArduinoBLE-Support-C33.patch

-57
This file was deleted.

libraries/WiFi/extra/0001-Defaults-for-C33-BLE.patch

+1-37
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,9 @@ Date: Tue, 4 Apr 2023 18:57:39 +0200
44
Subject: [PATCH] Defaults for C33 BLE
55

66
---
7-
.../esp/esp_driver/network_adapter/main/slave_bt.c | 4 ++--
87
.../esp/esp_driver/network_adapter/main/slave_bt.h | 8 ++++----
9-
.../esp/esp_driver/network_adapter/sdkconfig.defaults | 8 +++-----
10-
3 files changed, 9 insertions(+), 11 deletions(-)
8+
1 file changed, 4 insertions(+), 4 deletions(-)
119

12-
diff --git a/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.c b/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.c
13-
index b2e8a73..3a7eae6 100644
14-
--- a/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.c
15-
+++ b/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.c
16-
@@ -321,8 +321,8 @@ static void init_uart_c3_s3(void)
17-
};
18-
ESP_ERROR_CHECK(gdma_new_channel(&rx_channel_config, &s_rx_channel));
19-
20-
- gdma_connect(s_tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UART, 0));
21-
- gdma_connect(s_rx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UART, 0));
22-
+ gdma_connect(s_tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UHCI, 0));
23-
+ gdma_connect(s_rx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UHCI, 0));
24-
25-
gdma_strategy_config_t strategy_config = {
26-
.auto_update_desc = false,
2710
diff --git a/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.h b/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.h
2811
index 87e29f7..30acaf1 100644
2912
--- a/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.h
@@ -43,25 +26,6 @@ index 87e29f7..30acaf1 100644
4326

4427
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
4528

46-
diff --git a/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults b/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults
47-
index bc3ec56..351dc63 100644
48-
--- a/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults
49-
+++ b/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults
50-
@@ -7,11 +7,9 @@ CONFIG_SDIO_DAT2_DISABLED=
51-
CONFIG_BT_ENABLED=y
52-
CONFIG_BT_CONTROLLER_ONLY=y
53-
CONFIG_BT_BLUEDROID_ENABLED=
54-
-CONFIG_BTDM_CTRL_MODE_BTDM=y
55-
+CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
56-
+CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
57-
+CONFIG_BTDM_CTRL_MODE_BTDM=n
58-
CONFIG_BTDM_CTRL_HCI_MODE_VHCI=y
59-
60-
CONFIG_ESP32_WIFI_NVS_ENABLED=
61-
-
62-
-# OTA
63-
-CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
64-
-CONFIG_PARTITION_TABLE_TWO_OTA=y
6529
--
6630
2.40.0
6731

libraries/WiFi/extra/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Build scripr for esp-hosted (Portenta C33)
2+
3+
```
4+
git clone [email protected]:espressif/esp-hosted.git --recursive
5+
cd esp-hosted/
6+
patch -p1 < ../0001-Defaults-for-C33-BLE.patch
7+
cd esp_hosted_fg/esp/esp_driver/
8+
./esp-idf/install.sh esp32s3
9+
. esp-idf/export.sh
10+
cd network_adapter/
11+
idf.py set-target esp32c3
12+
cp ../../../../../sdkconfig.default.c33 sdkconfig
13+
idf.py build
14+
cd ../../../../../
15+
python combine.py
16+
```

libraries/WiFi/extra/README.txt

-1
This file was deleted.

libraries/WiFi/extra/bootloader.bin

-19.8 KB
Binary file not shown.

libraries/WiFi/extra/combine.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
import sys;
44

5-
booloaderData = open("bootloader.bin", "rb").read()
6-
partitionData = open("partition-table.bin", "rb").read()
7-
networkData = open("network_adapter.bin", "rb").read()
5+
basePath = "esp-hosted/esp_hosted_fg/esp/esp_driver/network_adapter/"
6+
7+
booloaderData = open(basePath + "build/bootloader/bootloader.bin", "rb").read()
8+
partitionData = open(basePath + "build/partition_table/partition-table.bin", "rb").read()
9+
otaData = open(basePath + "build/ota_data_initial.bin", "rb").read()
10+
networkData = open(basePath + "build/network_adapter.bin", "rb").read()
811

912
# 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 network_adapter.bin
1013

@@ -24,6 +27,9 @@
2427
for i in range(0, len(partitionData)):
2528
outputData[0x8000 + i] = partitionData[i]
2629

30+
for i in range(0, len(otaData)):
31+
outputData[0xd000 + i] = otaData[i]
32+
2733
for i in range(0, len(networkData)):
2834
outputData[0x10000 + i] = networkData[i]
2935

libraries/WiFi/extra/esptool

Submodule esptool deleted from 2c69163

libraries/WiFi/extra/flasher.sh

-25
This file was deleted.
-833 KB
Binary file not shown.

libraries/WiFi/extra/ota_data_initial.bin

-1
This file was deleted.
-3 KB
Binary file not shown.
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y
2+
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160
3+
CONFIG_FREERTOS_UNICORE=y
4+
CONFIG_SDIO_DAT2_DISABLED=
5+
6+
CONFIG_ESP_SPI_GPIO_HANDSHAKE=5
7+
CONFIG_ESP_SPI_GPIO_DATA_READY=9
8+
CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
9+
10+
# BT Configuration
11+
CONFIG_BT_ENABLED=y
12+
CONFIG_BT_CONTROLLER_ONLY=y
13+
CONFIG_BT_BLUEDROID_ENABLED=
14+
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
15+
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
16+
CONFIG_BTDM_CTRL_MODE_BTDM=n
17+
CONFIG_BTDM_CTRL_HCI_MODE_VHCI=y
18+
19+
CONFIG_ESP32_WIFI_NVS_ENABLED=

0 commit comments

Comments
 (0)