So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By bvn123
#95774 When implementing some functions on microcontrollers, for example, a pulse generator, I roughly imagine
- maximum pulse frequency for selected Fck (when use assembler OR C in different IDEs (IAR EWB; GCC and XC8 compilers in Microchip Studio), OR Arduino);
- the ratio of the code size that I will get by writing a program in assembler, in C in different IDEs and in Arduino.

QUESTION:
Is it possible to compare IDEs for ESP8266\ESP32 in this regard? Arduino, Eclipce with TDM-GCC and MinGW, PlatformIO, something else...
The same pulse generator: which IDE and compiler will provide
- maximum pulse frequency
and
- minimum code size?

Or, for example, ESP8266 doesn't provide I2C hardware interface, which IDE+compiler provide max speed for software I2C?

Maybe there were articles on such a comparison with the results?
User avatar
By bvn123
#95822 I installed Arduino & Eclipse+ESP_NONOS_SDK+MinGW+GCC and checked simple program to set a pin continuously on|off without delays (only cycle command: while(1) for eclipse and loop() for arduino.
arduino: period 10us, pulse 1.8us
eclipse: period 0.7us, pulse 1.2us
Code size is not so different.
Arduino: very friendly IDE, very slow execution (loop() for example)
Eclipse (or any other IDE?)+library (SDK or API)+GCC: it was hard to setup and start to work but it provides efficient code; there is weak support to solve some problems as in Eclipse, so as in makefile organization and errors when compiling in GCC.
The answers in other forum: there is no alternative for ESP8266, ESP32 - only GCC compiler is used in any IDE. Is it so?
May be some other IDE is more friendly then Eclipse as for support and connecting all these libs, compiler,...?
User avatar
By davydnorris
#96034 The thing is, all these environments you've mentioned use the same compiler under the hood - the GCC cross compiler. So then it comes down to how the particular GCC compiler toolchain for that environment has been built and its version, and how the supplemental code for the libraries you're using has been written.

There are other environments, such as Micropython, NodeMCU/Lua and Sming that are interpreted and they will all be a little slower than natively compiled applications, but some of them are very quick.