From 8a77b73cb4a2ce623027acc7940fa4c206df18ed Mon Sep 17 00:00:00 2001 From: Yogesh Mantri Date: Fri, 21 Oct 2022 14:51:48 +0530 Subject: [PATCH] Minor fixes in documentation --- .../docs/Linux_based_host/Getting_started.md | 4 +- .../Linux_based_host/Linux_based_readme.md | 37 +++---- .../docs/Linux_based_host/SDIO_setup.md | 28 ++---- .../docs/Linux_based_host/SPI_setup.md | 98 ++----------------- .../docs/Linux_based_host/UART_setup.md | 95 ++---------------- .../docs/MCU_based_host/Getting_started.md | 8 +- .../docs/MCU_based_host/MCU_based_readme.md | 28 ++---- esp_hosted_fg/docs/common/python_demo.md | 2 +- esp_hosted_fg/docs/common/serial_apis.md | 4 +- esp_hosted_ng/docs/setup.md | 8 ++ 10 files changed, 66 insertions(+), 246 deletions(-) diff --git a/esp_hosted_fg/docs/Linux_based_host/Getting_started.md b/esp_hosted_fg/docs/Linux_based_host/Getting_started.md index e046f9949f..319b28e650 100644 --- a/esp_hosted_fg/docs/Linux_based_host/Getting_started.md +++ b/esp_hosted_fg/docs/Linux_based_host/Getting_started.md @@ -33,9 +33,9 @@ Wi-Fi can be configured as either as `STATION` mode or `SOFTAP` mode or `STATION - C based solution also could be used from [C based demo app](../common/c_demo.md). For simplicity, -Python App is placed in [host/linux/host_control/python_support/](../../host/linux/host_control/python_support/) directory. Use below command to navigate to this directory. +Python App is placed in [esp_hosted_fg/host/linux/host_control/python_support/](../../host/linux/host_control/python_support/) directory. Use below command to navigate to this directory. ```sh -$ cd host/linux/host_control/python_support/ +$ cd esp_hosted_fg/host/linux/host_control/python_support/ ``` #### 2.1.1 Wi-Fi Station Mode Operations diff --git a/esp_hosted_fg/docs/Linux_based_host/Linux_based_readme.md b/esp_hosted_fg/docs/Linux_based_host/Linux_based_readme.md index ab8feb0955..ba820e253b 100644 --- a/esp_hosted_fg/docs/Linux_based_host/Linux_based_readme.md +++ b/esp_hosted_fg/docs/Linux_based_host/Linux_based_readme.md @@ -50,14 +50,17 @@ Make sure that Raspberry-Pi is equipped with following: ```sh $ sudo apt install python3 ``` -* Clone ESP-Hosted code repository +* Using released codebase + * Download pre-built ESP-Hosted firmware release binaries from [releases](https://github.com/espressif/esp-hosted/releases) + * :warning: Make sure that you use `Source code (zip)` in `Assets` fold with associated release for host building. +* Using latest master + * Clone ESP-Hosted code repository ``` $ git clone --recurse-submodules $ cd esp-hosted $ git submodule update --init --recursive ``` -* Download pre-built ESP-Hosted firmware release binaries from [releases](https://github.com/espressif/esp-hosted/releases) - + * Please use the exact same git commit for ESP flashing using source code. ### 1.3 Setup @@ -70,7 +73,7 @@ Prepare connections based on interface requirements and setup host as below. * Prepare Raspberry-Pi as per section [1.2 Raspberry-Pi Software Setup](SDIO_setup.md#12-raspberry-pi-software-setup) of [SDIO setup document](SDIO_setup.md) * Compile and load host driver as below: ```sh - $ cd host/linux/host_control/ + $ cd esp_hosted_fg/host/linux/host_control/ $ ./rpi_init.sh sdio ``` * **Wi-Fi and Bluetooth over SPI** @@ -80,7 +83,7 @@ Prepare connections based on interface requirements and setup host as below. * Prepare Raspberry-Pi as per [1.2 Raspberry-Pi Software Setup](SPI_setup.md#12-raspberry-pi-software-setup) of [SPI Setup document](SPI_setup.md) * Compile and load host driver as below: ```sh - $ cd host/linux/host_control/ + $ cd esp_hosted_fg/host/linux/host_control/ $ ./rpi_init.sh spi ``` * **Wi-Fi over SDIO and Bluetooth over UART** @@ -92,7 +95,7 @@ Prepare connections based on interface requirements and setup host as below. * Prepare Raspberry-Pi for UART operations as per section [1.2 Raspberry-Pi Software Setup](UART_setup.md#12-raspberry-pi-software-setup) of [UART setup document](UART_setup.md) * Compile and load host driver as below: ```sh - $ cd host/linux/host_control/ + $ cd esp_hosted_fg/host/linux/host_control/ $ ./rpi_init.sh sdio btuart ``` * After loading ESP firmware, execute below command to create `hci0` interface @@ -108,7 +111,7 @@ Prepare connections based on interface requirements and setup host as below. * Prepare Raspberry-Pi for UART operations as per section [1.2 Raspberry-Pi Software Setup](UART_setup.md#12-raspberry-pi-software-setup) of [UART setup document](UART_setup.md) * Compile and load host driver as below: ```sh - $ cd host/linux/host_control/ + $ cd esp_hosted_fg/host/linux/host_control/ $ ./rpi_init.sh spi btuart ``` * After loading ESP firmware, execute below command to create `hci0` interface @@ -117,21 +120,9 @@ Prepare connections based on interface requirements and setup host as below. ``` #### 1.3.1 ESP Firmware Setup -* Flash pre-built binaries as below. - -```sh -$ esptool.py -p -b 960000 --before default_reset --after hard_reset \ -write_flash --flash_mode dio --flash_freq 40m --flash_size detect \ -0x8000 esp_hosted_partition-table___v.bin \ -0x1000 esp_hosted_bootloader___v.bin \ -0x10000 esp_hosted_firmware___v.bin - -Where, - : serial port of ESP peripheral - : esp32/esp32s2/esp32c2/esp32c3/esp32s3 - : sdio/spi/sdio_uart - : 0.1,0.2 etc -``` +* Download pre-built firmware binaries from [releases](https://github.com/espressif/esp-hosted/releases) +* Follow `readme.txt` from release tarball to flash the ESP binary +* :warning: Make sure that you use `Source code (zip)` in `Assets` fold with associated release for host building. #### 1.3.2 Setup Validation Once everything is setup and host software and ESP firmware are loaded @@ -204,6 +195,7 @@ This section identifies Raspberry-Pi specific setup requirements. :warning:`Note: ESP-IDF is needed to compile ESP-Hosted firmware source. Skip this step if you are planning to use pre-built release binaries.` - Clone the ESP-IDF [release/v5.0](https://github.com/espressif/esp-idf/tree/release/v5.0) and git checkout to `release/v5.0` branch. +- [Set-up the ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/get-started/index.html) - The control path between MCU host and ESP peripheral is based on `protobuf`. For that, corresponding stack layer, `protocomm` from ESP-IDF is used. It will be already present in ESP-IDF, no extra setup required for that. ### 2.3 ESP-Hosted Code Repository @@ -213,6 +205,7 @@ $ git clone --recurse-submodules $ cd esp-hosted $ git submodule update --init --recursive ``` +Please make sure that ESP and host checkeout to **same git commit**. ### 2.4 ESP-Hosted Setup and Load Project diff --git a/esp_hosted_fg/docs/Linux_based_host/SDIO_setup.md b/esp_hosted_fg/docs/Linux_based_host/SDIO_setup.md index cb1d61d832..01eb4a7ced 100644 --- a/esp_hosted_fg/docs/Linux_based_host/SDIO_setup.md +++ b/esp_hosted_fg/docs/Linux_based_host/SDIO_setup.md @@ -32,7 +32,7 @@ Please reboot Raspberry-Pi after changing this file. ### 2.1 Host Software * Execute following commands in root directory of cloned ESP-Hosted repository on Raspberry-Pi ```sh -$ cd host/linux/host_control/ +$ cd esp_hosted_fg/host/linux/host_control/ $ ./rpi_init.sh sdio ``` * This script compiles and loads host driver on Raspberry-Pi. It also creates virtual serial interface `/dev/esps0` which is used as a control interface for Wi-Fi on ESP peripheral @@ -42,31 +42,19 @@ One can load pre-built release binaries on ESP peripheral or compile those from #### 2.2.1 Load Pre-built Release Binaries * Download pre-built firmware binaries from [releases](https://github.com/espressif/esp-hosted/releases) -* Linux users can run below command to flash these binaries. Edit with ESP peripheral's serial port. -```sh -$ python esptool.py --chip esp32 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 40m \ -0x1000 esp_hosted_bootloader_esp32_sdio_v.bin \ -0x8000 esp_hosted_partition-table_esp32_sdio_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32_sdio_v.bin \ -0x10000 esp_hosted_firmware_esp32_sdio_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SDIO` interface binaries on `esp32` chip. - +* Follow `readme.txt` from release tarball to flash the ESP binary +* :warning: Make sure that you use `Source code (zip)` in `Assets` fold with associated release for host building. * Windows user can use ESP Flash Programming Tool to flash the pre-built binary. #### 2.2.2 Source Compilation -:warning:Note:Please check [ESP-IDF Setup](Linux_based_readme.md#22-esp-idf-setup) and use appropriate ESP-IDF version -* In root directory of ESP-Hosted repository, execute below command +- Note: Please use the same git commit both at ESP and Host +- Clone the ESP-IDF [release/v5.0](https://github.com/espressif/esp-idf/tree/release/v5.0) and git checkout to `release/v5.0` branch. +- [Set-up the ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/get-started/index.html) +- In root directory of ESP-Hosted repository, execute below command ```sh -$ cd esp/esp_driver/network_adapter +$ cd esp_hosted_fg/esp/esp_driver/network_adapter ``` ##### Using cmake diff --git a/esp_hosted_fg/docs/Linux_based_host/SPI_setup.md b/esp_hosted_fg/docs/Linux_based_host/SPI_setup.md index 785b122a33..81ad98c124 100644 --- a/esp_hosted_fg/docs/Linux_based_host/SPI_setup.md +++ b/esp_hosted_fg/docs/Linux_based_host/SPI_setup.md @@ -105,7 +105,7 @@ Please reboot Raspberry-Pi after changing this file. ### 2.1 Host Software * Execute following commands in root directory of cloned ESP-Hosted repository on Raspberry-Pi ```sh -$ cd host/linux/host_control/ +$ cd esp_hosted_fg/host/linux/host_control/ $ ./rpi_init.sh spi ``` * This script compiles and loads host driver on Raspberry-Pi. It also creates virtual serial interface `/dev/esps0` which is used as a control interface for Wi-Fi on ESP peripheral @@ -115,100 +115,18 @@ One can load pre-built release binaries on ESP peripheral or compile those from #### 2.2.1 Load Pre-built Release Binaries * Download pre-built firmware binaries from [releases](https://github.com/espressif/esp-hosted/releases) -* Linux users can run below command to flash these binaries. -##### ESP32 -```sh -$ python esptool.py --chip esp32 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 40m \ -0x1000 esp_hosted_bootloader_esp32_spi_v.bin \ -0x8000 esp_hosted_partition-table_esp32_spi_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32_spi_v.bin \ -0x10000 esp_hosted_firmware_esp32_spi_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI` interface binaries on `esp32` chip. - -##### ESP32-S2 -```sh -$ python esptool.py --chip esp32s2 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m \ -0x1000 esp_hosted_bootloader_esp32s2_spi_v.bin \ -0x8000 esp_hosted_partition-table_esp32s2_spi_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32s2_spi_v.bin \ -0x10000 esp_hosted_firmware_esp32s2_spi_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI` interface binaries on `esp32s2` chip. - -##### ESP32-C2 -```sh -$ python esptool.py --chip esp32c2 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m \ -0x0 esp_hosted_bootloader_esp32c2_spi_v.bin \ -0x8000 esp_hosted_partition-table_esp32c2_spi_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32c2_spi_v.bin \ -0x10000 esp_hosted_firmware_esp32c2_spi_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI` interface binaries on `esp32c2` chip. - -* Windows user can use ESP Flash Programming Tool to flash the pre-built binary. - -##### ESP32-C3 -```sh -$ python esptool.py --chip esp32c3 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m \ -0x0 esp_hosted_bootloader_esp32c3_spi_v.bin \ -0x8000 esp_hosted_partition-table_esp32c3_spi_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32c3_spi_v.bin \ -0x10000 esp_hosted_firmware_esp32c3_spi_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI` interface binaries on `esp32c3` chip. - -* Windows user can use ESP Flash Programming Tool to flash the pre-built binary. - -##### ESP32-S3 -```sh -$ python esptool.py --chip esp32s3 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m \ -0x0 esp_hosted_bootloader_esp32s3_spi_v.bin \ -0x8000 esp_hosted_partition-table_esp32s3_spi_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32s3_spi_v.bin \ -0x10000 esp_hosted_firmware_esp32s3_spi_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI` interface binaries on `esp32s3` chip. - +* Follow `readme.txt` from release tarball to flash the ESP binary +* :warning: Make sure that you use `Source code (zip)` in `Assets` fold with associated release for host building. * Windows user can use ESP Flash Programming Tool to flash the pre-built binary. #### 2.2.2 Source Compilation -:warning:Note: Please check [ESP-IDF Setup](Linux_based_readme.md#22-esp-idf-setup) and use appropriate ESP-IDF version - -* In root directory of ESP-Hosted repository, execute below command +- Note: Please use the same git commit both at ESP and Host +- Clone the ESP-IDF [release/v5.0](https://github.com/espressif/esp-idf/tree/release/v5.0) and git checkout to `release/v5.0` branch. +- [Set-up the ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/get-started/index.html) +- In root directory of ESP-Hosted repository, execute below command ```sh -$ cd esp/esp_driver/network_adapter +$ cd esp_hosted_fg/esp/esp_driver/network_adapter ``` ##### Using cmake diff --git a/esp_hosted_fg/docs/Linux_based_host/UART_setup.md b/esp_hosted_fg/docs/Linux_based_host/UART_setup.md index c9e94b2709..de64ac9842 100644 --- a/esp_hosted_fg/docs/Linux_based_host/UART_setup.md +++ b/esp_hosted_fg/docs/Linux_based_host/UART_setup.md @@ -87,7 +87,7 @@ $ sudo systemctl disable hciuart - Clone ESP-Hosted repository on Raspberry-Pi - Build and load kernel module ```sh -$ cd host/linux/host_control/ +$ cd esp_hosted_fg/host/linux/host_control/ $ ./rpi_init.sh ``` - can take value `sdio` or `spi`. Defaults to `sdio` @@ -102,93 +102,18 @@ One can load pre-built release binaries on ESP peripheral or compile those from #### 2.2.1 Load Pre-built Release Binaries * Download pre-built firmware binaries from [releases](https://github.com/espressif/esp-hosted/releases) -* Linux users can run below command to flash these binaries. Edit with ESP peripheral's serial port. - -##### ESP32 -* Please note that this binary is made for UART baudrate of 921600. -```sh -$ python esptool.py --chip esp32 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect \ -0x1000 esp_hosted_bootloader_esp32__uart_v.bin \ -0x8000 esp_hosted_partition-table_esp32__uart_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32__uart_v.bin \ -0x10000 esp_hosted_firmware_esp32__uart_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) - : sdio or spi -``` -* This command will flash `SDIO+UART` or `SPI+UART` interface binaries on `esp32` chip. - -##### ESP32-C2 -* Please note that this binary is made for UART baudrate of 921600. - -```sh -$ python esptool.py --chip esp32c2 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m \ -0x0 esp_hosted_bootloader_esp32c2_spi_uart_v.bin \ -0x8000 esp_hosted_partition-table_esp32c2_spi_uart_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32c2_spi_uart_v.bin \ -0x10000 esp_hosted_firmware_esp32c2_spi_uart_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI+UART` interface binaries on `esp32c2` chip. - -* Windows user can use ESP Flash Programming Tool to flash the pre-built binary. - -##### ESP32-C3 -* Please note that this binary is made for UART baudrate of 921600. - -```sh -$ python esptool.py --chip esp32c3 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m \ -0x0 esp_hosted_bootloader_esp32c3_spi_uart_v.bin \ -0x8000 esp_hosted_partition-table_esp32c3_spi_uart_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32c3_spi_uart_v.bin \ -0x10000 esp_hosted_firmware_esp32c3_spi_uart_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI+UART` interface binaries on `esp32c3` chip. - -* Windows user can use ESP Flash Programming Tool to flash the pre-built binary. - -##### ESP32-S3 - -* Please note that this binary is made for UART baudrate of 921600. - -```sh -$ python esptool.py --chip esp32s3 --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m \ -0x0 esp_hosted_bootloader_esp32s3_spi_uart_v.bin \ -0x8000 esp_hosted_partition-table_esp32s3_spi_uart_v.bin \ -0xd000 esp_hosted_ota_data_initial_esp32s3_spi_uart_v.bin \ -0x10000 esp_hosted_firmware_esp32s3_spi_uart_v.bin - -Where, - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI+UART` interface binaries on `esp32s3` chip. - +* Follow `readme.txt` from release tarball to flash the ESP binary +* :warning: Make sure that you use `Source code (zip)` for host building. * Windows user can use ESP Flash Programming Tool to flash the pre-built binary. #### 2.2.2 Source Compilation -:warning:Note: Please check [ESP-IDF Setup](Linux_based_readme.md#22-esp-idf-setup) and use appropriate ESP-IDF version -* In root directory of ESP-Hosted repository, execute below command +- Note: Please use the same git commit both at ESP and Host +- Clone the ESP-IDF [release/v5.0](https://github.com/espressif/esp-idf/tree/release/v5.0) and git checkout to `release/v5.0` branch. +- [Set-up the ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/get-started/index.html) +- In root directory of ESP-Hosted repository, execute below command ```sh -$ cd esp/esp_driver/network_adapter +$ cd esp_hosted_fg/esp/esp_driver/network_adapter ``` ##### Using cmake @@ -258,11 +183,11 @@ $ idf.py -p build flash - should match UART baud rate while flashing ESP peripheral ### For ESP32 -- Check `CONFIG_BT_HCI_UART_BAUDRATE` parameter in *esp/esp_driver/network_adapter/sdkconfig* +- Check `CONFIG_BT_HCI_UART_BAUDRATE` parameter in *esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig* - Alternatively baud rate could be located in menuconfig at, * Alternatively baud rate could be located in menuconfig at, `Component config -> Bluetooth -> Bluetooth controller -> HCI UART(H4) Options -> UART Baudrate for HCI` ### For ESP32-C3 or ESP32-S3 -- Check `CONFIG_EXAMPLE_HCI_UART_BAUDRATE` parameter in *esp/esp_driver/network_adapter/sdkconfig* +- Check `CONFIG_EXAMPLE_HCI_UART_BAUDRATE` parameter in *esp_hosted_fg/esp/esp_driver/network_adapter/sdkconfig* - Alternatively baud rate could be located in menuconfig at, `Component config -> Example Configuration -> UART Baudrate for HCI` ## 4. Points to note diff --git a/esp_hosted_fg/docs/MCU_based_host/Getting_started.md b/esp_hosted_fg/docs/MCU_based_host/Getting_started.md index 7a4d92cac8..30c581bbb3 100644 --- a/esp_hosted_fg/docs/MCU_based_host/Getting_started.md +++ b/esp_hosted_fg/docs/MCU_based_host/Getting_started.md @@ -15,7 +15,7 @@ This section elaborates about setting up the control path, Wi-Fi connectivity an - Overall design is explained in [control path design](../common/contrl_path.md#3-design) - Underlying [Hosted control path library](../common/contrl_path.md#3-design) is agnostic of platform and common for MPU or MCU based solution. - This empowers user to implement/mimic all control path APIs just similar to [Linux demo application in C](../common/c_demo.md) - - Few sample [control path APIs](../common/ctrl_apis.md) like connecting to station, starting softap are demonstrated as part of [host/stm32/app/control/control.c](../../host/stm32/app/control/control.c) + - Few sample [control path APIs](../common/ctrl_apis.md) like connecting to station, starting softap are demonstrated as part of [esp_hosted_fg/host/stm32/app/control/control.c](../../host/stm32/app/control/control.c) - Rest APIs could be implemeted just similar to ones implemented in Linux demo application ## 2. Wi-Fi Connectivity @@ -37,7 +37,7 @@ We have tested project with STM32F469I-Discovery board. If other than STM32F469I * Create a workspace_directory outside of `ESP-Hosted` git cloned directory. * Browse and Open Workspace directory in STM32CubeIDE. It will take few seconds to open STM32CubeIDE. -* From `Information Center` tab select `Start new project` from existing STM32CubeMX configuration file, i.e. ioc file option. It will take few seconds to open dialog box. In STM32CubeMX .ioc file field, choose appropriate .ioc file from `/host/stm32/proj/` directory. +* From `Information Center` tab select `Start new project` from existing STM32CubeMX configuration file, i.e. ioc file option. It will take few seconds to open dialog box. In STM32CubeMX .ioc file field, choose appropriate .ioc file from `/esp_hosted_fg/host/stm32/proj/` directory. ``` For ESP32 peripheral: Select stm_spi_host_v1.ioc file For ESP32-C2/ESP32-C3/ESP32-S2/ESP32-S3 peripheral: Select stm_spi_host_v2.ioc file @@ -46,12 +46,12 @@ For ESP32-C2/ESP32-C3/ESP32-S2/ESP32-S3 peripheral: Select stm_spi_host_v2.ioc f * Close ioc tab then close STM32CubeIDE and click on `exit`. * For Linux and Mac development hosts, In terminal, run ``` -$ cd /host/stm32/proj +$ cd /esp_hosted_fg/host/stm32/proj $ bash ./prepare_project.sh ``` For Windows based systems, open "cmd.exe" or Windows Power Shell and run - ``` -> cd \host\stm32\proj +> cd \esp_hosted_fg\host\stm32\proj > prepare_project.bat ``` This will copy the project configuration files into workspace_directory diff --git a/esp_hosted_fg/docs/MCU_based_host/MCU_based_readme.md b/esp_hosted_fg/docs/MCU_based_host/MCU_based_readme.md index 5649ab0d57..01681f9058 100644 --- a/esp_hosted_fg/docs/MCU_based_host/MCU_based_readme.md +++ b/esp_hosted_fg/docs/MCU_based_host/MCU_based_readme.md @@ -132,29 +132,17 @@ Setup image is here. ### 2.2 Setup #### 2.2.1 Using pre-built binary -For pre built hosted mode firmware is present in `release` tab. Execute below command to flash it on ESP peripheral. - -```sh -$ python esptool.py --chip --port --baud --before default_reset \ ---after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 40m \ -0x1000 esp_hosted_bootloader__spi_v.bin \ -0x8000 esp_hosted_partition-table__spi_v.bin \ -0xd000 esp_hosted_ota_data_initial__spi_v.bin \ -0x10000 esp_hosted_firmware__spi_v.bin - -Where, - : esp32/esp32s2/esp32c2/esp32c3 - : serial port of ESP peripheral - : flash baud rate of ESP peripheral, ex.115200, 921600, 2Mbps - : 0.1,0.2 etc. Latest from [release page](https://github.com/espressif/esp-hosted/releases) -``` -* This command will flash `SPI` interface binaries on ESP module. - -For windows user, you can also program the binaries using ESP Flash Programming Tool. +* Download pre-built firmware binaries from [releases](https://github.com/espressif/esp-hosted/releases) +* Follow `readme.txt` from release tarball to flash the ESP binary +* :warning: Make sure that you use `Source code (zip)` in `Assets` fold with associated release for host building. +* Windows user can use ESP Flash Programming Tool to flash the pre-built binary. #### 2.2.2 Compilation using source -Navigate to `esp/esp_driver/network_adapter` directory. +- Note: Please use the same git commit both at ESP and Host +- Clone the ESP-IDF [release/v5.0](https://github.com/espressif/esp-idf/tree/release/v5.0) and git checkout to `release/v5.0` branch. +- [Set-up the ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/get-started/index.html) +- Navigate to `esp_hosted_fg/esp/esp_driver/network_adapter` directory. ##### Using cmake diff --git a/esp_hosted_fg/docs/common/python_demo.md b/esp_hosted_fg/docs/common/python_demo.md index 0c77827c7c..826a432c8d 100644 --- a/esp_hosted_fg/docs/common/python_demo.md +++ b/esp_hosted_fg/docs/common/python_demo.md @@ -148,7 +148,7 @@ $ sudo python3 stress.py - As explained above, OTA is run as ```sh -$ cd host/linux/host_control/python_support/ +$ cd esp_hosted_fg/host/linux/host_control/python_support/ $ sudo python3 ota_update ``` diff --git a/esp_hosted_fg/docs/common/serial_apis.md b/esp_hosted_fg/docs/common/serial_apis.md index d4b8329f9a..cde8ea0a4a 100644 --- a/esp_hosted_fg/docs/common/serial_apis.md +++ b/esp_hosted_fg/docs/common/serial_apis.md @@ -1,10 +1,10 @@ # Serial APIs - Serial APIs are split into `virtual serial interface APIs` and `serial driver APIs` -- Demo app of control path makes use of **Virtual Serial Interface**, [host/virtual_serial_if/include/serial_if.h](../../host/virtual_serial_if/include/serial_if.h) +- Demo app of control path makes use of **Virtual Serial Interface**, [esp_hosted_fg/host/virtual_serial_if/include/serial_if.h](../../host/virtual_serial_if/include/serial_if.h) - Virtual serial interface makes use of serial driver - Serial driver is platform specific port which actually implements serial driver specific to that platform \ For example, Linux uses `/dev/esps0` as serial driver file -- Serial driver for MPU *.i.e.* Linux based host is at **Serial Driver for Linux**, [host/linux/port/include/platform_wrapper.h](../../host/linux/port/include/platform_wrapper.h) +- Serial driver for MPU *.i.e.* Linux based host is at **Serial Driver for Linux**, [esp_hosted_fg/host/linux/port/include/platform_wrapper.h](../../host/linux/port/include/platform_wrapper.h) # 1. Virtual Serial Interface APIs diff --git a/esp_hosted_ng/docs/setup.md b/esp_hosted_ng/docs/setup.md index a68712f640..3159d15e04 100644 --- a/esp_hosted_ng/docs/setup.md +++ b/esp_hosted_ng/docs/setup.md @@ -135,6 +135,8 @@ > > > > ##### Checkout ESP-Hosted repo > > ```sh +> > $ git clone https://github.com/espressif/esp-hosted.git +> > OR > > $ git clone git@github.com:espressif/esp-hosted.git > > ``` > > @@ -317,6 +319,8 @@ > > > > ##### Checkout ESP-Hosted repo > > ```sh +> > $ git clone https://github.com/espressif/esp-hosted.git +> > OR > > $ git clone git@github.com:espressif/esp-hosted.git > > ``` > > @@ -539,6 +543,8 @@ > > > > ##### Checkout ESP-Hosted repo > > ```sh +> > $ git clone https://github.com/espressif/esp-hosted.git +> > OR > > $ git clone git@github.com:espressif/esp-hosted.git > > ``` > > @@ -774,6 +780,8 @@ > > > > ##### Checkout ESP-Hosted repo > > ```sh +> > $ git clone https://github.com/espressif/esp-hosted.git +> > OR > > $ git clone git@github.com:espressif/esp-hosted.git > > ``` > >