0

i have been working with platformio for a few weeks now and have been able to create quite a bit for my microcontroller (atmega328p). I have always tried to get away from the Arduino structure. So no “void setup” or “void loop” but simple C. Now I got a ESP8266, which I would like to compile with a C environment. When I create the project now (for the 12E) it asks which framework I should use. I have tried them all by replacing the Arduino setup and loop with the int main(){} function, however it always came up with errors. Does anyone know how I can use a pure C environment for the ESP8266?

kaan5353
  • 67
  • 5
  • Have you read on how to pick and setup the framework you are going to used in [platformio](https://docs.platformio.org/en/latest/frameworks/index.html#frameworks). You will even find the links to examples there. BTW, neither ESP8266 non-os SDK nor ESP8266 rtos exposes `main()` in the user space, it all use internal and only expose a `user_int()` function for you work on, just like Arduino framework, where `setup()` and `loop()` are the functions within a `main()` behind the scene. Having a `main()` is not the reason why you should pick up a language(c++ versus c) or framework. – hcheung Apr 26 '22 at 03:02
  • Don't tag `arudion-esp8266` when you have no intention to use the `Arduino` framework. – hcheung Apr 26 '22 at 03:04

0 Answers0