Has anyone got Arduino as a component working with latest IDE?

User avatar
stevenbennett
Posts: 34
Joined: Sun May 19, 2024 7:30 am
Location: High Bentham, UK

Has anyone got Arduino as a component working with latest IDE?

Postby stevenbennett » Thu Sep 05, 2024 8:40 am

I'm using the Espressif IDF extension 1.8.1 on VSCode 1.92.2 and arduino esp-32 3.0.4 in the component folder, but I can not build the simplest code e.g. the one included in the list of templates called arduino-as-component. I get lots of messages about Ninja failure and missing paths but I must be doing something wrong; has anyone who has succeeded doing this any advice or step-by-step process to get it working - thank you.

lbernstone
Posts: 831
Joined: Mon Jul 22, 2019 3:20 pm

Re: Has anyone got Arduino as a component working with latest IDE?

Postby lbernstone » Thu Sep 05, 2024 6:49 pm

I just got a new laptop, so I actually had to go through this (while I had my coffee).
1) Install VSCode
2) Follow the IDF extension install instructions. Use version release/5.1 for arduino-esp32 v3.0.x
3) Follow the basic use instructions to build the blink example.
4) Hit F1 and find "ESP-IDF: Add Arduino ESP32 as IDF component"
5) Hit F1 and find "ESP-IDF: Install ESP Rainmaker" (not so optional, is it?)
6) Hit F1 and find "ESP-IDF: Create project from extension template". Select the arduino template, select a folder.
7) Hit F1 and find "ESP-IDF: Set Espressif device target". Set your device info
8) Copy the sdkconfig from arduino into your project sdkconfig (at project root). Make sure you get the right one for your variant.
9) Copy the contents of the example into your main.cpp or make your own.
10) Build your project

Note that ninja is the build process. If it fails, you need to look through the log to troubleshoot the error just like in any build. Sometimes ninja gets very stuck. Hit F1 to do a full clean, and then delete the build directory to start over.

User avatar
stevenbennett
Posts: 34
Joined: Sun May 19, 2024 7:30 am
Location: High Bentham, UK

Re: Has anyone got Arduino as a component working with latest IDE?

Postby stevenbennett » Sat Sep 07, 2024 10:45 am

Many thanks, I'll try that :)

Who is online

Users browsing this forum: No registered users and 83 guests