Posts

Showing posts with the label ESP-IDF

Install PlatformIO on Visual Studio Code to program ESP32-C6 in ESP-IDF.

Image
It's a fresh new Linux Mint with Visual Studio Code installed , no esptool or ESP-IDF installed. This video show steps to install PlatformIO on Visual Studio Code, to program YD-ESP32-C6-N16 . It's quite straightforward, except that: If following error reported while installing: PlatformIO: can not find working Python 3.6+ Interpreter. Click on Abort PlatformIO IDE Installation, and check available solutions: https://github.com/platformio/platformio-core-installer/issues/1774 Solution for Linux, install the following package and restart IDE. sudo apt-get install python3-venv If fail in accessing USB port: A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist. Grant permission to user, enter the command in Terminal, log out and log in: sudo usermod -a -G dialout <user> Code: Edit platformio.ini to add the last three line about monitor_ setting: [env:esp32-c6-devkitc-1] platform = espressif32 board = esp32-c6-devkitc-1 framewo...

Create Hello World in VSCode/ESP-IDF Extension manually, run on ESP32-C6 to send text to Serial.

Image
With ESP-IDF Extension installed on VSCode , this video show how to create Hello World in VSCode/ESP-IDF Extension manually, run on  YD-ESP32-C6-N16 to send text to Serial. Create new ESP-IDF project: > View > Command Palette > ESP-IDF: New Project Setup new project hello-C6, choose ESP-IDF Board: ESP32-C6 chip (via ESP USB Bridge) Edit and rename main.c to main.cpp : #include <iostream> extern "C" void app_main(void) { for (int i=0; i<=20; i++){ std::cout << "Hello World! "; std::cout << i; std::cout << "\n"; } } Build, Flash and Run: > View > Command Palette > ESP-IDF: Build, Flash and start a monitor on your device

Install Espressif IDF Extension in VS Code to program ESP32-C3 Run on Linux Mint 21.2 (over Windows 11/VirtualBox)

Image
This video show steps to install Espressif IDF Extension in VS Code to program Espressif ESP32-C3-DevKitM-1 . Here VS Code run on Linux Mint 21.2 (over Windows 11/VirtualBox) . Basically, it follow the steps in  ESP-IDF Visual Studio Code Extension Installation Guide to - Install ESP-IDF Extension to VS Code. - Install Prerequisites for Linux . - Configure ESP-IDF extension. - Add 60-openocd.rules for permisssion delegation in USB to added in /etc/udev/rules.d/. Then follow Basic use of the extension to: - Create project of Blink example. - Grant permission to user to access USB port. - finally flash on ESP32-C3-DevKitM-1. Fix IntelliSense error of: identifier "CONFIG_BLINK_PERIOD" is undefined identifier "portTICK_PERIOD_MS" is undefined in VS Code/ESP-IDF Blink Example. With auto-generated code with default setting, it can be built, flash and run on ESP32-C3 device without error. Is it OK, ...NOT. ...