Skip to content

WiFiC3: replace old build script #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions libraries/WiFi/extra/0001-ArduinoBLE-Support-C33.patch

This file was deleted.

24 changes: 2 additions & 22 deletions libraries/WiFi/extra/0001-Defaults-for-C33-BLE.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ Date: Tue, 4 Apr 2023 18:57:39 +0200
Subject: [PATCH] Defaults for C33 BLE

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

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
index b2e8a73..3a7eae6 100644
Expand All @@ -24,6 +22,7 @@ index b2e8a73..3a7eae6 100644

gdma_strategy_config_t strategy_config = {
.auto_update_desc = false,

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
index 87e29f7..30acaf1 100644
--- a/esp_hosted_fg/esp/esp_driver/network_adapter/main/slave_bt.h
Expand All @@ -43,25 +42,6 @@ index 87e29f7..30acaf1 100644

#elif defined(CONFIG_IDF_TARGET_ESP32S3)

diff --git a/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults b/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults
index bc3ec56..351dc63 100644
--- a/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults
+++ b/esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig.defaults
@@ -7,11 +7,9 @@ CONFIG_SDIO_DAT2_DISABLED=
CONFIG_BT_ENABLED=y
CONFIG_BT_CONTROLLER_ONLY=y
CONFIG_BT_BLUEDROID_ENABLED=
-CONFIG_BTDM_CTRL_MODE_BTDM=y
+CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
+CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
+CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_CTRL_HCI_MODE_VHCI=y

CONFIG_ESP32_WIFI_NVS_ENABLED=
-
-# OTA
-CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
-CONFIG_PARTITION_TABLE_TWO_OTA=y
--
2.40.0

Binary file added libraries/WiFi/extra/ESP32-C3.bin
Binary file not shown.
29 changes: 29 additions & 0 deletions libraries/WiFi/extra/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build script for esp-hosted (Portenta C33)

```
git clone https://github.com/espressif/esp-hosted.git --recursive
cd esp-hosted/
#git checkout release/fg-v0.0.5
git checkout fe0b10584417629908cee8141699c2f35ea05a25
patch -p1 < ../0001-Defaults-for-C33-BLE.patch
cd esp_hosted_fg/esp/esp_driver/
./esp-idf/install.sh esp32s3
. ./esp-idf/export.sh
cd network_adapter/
idf.py set-target esp32c3
cp ../../../../../sdkconfig.default.c33 sdkconfig
idf.py build
cd ../../../../../
python combine.py
```
# How to flash the firmware

```
espflash write-bin 0x0 ESP32-C3.bin
```

or

```
esptool.py --chip esp32c3 -p /dev/ttyACM0 -b 230400 --before=default_reset --after=hard_reset --no-stub write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 ESP32-C3.bin
```
1 change: 0 additions & 1 deletion libraries/WiFi/extra/README.txt

This file was deleted.

Binary file removed libraries/WiFi/extra/bootloader.bin
Binary file not shown.
8 changes: 5 additions & 3 deletions libraries/WiFi/extra/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import sys;

booloaderData = open("bootloader.bin", "rb").read()
partitionData = open("partition-table.bin", "rb").read()
networkData = open("network_adapter.bin", "rb").read()
basePath = "esp-hosted/esp_hosted_fg/esp/esp_driver/network_adapter/"

booloaderData = open(basePath + "build/bootloader/bootloader.bin", "rb").read()
partitionData = open(basePath + "build/partition_table/partition-table.bin", "rb").read()
networkData = open(basePath + "build/network_adapter.bin", "rb").read()

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

Expand Down
1 change: 0 additions & 1 deletion libraries/WiFi/extra/esptool
Submodule esptool deleted from 2c6916
25 changes: 0 additions & 25 deletions libraries/WiFi/extra/flasher.sh

This file was deleted.

Binary file removed libraries/WiFi/extra/network_adapter.bin
Binary file not shown.
1 change: 0 additions & 1 deletion libraries/WiFi/extra/ota_data_initial.bin

This file was deleted.

Binary file removed libraries/WiFi/extra/partition-table.bin
Binary file not shown.
41 changes: 41 additions & 0 deletions libraries/WiFi/extra/sdkconfig.default.c33
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160
CONFIG_FREERTOS_UNICORE=y
CONFIG_SDIO_DAT2_DISABLED=

CONFIG_ESP_SPI_GPIO_HANDSHAKE=5
CONFIG_ESP_SPI_GPIO_DATA_READY=9
CONFIG_SPI_SLAVE_ISR_IN_IRAM=n
CONFIG_SPI_MASTER_ISR_IN_IRAM=n

# BT Configuration
CONFIG_BT_ENABLED=y
CONFIG_BT_CONTROLLER_ONLY=y
CONFIG_BT_BLUEDROID_ENABLED=
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_CTRL_HCI_MODE_VHCI=n
CONFIG_BT_CTRL_HCI_MODE_UART_H4=y
CONFIG_BT_CTRL_HCI_TL=0
CONFIG_BT_CTRL_HCI_TL_EFF=0
CONFIG_EXAMPLE_HCI_UART_BAUDRATE=921600

CONFIG_ESP32_WIFI_NVS_ENABLED=

CONFIG_COMPILER_DISABLE_GCC12_WARNINGS=y

CONFIG_ESP_SPI_TX_Q_SIZE=20
CONFIG_ESP_SPI_RX_Q_SIZE=20
CONFIG_PARTITION_TABLE_SINGLE_APP=y
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y

CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED=n
CONFIG_ESP_IPC_TASK_STACK_SIZE=1536

CONFIG_ESP_PHY_REDUCE_TX_POWER=y
CONFIG_REDUCE_PHY_TX_POWER=y
CONFIG_ESP32_REDUCE_PHY_TX_POWER=y

Loading
Loading