The ESP32 is a cool little device, and the ESP32-WROVER can be purchased in bulk for as low as $3. We used the ready to use T-Koala ESP32 development board and the TinyPICO board for testing the Barracuda App Server.
The ESP32 and the free ESP-IDF development environment is a great starting point for anyone interested in running the Barracuda App Server on FreeRTOS. The development environment, which can be downloaded from GitHub, includes a ready to use FreeRTOS setup and the lwIP TCP/IP stack.
The following video gives a quick introduction on how to compile and use the included Barracuda App Server example. The servo control example, shown in the video below, is based on the design pattern explained in the article Modern Approach to Embedding a Web Server in a Device.
All you need is an ESP32 with pSRAM such as ESP32-WROVER and the free ESP-IDF development environment. The following is a set of compressed installation instructions for this environment. Consult the official ESP IDF documentation if you feel you need more information.
We recommend using the Linux ESP-IDF version and if you are on Windows, just install the "Windows Subsystem for Linux". It's super easy to install and use. Just open the Windows 10 Store and search for Ubuntu. See this tutorial if you feel you need more information.
Open the Ubuntu shell after installation and make sure to enable copy and paste so you can copy the commands below and paste the commands into the shell using Ctrl-Shift-V.
The following set of commands work on standard Linux and the Windows Linux subsystem. Copy the commands below and paste the commands into the Ubuntu shell:
Install required tools:
We can install the ESP-IDF as soon as the above set of commands completes. Copy and paste the following commands:
The last command above sets up the path to the ESP IDF tools such as the compiler. You must run this command each time you open a new Ubuntu (Bash) shell.
You should now be in the ~/esp directory if you followed the above commands and the environment should be ready for compiling the Barracuda App Server example.
Using git, clone the Barracuda App Server ESP32 Github repository as follows:
Windows tip: If you are using Windows and not accustomed to the Windows Subsystem for Linux or prefer to edit files using standard Windows tool, you may instead clone LspAppMgr-ESP32 in, for example, c:\develop. You may run the following commands from the Windows Subsystem for Linux if you have the directory c:\develop :
The next step is to configure the build and set your own Wi-Fi credentails. Enter the following command to start the configuration tool.
Using the configuration tool, navigate to "Example Connection Configuration" and set your Wi-Fi credentials. Save the configuration data and exit the configuration tool.
You are now ready to build the example. Simply type the following to compile the example:
You may flash (upload) the code to the ESP32 as soon as you have compiled the code; however, you may first have to install Silicon lab's USB to UART drivers if you are using Windows. The drivers are needed when flashing the ESP32.
Attach the ESP32 to your computer using USB and upload the example as follows:
Windows Linux sub system:
The above command is for COM4. See the Windows Device Manager for the port assigned to your ESP32. We had problems with the default baud rate, which is 460800. The above command sets the baud rate to 115200.
The example should start and connect to your Wi-Fi as soon as the code is uploaded. Consult the Github repository's README.md file for what to do next.