This project is used to build a MicroEJ Platform for the ESP-WROVER-KIT V4.1 development board.
Clone the repository with the following command:
git clone --recursive https://github.com/MicroEJ/Platform-Espressif-ESP-WROVER-KIT-V4.1
Do not miss the --recursive
option. If you have already cloned this project without this option, run another command to get all the submodules:
git submodule update --init --recursive
This directory also contains:
- CHANGELOG to track the changes in the MicroEJ ESP-WROVER-KIT V4.1 Platform
- RELEASE NOTES to list:
- the supported hardware,
- the known issues and the limitations,
- the development environment,
- the list of the dependencies and their versions.
- README MicroEJ BSP recommended for users familiar with the Espressif IDF and advanced usage on how to customize the build process.
Name | ESP-WROVER-KIT V4.1 |
Revision | 4.1 |
MCU part number | ESP32-WROVER-B |
MCU revision | N/A |
MCU architecture | Xtensa LX6 |
MCU max clock frequency | 240 MHz |
Internal flash size | 540 KB |
Internal RAM size | 520 KB |
External flash size | 4 MB |
External RAM size | 8 MB |
Power supply | USB, External 5V |
Here is a list of ESP-WROVER-KIT V4.1 useful documentation links:
- Board documentation available here
- Espressif board Getting Started available here
- Board schematics available here
- MCU Technical Reference Manual available here
- MCU Datasheet available here
- MCU Errata available here
The Architecture version is 7.20.1
.
This Platform provides the following Foundation Libraries:
Foundation Library | Version |
---|---|
BLUETOOTH | 2.1 |
BON | 1.4 |
DEVICE | 1.1 |
DRAWING | 1.0 |
ECOM-NETWORK | 2.1 |
ECOM-COMM | 1.1 |
ECOM-WIFI | 2.3 |
ESP_IDF | 1.1 |
FS | 2.1 |
HAL | 1.0 |
KF | 1.6 |
MICROUI | 3.1 |
NET | 1.1 |
NLS | 2.0 |
SECURITY | 1.4 |
SNI | 1.4 |
SSL | 2.2 |
TRACE | 1.1 |
WATCHDOG | 1.0 |
The MicroEJ Platform is derived into:
- a Mono-Sandbox Platform (default)
- a Multi-Sandbox Platform
- PC with Windows 10 or Linux (tested with Ubuntu LTS 20.04)
- Internet connection to MicroEJ Central Repository
- MICROEJ SDK Dist.
21.11
or higher, available here - ESP-WROVER-KIT V4.1 board
Install the Espressif toolchain by following the section Setting up Development Environment
described here, but skip the section Get ESP-IDF
. The ESP-IDF is already a submodule of this repository.
Please pay attention on the limitations regarding the installation path (e.g. no white spaces, parentheses ...), described in the above documentation.
Please refer to the Espressif documentation available here for more details about Espressif tools.
- C/C++ toolchain name: xtensa-esp32-elf-gcc
- C/C++ toolchain version: 8.4.0 (crosstool-NG esp-2021r2)
- C/C++ toolchain download link for 64-bit Windows: https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch1-win64.zip
- C/C++ toolchain download link for 32-bit Windows: https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch1-win32.zip
Please refer to the Espressif documentation available here for more details.
- C/C++ toolchain name: xtensa-esp32-elf-gcc
- C/C++ toolchain version: 8.4.0 (crosstool-NG esp-2021r2)
- C/C++ toolchain download link for 64-bit Linux: https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz
- C/C++ toolchain download link for 32-bit Linux: https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-linux-i686.tar.gz
Please refer to the Espressif documentation available here for more details.
Before the first build of the BSP, ensure you have cloned the repository and all its submodules
and also the patch for the MicroEJ Segger SystemView implementation is applied. This can be done
running the script RunAtFirstBSPCompile located in xxx/ESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/scripts
.
Please refer to the README MicroEJ BSP on further details.
The Platform provides a pre-compiled Mono-Sandbox Application. Validate the BSP installation by compiling the BSP to build a MicroEJ Firmware.
To build the ESP32-WROVER-Xtensa-FreeRTOS-bsp
project, open a
terminal and enter the following command lines:
On Windows:
$ cd "xxx/ESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/scripts"
$ build.bat
On Linux / macOS:
$ cd "xxx/ESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/scripts"
$ build.sh
The BSP project build is launched. Please wait for the final message:
Project build complete. To flash, run this command:
Please refer to README MicroEJ BSP for more details on how to customize the build scripts.
Please refer to the Espressif documentation available here for more details.
The board can be powered by USB cable or external 5V power supply.
Please refer to the Espressif documentation available here for more details.
The ESP-WROVER-KIT V4.1 board can be flashed using Espressif bootloader. Please Follow the steps below:
- Connect the USB connector of the board to your computer
- Take a look at the new COM port available
- Create the
ESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/scripts/set_local_env.xxx
script by copying the templateESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/scripts/set_local_env.xxx.tpl
(wherexxx
isbat
for Windows andsh
for Linux / macOS). - Edit in this script the the
ESPPORT
variable to put the newly COM port discovered previously. - Open a terminal and enter the following command lines:
On Windows:
$ cd "xxx/ESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/scripts"
$ run.bat
On Linux / macOS:
$ cd "xxx/ESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/scripts"
$ run.sh
The firmware is launched. Please wait for the final message:
Leaving... Hard resetting via RTS pin... Done
Espressif build and flash documentation are also available here for more details.
MicroEJ platform uses the virtual UART from the ESP-WROVER-KIT V4.1 USB port. A COM port is automatically mounted when the board is plugged to a computer using USB cable. All board logs are available through this COM port.
The COM port uses the following parameters:
Baudrate | 115200 |
Data bits bits | 8 |
Parity bits | None |
Stop bits | 1 |
Flow control | None |
If flashed, the pre-compiled application outputs Hello World
on
the UART.
When running a Testsuite, logs must be redirected to a secondary UART port. Please refer to Test Suite Configuration for a detailed explanation.
Please refer to the Espressif documentation available here for more details.
A JTAG interface is also directly available through the USB interface.
Please refer to the README MicroEJ BSP section debugging for more details.
Import the projects in MICROEJ SDK Workspace:
File
>Import
>Existing Projects into Workspace
>Next
- Point
Select root directory
to where the project was cloned. - Click
Finish
Inside MICROEJ SDK, the selected example is imported as several projects prefixed by the given name:
ESP32-WROVER-Xtensa-FreeRTOS-configuration
: Contains the platform configuration description. Some modules are described in a specific sub-folder / with some optional configuration files (.properties
and / or.xml
).ESP32-WROVER-Xtensa-FreeRTOS-bsp
: Contains a ready-to-use BSP software project for the ESP-WROVER-KIT V4.1 board, including a MICROEJ SDK project, an implementation of MicroEJ core engine (and extensions) port on FreeRTOS RTOS and the ESP-WROVER-KIT V4.1 board support package.ESP32-WROVER-Xtensa-FreeRTOS-fp
: Contains the board description and images for the MicroEJ Simulator. This project is updated once the platform is built.ESP32WROVER-Platform-GNUv84_xtensa-esp32-psram-{version}
: Contains the MICROEJ SDK Platform project which is empty by default until the Platform is built.
By default, the Platform is configured as a Mono-Sandbox Evaluation
Platform. If the Platform is configured as Multi-Sandbox, use the
build_no_ota_no_systemview
script (Please refer to the RELEASE
NOTES limitations section for more details).
To build the Platform, please follow the steps below:
- Right-click on
ESP32-WROVER-Xtensa-FreeRTOS-configuration
project in your MICROEJ SDK workspace. - Click on
Build Module
The build starts. This step may take several minutes. The first time, the Platform build requires to download modules that are available on the MicroEJ Central Repository. You can see the progress of the build steps in the MicroEJ console.
Please wait for the final message:
BUILD SUCCESSFUL
At the end of the execution the MicroEJ Platform is fully built for the ESP-WROVER-KIT V4.1 board and is ready to be linked into the MICROEJ SDK project.
The Platform project should be refreshed with no error in the MICROEJ SDK
ESP32WROVER-Platform-GNUv84_xtensa-esp32-psram-{version}
.
Please refer to https://docs.microej.com/en/latest/ApplicationDeveloperGuide/standaloneApplication.html for more information on how to build a MicroEJ Standalone Application.
An evaluation license is needed for building an application. Please refer to https://docs.microej.com/en/latest/overview/licenses.html#evaluation-license for information on how to acquire and activate a license.
To run a Test Suite on the ESP-WROVER-KIT V4.1 board the standard output must
be redirected to a dedicated UART. The property
microej.testsuite.properties.debug.traces.uart
must be set in the
config.properties
of the Test Suite.
This property redirects the UART onto a different GPIO port. Connect a FTDI USB wire to the pin D0 of the JP4 connector and ground.
In config.properties
, the property target.platform.dir
must be
set to the absolute path to the platform. For example
C:/Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-platform/source
.
A config.properties
and microej-testsuite-common.properties
are provided in ESP32-WROVER-Xtensa-FreeRTOS-configuration/testsuites/*
.
Press the "boot" button on the board while flashing.
Errors about files not found during the build may be caused by long path. Please refer to the known issues and limitations in the RELEASE NOTES for a workaround.