question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Step by step documentation for integrating vscode-esp-idf-extension on AWS FreeRTOS ESP32 (VSC-610)

See original GitHub issue

Hello everybody. Hope your team is doing well.

How can we build, flash and compile AWS ESP32 FreeRTOS V202012.00 using vscode-esp-idf-extension on Windows? The closest information regarding this, is here https://www.freertos.org/2021/01/using-visual-studio-code-for-freertos-development.html, but unfortunately is not clear enough.

Currently I handle this project from prompt using ESP-IDFV3.3.2, and the toolchain installer was esp-idf-tools-setup-2.4.exe

In order to develop AWS ESP32 FreeRTOS V202012.00 projects, we download the zip file from AWS console and place it on ESP-IDFV3.3.2 root installation. Then modifying IDF_PATH on C:\Users\Yoimer\.espressif\idf_cmd_init.bat we can make the ESP-IDF Command Prompt (cmd.exe) call FreeRTOS. (please see idf_cmd_init.txt attachment)

idf_cmd_init.txt

Just to make things faster, I uploaded the zip file generated from AWS FreeRTOS on this bucket. Please feel free to download it https://s3-us-west-2.amazonaws.com/freertos-v202012.00/freertos-1615096093296.zip.

When executing ESP-IDF Command Prompt (cmd.exe), it shows this

Using Python in C:\Users\Yoimer\.espressif\tools\idf-python\3.8.7\
Python 3.8.7
Using Git in C:\git\cmd\
git version 2.30.2.windows.1
Setting IDF_PATH: C:\esp-idf-v3.3.2\FreeRTOS\vendors\espressif\esp-idf

Adding ESP-IDF tools to PATH...
    C:\Users\Yoimer\.espressif\tools\xtensa-esp32-elf\1.22.0-80-g6c4433a5-5.2.0\xtensa-esp32-elf\bin
    C:\Users\Yoimer\.espressif\tools\esp32ulp-elf\2.28.51.20170517\esp32ulp-elf-binutils\bin
    C:\Users\Yoimer\.espressif\tools\cmake\3.13.4\bin
    C:\Users\Yoimer\.espressif\tools\openocd-esp32\v0.10.0-esp32-20190313\openocd-esp32\bin
    C:\Users\Yoimer\.espressif\tools\mconf\v4.6.0.0-idf-20190628\
    C:\Users\Yoimer\.espressif\tools\ninja\1.9.0\
    C:\Users\Yoimer\.espressif\tools\idf-exe\1.0.1\
    C:\Users\Yoimer\.espressif\tools\ccache\3.7\
    C:\Users\Yoimer\.espressif\python_env\idf3.3_py3.8_env\Scripts
    C:\esp-idf-v3.3.2\FreeRTOS\vendors\espressif\esp-idf\tools

Checking if Python packages are up to date...
Python requirements from C:\esp-idf-v3.3.2\FreeRTOS\vendors\espressif\esp-idf\requirements.txt are satisfied.

Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build


C:\esp-idf-v3.3.2>

Then we change directory to FreeRTOS folder and execute the commands for the respective demos, like this:

For coreMQTT demo

cmake -DVENDOR=espressif -DBOARD=esp32_devkitc -DCOMPILER=xtensa-esp32 -GNinja -S . -B demos/coreMQTT/build cmake --build demos/coreMQTT/build, however this python %IDF_PATH%/tools/idf.py build -B demos/coreMQTT/build also works. cmake demos/coreMQTT/build --target flash, however this python %IDF_PATH%/tools/idf.py erase_flash flash demos/coreMQTT/build works also and even includes erase_flash to clean all the flash before flashing again. python %IDF_PATH%/tools/idf.py monitor -p COM4 -B demos/coreMQTT/build, where COM4 is the COM port assigned to your ESP32. For the rests of the demos, like ota and wifi_provisioning is the same procedure.

Is there any document or explanation where people could see how to do all what’s explained above from vscode-esp-idf-extension on AWS FreeRTOS ESP32?.

I am able to use vscode-esp-idf-extension for building and flashing with any of the demos on C:\esp-idf-v3.3.2. I’d like to do the same with AWS FreeRTOS ESP32 V202012.00.

Thanks a lot for you assistance

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
Yoimercommented, Apr 6, 2021

@brianignacio5 Thanks for your time and support. That’s very kind from you. I will test this and let you know.

1reaction
Yoimercommented, Mar 24, 2021

@brianignacio5 Thanks a lot for replying, very kind from you and your team. Actually I am not using a modified ESP-IDF, I am using a native one. It might be v3.3.2 or v3.3 or any of them.

AWS FreeRTOS ESP32 is a customized (modified) version of the FreeRTOS implemented by Expressif, however it used native ESP-IDF to work.

https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html

Let’s say I use ESP-IDF v3.3 and I install the https://dl.espressif.com/dl/esp-idf-tools-setup-1.2.exe as mentioned here https://docs.espressif.com/projects/esp-idf/en/v3.3/get-started-cmake/windows-setup.html.

This installs all the packages required for AWS FreeRTOS ESP32 to work on my Windows path, so from my cmd I can all the commands needed. So after downloading the zip file generated from AWS (https://s3-us-west-2.amazonaws.com/freertos-v202012.00/freertos-1615096093296.zip), I unzipped it on C:\, (it creates a folder called FreeRTOS) then I cd to FreeRTOS folder and execute the next commands from cmd for the ota demo (you choose whichever demo you want to test) .

For building files creation: cmake -DVENDOR=espressif -DBOARD=esp32_devkitc -DCOMPILER=xtensa-esp32 -GNinja -S . -B demos/ota/build

For building and flashing to the ESP32 (it detects automatically the COM port) cmake --build demos/ota/build --target flash

I mentioned ESP-IDF v3.3 as an example. But I can do the same with any ESP-IDF, even the 4.2

So my question is: How could I pass the above commands from vscode-esp-idf-extension?

As far as I understand, VS code is capable to configure CMake commands.

I want to use VSCODE as an IDE for AWS FreeRTOS ESP32 projects. I plan to use an ESP-PROG hardware debugger even, for breakpoints etc.

I know VSCODE is capable to be an IDE for ESP-IDF native examples, and I want to do that with AWS FreeRTOS ESP32.

On their blog freertos-and-vscode they mention this is possible, but it is not that clear.

Would you be kind enough to check this out using vscode-esp-idf-extension, please?

Could you download the zip file from the link I passed above and trying compiling any demo (ota if you want to) from VSCODE UI, please?

Thanks in advance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started with the Espressif ESP32-DevKitC and the ESP ...
To explore how to integrate FreeRTOS modular libraries and demos within your own Espressif ... Follow the steps to Establish Serial Connection with...
Read more >
Getting started with the Espressif ESP32-S2 - FreeRTOS
This tutorial guides you through the following steps: Connect your board to a host machine. Install software on your host machine to develop...
Read more >
First steps - FreeRTOS - AWS Documentation
First steps · Setting up your AWS account and permissions · Registering your MCU board with AWS IoT · Downloading FreeRTOS · Configuring...
Read more >
Getting Started with FreeRTOS - AWS Documentation
This Getting Started with FreeRTOS tutorial shows you how to download and configure FreeRTOS on a host machine, and then compile and run...
Read more >
Getting started with the Espressif ESP32-WROOM-32SE
This reference integration is hosted on the Amazon-FreeRTOS repository which is ... When you reach the Installation Step by Step section of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found