I'm co-founder of a startup building a new IDE for microcontrollers: Embeetle IDE. We would like to support the ESP32 microcontroller family in our IDE.
Unfortunately, I'm running into a problem. To create a first ESP32-based sample project for our IDE, I was observing the build-output at maximal verbosity in the Arduino IDE. It occurred to me that a lot of precompiled libraries (archives) are being used:
In Embeetle, we try to avoid precompiled libraries. You see, they break the code navigation. If a user clicks on a function call, he expects to jump to the function definition. If that function is defined in a precompiled library - the code navigation doesn't work.
Where can I find the source code for all these precompiled libraries?
Thank you for your help.
Kind regards,
Kristof Mulier
Where to find the archives source code?
-
- Posts: 9770
- Joined: Thu Nov 26, 2015 4:08 am
Re: Where to find the archives source code?
Those are (mostly) esp-idf libraries; the sources are in esp-idf. See e.g. here for how they get built.
-
- Posts: 831
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Where to find the archives source code?
You may want to look at how platform.io handles this. They have two mechanisms for building arduino- using pre-compiled libraries from arduino-esp32, and building from esp-idf source + arduino-esp32 source. If you can use their python scripts it may save you a lot of duplicated effort.
Note that you won't be able to get away from some pre-compiled libraries, as the hardware drivers are not open source, so you will need some way to incorporate headers to provide those symbols.
Note that you won't be able to get away from some pre-compiled libraries, as the hardware drivers are not open source, so you will need some way to incorporate headers to provide those symbols.
Re: Where to find the archives source code?
Thank you @ESP_Sprite and @Ibernstone for the link and the useful information.
First I'd like to support the Arduino-based ESP32 projects in our Embeetle IDE. I've more knowledge about Arduino IDE than Platform IO, as I've built an importer for Arduino projects some time ago (this importer transforms an Arduino sketch file into a self-contained C/C++ makefile-based project, such that it can be opened in Embeetle). That being said, I will look into the Platform IO solution also, later on, to discover how they approached all of this.
The Arduino IDE generates this `sdkconfig` file in its cache:
```
~/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/sdkconfig
```
It sits right next to the folder where all the precompiled libraries are stored! So it must be related to them. If I create a "hello-world" project with the ESP-IDF tool, and I replace the default `sdkconfig` file in that "hello-world" project with the one from Arduino, then I can do a full-verbosity build and see *exactly* how the precompiled libraries from Arduino are being built.
Is this theory correct?
If yes, I have one more question. For a given target chip/board (eg. the `ESP32 PICO KIT` I'm using now), will this `sdkconfig` file that I located in the Arduino cache always be the same? This is important to know if I ever build an ESP32-Arduino-sketch importer for Embeetle IDE. You see, if I can assume that the `sdkconfig` file used by Arduino IDE is stable for a specific target chip/board, then that would make the construction of such an importer much simpler.
First I'd like to support the Arduino-based ESP32 projects in our Embeetle IDE. I've more knowledge about Arduino IDE than Platform IO, as I've built an importer for Arduino projects some time ago (this importer transforms an Arduino sketch file into a self-contained C/C++ makefile-based project, such that it can be opened in Embeetle). That being said, I will look into the Platform IO solution also, later on, to discover how they approached all of this.
The Arduino IDE generates this `sdkconfig` file in its cache:
```
~/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/sdkconfig
```
It sits right next to the folder where all the precompiled libraries are stored! So it must be related to them. If I create a "hello-world" project with the ESP-IDF tool, and I replace the default `sdkconfig` file in that "hello-world" project with the one from Arduino, then I can do a full-verbosity build and see *exactly* how the precompiled libraries from Arduino are being built.
Is this theory correct?
If yes, I have one more question. For a given target chip/board (eg. the `ESP32 PICO KIT` I'm using now), will this `sdkconfig` file that I located in the Arduino cache always be the same? This is important to know if I ever build an ESP32-Arduino-sketch importer for Embeetle IDE. You see, if I can assume that the `sdkconfig` file used by Arduino IDE is stable for a specific target chip/board, then that would make the construction of such an importer much simpler.
Who is online
Users browsing this forum: Google [Bot] and 55 guests