Tagged: FreeRTOS Amazon AWS ESP32
January 16, 2019 at 21:22 #23499
I’d like to be able to use VisualGDB with Amazon FreeRTOS on ESP32. Wondering if this is possible.January 16, 2019 at 21:24 #23500
ESP-IDF is already based on FreeRTOS, so no explicit action is required to use it – every project based on ESP-IDF includes a port of FreeRTOS.January 16, 2019 at 23:33 #23504
Thanks, any suggestions on how I could go about importing it into VisualGDB? I tried importing from Amazon FreeRTOS demo’s Makefile to no avail.
Thanks!January 16, 2019 at 23:40 #23505
The Amazon FreeRTOS demo is likely ARM-specific, so you cannot directly import it “as is” into an ESP32-based project.
However you can create a regular project with ESP-IDF (see this tutorial) that will include a special port of FreeRTOS provided by Espressif. You can then call the regular FreeRTOS functions (same as called from the demo) from your main source file.January 17, 2019 at 00:08 #23506
I’m pretty sure Amazon FreeRTOS for ESP32 has its own modified version of the special port of FreeRTOS from Espressif that you mentioned. I believe it also includes a modified ESP-IDF. I’ve run/debugged the demo on my ESP32 board using the xtensa command line tools and openocd without incident. I really like the visual debug capabilities in VisualGDB, however, and would prefer to work in that.
Is there a means for setting my VisualGDB project up so that it would use the ESP-IDF and FreeRTOS provided by Amazon FreeRTOS?
The demo project setup can be found here, it has a Makefile and sdkconfig goodies. I was idealistic and hopedI could just import the project based on these files but after using the ESP-IDF wizard per your suggestion I guess not. If there is a way I could use set up my project to use the FreeRTOS and ESP-IDF that’s in this demo, since it’s Amazon FreeRTOS specific, instead of the ones downloaded by VisualGDB, that would be choice.January 17, 2019 at 00:21 #23507
Thanks for the project link. It looks like the demo project is using a fairly old version of ESP-IDF that might not be compatible with the latest toolchain, or may not work reliably at all.
You can configure VisualGDB to use it by selecting the “import” option in the ESP-IDF selector on the first page of VisualGDB Project Properties. However, as it’s a relatively old ESP-IDF release, it may not work as expected and we would not advise doing that.
You can also import the project into VisualGDB as a regular external embedded project (see this tutorial). VisualGDB will then run the command line specified by you and will not make any assumptions about the project structure.
Generally, we would advise instead using the regular toolchain + ESP-IDF installed by VisualGDB and importing projects into this workflow. This will let you use the combinations of components that were tested together and will reduce the amount of errors you would have to resolve.January 17, 2019 at 00:27 #23508
Thanks, I greatly appreciate the advice and information. It’s a tough call because Amazon FreeRTOS says not to use an ESP-IDF other than theirs! But I’m with you, I would prefer to use the more recent ESP-IDF with its associated fixes (especially the dreadful UART RX FIFO one) as well.
Thanks again, this has been a huge help, very glad I purchased VisualGDB.January 17, 2019 at 00:43 #23509
Sorry about that. Generally, based on our experience with Espressif’s tools, they are very sensitive to the specific toolchain/IDF versions. We had observed strange build-time and runtime errors after using a slightly different toolchain version that Espressif recommends, so we switched to picking up toolchain/IDF combinations recommended by Espressif, running minimal tests on them and shipping them in a way that can be seamlessly used with VisualGDB.
If Amazon is using a different version of the IDF, we would generally advise first importing it as an external embedded project with the toolchain tested by Amazon, using their OpenOCD build (manually configuring it via the “custom gdb stub”) and confirming that everything works. Then you could try replacing some of the components (e.g. OpenOCD) with the ones that come with VisualGDB.
We might be able to support this out-of-the-box once we see a considerable fraction of ESP32 users interested in this setup, however currently maintaining another stack of tools and a separate branch of the Advanced ESP-IDF Project Subsystem specifically for the Amazon FreeRTOS codebase is unfortunately more than we can offer, sorry.January 17, 2019 at 01:02 #23510
Totally understand, thanks so much!
You must be logged in to reply to this topic.