Page 2 of 2

Re: Programming in C++ and using esp_wifi

Posted: Sat May 26, 2018 4:51 am
by kolban
One options for consideration is using Arduino as a component in an ESP32 ESP-IDF application ... see the following:

https://github.com/espressif/arduino-es ... mponent.md

Re: Programming in C++ and using esp_wifi

Posted: Sat May 26, 2018 3:43 pm
by Mahmoud Omar
Thank you for the link.
I did everything and i get the following message in eclipse.

Code: Select all

make[1]: *** No rule to make target 'C:/msys32/home/Mahmoud/esp/trial/main/main.c', needed by 'main.o'.  Stop.
make: *** [C:\msys32\home\Mahmoud\esp\esp-idf/make/project.mk:467: component-main-build] Error 2
make: *** Waiting for unfinished jobs....

Re: Programming in C++ and using esp_wifi

Posted: Sun May 27, 2018 4:17 am
by kolban
Ive seen a similar message when trying to rename main.c to main.cpp. For me, the result was to remove the local build directory and rebuild all and then it "magically" worked.

Re: Programming in C++ and using esp_wifi

Posted: Sun May 27, 2018 4:19 pm
by Mahmoud Omar
I did the steps in your creating C++ application and it worked with me. Thank you very much.
The thing is that i now have the ESPNOW code with arduino in C++ and i need to add SPI Slave code in the the same code.
the spi slave is in c and when the structs are initializing it returns

Code: Select all

unimplemented: non-trivial designated initializers not supported
i removed the "." and replaced = with : and yet the same problem
How can i overcome this problem?

Re: Programming in C++ and using esp_wifi

Posted: Sun May 27, 2018 4:22 pm
by Mahmoud Omar
Also if there is a way to use the SPI slave code in arduino IDE it would be great.
because the only example i can find is for ESP8266 and it doesn't work with the ESP32.

Re: Programming in C++ and using esp_wifi

Posted: Thu Sep 19, 2019 3:33 am
by azz-zza
Angus, Kolban,
thank you. very usefull discussion and information.