Page 1 of 1

Code building of ESP32

Posted: Wed Jan 15, 2020 6:26 am
by Deepak saini
Hello ESP Team,
I am new on ESP platform and first time I am working on ESP device. I am using ESP32 for our project. I have configured complete setup of toolchain and build system and could able to compile and build example code. But I am compiling our older code having multiple of .h and .c files(used SWD,UART,TCP) but it failed to build and it was written in past by someone else. This code base is only having source files and hex files and not having CMakef files, components, make,tools etc. as in given example folder. I can't able to compile an build my code.
I am having some questions like: do i need to create a new CMake file to compile if yes then how to create it? Do we need components folder? What are the necessary things to compile a code for ESP32 environment???

Please tell me the necessary steps how can i compile this code.


Thanks & Regards
Deepak

Re: Code building of ESP32

Posted: Wed Jan 15, 2020 9:05 am
by ESP_Sprite
Have you read the docs already?

Re: Code building of ESP32

Posted: Wed Jan 15, 2020 12:16 pm
by Deepak saini
Hi..
Thanks for sharing this link. I have gone through this link and tried to compile as reference from "blink example". Now my build fails during generation of bootloader .bin.
I am attaching my build log file.
log.txt
(20.27 KiB) Downloaded 708 times

Re: Code building of ESP32

Posted: Fri Jan 17, 2020 7:22 am
by Deepak saini
Hello.
Waiting for answer.
Also my second query is how can i add lib in component folder under ESP-idf. I wanted to add libesphttpd and linSWD. As forum suggested simply put this lib under component folder of esp-idf and you can this added lib by "menuconfig". I tried this multiple times but newely added file is not showing in menuconfig. Is there any other method for this.

Please help waiting..........

Re: Code building of ESP32

Posted: Sun Jan 19, 2020 9:34 am
by ESP_Sprite
That works for libraries that are actually intended for use as esp-idf components. If they're not (and yours don't seem to be), you need to add the required plumbing to have esp-idf compile the library yourself. Again, see the link I posted earlier for info on how to do that.