What languages the code is translated by the compiler until reach the ESP32? I need a reference

"The IDE does some pre-processing, compiles the C++ code and links it with some libraries to produce an executable binary for the ESP32" is standard software engineering, and I don't understand why it needs a "source" any more than an explanation of how your desktop computer actually works. It's a level of depth that is unnecessary to discuss unless your thesis is specifically ABOUT the code generation process.

1 Like

Feel free to use directly without reference - this is quite common knowledge scattered probably in many books about compilation theory.

If you need help on some words - feel free to say so. We all learnt it from someone or somewhere.

In my software engineering school - decades ago - our teacher had us write a compiler for a simple limited language. That was a good exercise to anchor the various steps from text analysis to binary language generation.

We also wrote a minimal multitasking OS for the generated codes.

This definitely helps visualize the steps and firmed up the knowledge and makes you appreciate the power of today’s tools

PS:

I’m French - my English is probably influenced by this and may be it’s more accessible to non native speakers may be at the cost of few grammatical or linguistic errors here and there :slight_smile:

2 Likes

The energy distributor should only provide 127/220V 60Hz (at least here, maybe there it is different). If there are interferences, it could damage devices

Maybe.

I can justify that based on my graduation too...

I just want to prove I didn't base only in that, know? Because we don't learn Arduino here (unfortunately). Everything we can learn about Arduino are from projects, events or some optional subjects not everyone is aware of. I hate this.

There is nothing from Arduino in what you want to go deeper into. The build procedure to assemble program from the C source code is the same on Arduino, on a PC, and on Android...
And I agree with @westfw - if you are not studying to be a systems programmer, but work with Arduino as an engineer - this knowledge is completely unnecessary for you.

There are ALWAYS harmonics of the 60Hz power. It is the power level of those harmonics that may cause damage. You won't see the harmonics until you get three-phase power running large electric motors. Those motors could be miles away from your location and are being fed back through the power distribution system. Or they could be in the same building as you are in.

wow

Hi @Marcos_Alexandre_de_Jesus_Gomes

Here is the reference for the Arduino-specific part of the process:

https://arduino.github.io/arduino-cli/latest/sketch-build-process/

After that, it is handed off to the standard C/C++ compiler toolchain, typically a build of GCC for the architecture of the target board ("xtensa-esp32-elf-gcc" if you are targeting a board based on the classic ESP32 microcontroller).

The specific commands that are used to run the compiler are configured by the "patterns" (templates) in the platform.txt configuration file of the "esp32" boards platform:

In case you are interested in learning about the Arduino boards platform framework, it is documented here, but I think that is well out of scope for your thesis.

After that, there is nothing more that is Arduino-specific about the process and so you can use any references for GCC and C/C++ compilers in general.