BookStudyDigest

Sunday, 2 June 2024

ESP-IDF install on Linux

IDF - IoT Development Framework ESP-IDF is Espressif's official IoT Development Framework for the ESP32, ESP32-S, ESP32-C and ESP32-H series. It provides a self-sufficient SDK for any generic application development on these platforms, using progra…
Read on blog or Reader
Site logo image Tauno Erik Read on blog or Reader

ESP-IDF install on Linux

Tauno Erik

June 2

IDF - IoT Development Framework

ESP-IDF is Espressif's official IoT Development Framework for the ESP32, ESP32-S, ESP32-C and ESP32-H series. It provides a self-sufficient SDK for any generic application development on these platforms, using programming languages such as C and C++.

Install Prerequisites

sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0

Visual Studio Code

Install the ESP-IDF Extension.

In Visual Studio Code, select menu "View" and "Command Palette" and type: configure esp-idf extension

Choose Express

Select ESP-IDF version.

Install.

For Linux users, OpenOCD needs to add 60-openocd.rules for permission delegation in USB devices to be added in /etc/udev/rules.d/

sudo cp -n /home/taunoerik/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d

Basic use

"Create project using example blink" button.

Create and select folder Blink.

Select an Espressif target (esp32, esp32s2, etc.) with the ESP-IDF: Set Espressif Device Target command. Default is esp32.

Configure your project using menuconfig. Use the ESP-IDF: SDK Configuration Editor command (CTRL E G keyboard shortcut ) where the user can modify the ESP-IDF project settings.

Open the project configuration menu (idf.py menuconfig).

Build the project, use the ESP-IDF: Build your Project command (CTRL E B keyboard shortcut).

Blink example code

 #include <stdio.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "driver/gpio.h" #include "esp_log.h" #include "led_strip.h" #include "sdkconfig.h"  static const char *TAG = "example";  /* Use project configuration menu (idf.py menuconfig) to choose the GPIO to blink,    or you can edit the following line and set a number here. */ #define BLINK_GPIO 2  // pin  static uint8_t s_led_state = 0;   static void blink_led(void) {     /* Set the GPIO level according to the state (LOW or HIGH)*/     gpio_set_level(BLINK_GPIO, s_led_state); }  static void configure_led(void) {     ESP_LOGI(TAG, "Blink GPIO LED!");     gpio_reset_pin(BLINK_GPIO);     /* Set the GPIO as a push/pull output */     gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT); }   void app_main(void) {     /* Configure the peripheral according to the LED type */     configure_led();      while (1) {       ESP_LOGI(TAG, "Turning the LED %s!", s_led_state == true ? "ON" : "OFF");       blink_led();        /* Toggle the LED state */       s_led_state = !s_led_state;       vTaskDelay(CONFIG_BLINK_PERIOD / portTICK_PERIOD_MS);     } } 

Links

  • https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/install.md
Comment
Like
You can also reply to this email to leave a comment.

Tauno Erik © 2024. Manage your email settings or unsubscribe.

WordPress.com and Jetpack Logos

Get the Jetpack app

Subscribe, bookmark, and get real-time notifications - all from one app!

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com Logo and Wordmark title=

Automattic, Inc. - 60 29th St. #343, San Francisco, CA 94110  

at June 02, 2024
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

The Consecrated Eminence: Coming Home to the Archives: New Audiovisual Materials Available Through Amherst College Digital Collections

...

  • The Consecrated Eminence: 80 Years Later: Remembering Hiroshima and Nagasaki August 6 & 9, 1945
    ...
  • [New post] Mackintosh — Beyond the Swelkie (2021)
    peterson10 posted: "Mackintosh, Jim, and Paul S. Philippou, eds. Beyond the Swelkie: A Collection of Poems and Writings Cel...
  • PLDT Home honors mothers on their special day with a heartwarming video titled Backstage Moms
    Motherhood is definitely one of the hardest endeavors a woman can take in her li...

Search This Blog

  • Home

About Me

BookStudyDigest
View my complete profile

Report Abuse

Blog Archive

  • November 2025 (1)
  • August 2025 (2)
  • April 2025 (1)
  • September 2024 (859)
  • August 2024 (946)
  • July 2024 (879)
  • June 2024 (843)
  • May 2024 (875)
  • April 2024 (1018)
  • March 2024 (1239)
  • February 2024 (1135)
  • January 2024 (934)
  • December 2023 (923)
  • November 2023 (818)
  • October 2023 (743)
  • September 2023 (712)
  • August 2023 (722)
  • July 2023 (629)
  • June 2023 (566)
  • May 2023 (584)
  • April 2023 (629)
  • March 2023 (551)
  • February 2023 (399)
  • January 2023 (514)
  • December 2022 (511)
  • November 2022 (455)
  • October 2022 (530)
  • September 2022 (418)
  • August 2022 (412)
  • July 2022 (452)
  • June 2022 (467)
  • May 2022 (462)
  • April 2022 (516)
  • March 2022 (459)
  • February 2022 (341)
  • January 2022 (385)
  • December 2021 (596)
  • November 2021 (1210)
Powered by Blogger.