Installing Eclipse IDE (Windows)

Our Eclipse IDE resources here may well be old, we’ve switched over to using VSCode Installing Eclipse IDE https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/eclipse-setup.html Install missing prerequisites Install Python (the Espressif Windows all-in-one toolchain installed embedded Python, not Python) from: https://www.python.org/downloads/(Installs to here by default: C:\Users\Dev\AppData\Local\Programs\Python\ )Note if the current Python release is very new you may want to select […]

Read More

Hardware overview

ESP32-S Series Faster, dual-core available, more GPIO, USB OTG available. ESP32-S2 Series Single-core 32-bit Xtensa LX7 CPU, up to 240 MHz320 KB SRAM, 128 KB ROM, and 16 KB RTC SRAMWiFi 2.4 GHz (IEEE 802.11b/g/n)No Bluetooth43 GPIOsUSB OTG, SPI, I2S, UART, I2C, LED PWM, LCD interfaces.Camera interface, ADC, DAC, touch sensor, temperature sensor. ESP32-S3 Series […]

Read More

LCD Screen

LCD Screen 3.2" 320 x pixels, 18bit colour LCD Controller ILI9341 controller, connects to ESP32 via SPI bus. Source code resources LCD support for the ESP32 seems a bit rudimentary at the moment, a bit wild west.  You'll need to hunt around for libraries to try and do something nice and useful with the screen. https://github.com/espressif/esp-iot-solution/tree/master/components/spi_devices/lcd    

Read More

Main Loop

Although FreeRTOS is all about creating tasks, you can just use a main loop approach to programms running on it if you want to.  You simply need to ocassionally sleep so the RTOS can drop down to the Idle task, do any housekeeping and reset its watchdog timer.    Here's a working example of a […]

Read More

Production Programming

Programming Adapter You need a suitable programming adapter, see our programming hardware page. Download the Espressif Windows software Download and install “Flash Download Tools” in the Tools section from: https://www.espressif.com/en/products/hardware/esp32/resources Programming instructions Run the flash download tool “flash_download_tool_v#.#.#.exe” Chip Type: The model of ESP32 being programmed (see the parts list or circuit schematic)Work Mode: DevelopLoad […]

Read More

malloc

Temporary memory example //CREATE TEMPORARY MEMORY BUFFER uint32_t *my_temporary_memory_buffer = malloc(1024 * sizeof(uint32_t)); //Allocate a block of size bytes of memory, returning a pointer to the beginning of the block. Use calloc() to do same but zero initialise the buffer. if (my_temporary_memory_buffer != NULL) { //Use my_temporary_memory_buffer as needed my_temporary_memory_buffer[0] = 1234; //RELEASE TEMPORARY MEMORY […]

Read More

TCP Server

Ethernet TCP Server Example (This example is based on using a wired Ethernet port, the setup and event_handler would need adapting to use for the WiFi port) #include <stdio.h> #include <string.h> #include <sys/fcntl.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_wifi.h" #include "esp_system.h" #include "esp_err.h" #include "esp_event_loop.h" #include "freertos/event_groups.h" #include "esp_event.h" #include "esp_attr.h" #include "esp_log.h" #include "esp_eth.h" #include […]

Read More

.Writing to the ESP_LOG#

Resources https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/system/log.html Why use the log instead of printf? Writing to log What we do Including values Including strings Value format codes See here. Enabling/disabling logs from being output E.g. selectively including messages from certain files, production release code where you don’t want messages to appear at the serial port or take time away from […]

Read More