Programming in C++ and using esp_wifi

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Programming in C++ and using esp_wifi

Postby kolban » Sat May 26, 2018 4:51 am

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
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Mahmoud Omar
Posts: 5
Joined: Sat May 26, 2018 12:35 am

Re: Programming in C++ and using esp_wifi

Postby Mahmoud Omar » Sat May 26, 2018 3:43 pm

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....

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Programming in C++ and using esp_wifi

Postby kolban » Sun May 27, 2018 4:17 am

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Mahmoud Omar
Posts: 5
Joined: Sat May 26, 2018 12:35 am

Re: Programming in C++ and using esp_wifi

Postby Mahmoud Omar » Sun May 27, 2018 4:19 pm

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?

Mahmoud Omar
Posts: 5
Joined: Sat May 26, 2018 12:35 am

Re: Programming in C++ and using esp_wifi

Postby Mahmoud Omar » Sun May 27, 2018 4:22 pm

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.

azz-zza
Posts: 45
Joined: Tue Sep 17, 2019 2:58 am

Re: Programming in C++ and using esp_wifi

Postby azz-zza » Thu Sep 19, 2019 3:33 am

Angus, Kolban,
thank you. very usefull discussion and information.

Who is online

Users browsing this forum: No registered users and 95 guests