Code building of ESP32

Deepak saini
Posts: 4
Joined: Wed Jan 15, 2020 6:05 am

Code building of ESP32

Postby Deepak saini » Wed Jan 15, 2020 6:26 am

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

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Code building of ESP32

Postby ESP_Sprite » Wed Jan 15, 2020 9:05 am

Have you read the docs already?

Deepak saini
Posts: 4
Joined: Wed Jan 15, 2020 6:05 am

Re: Code building of ESP32

Postby Deepak saini » Wed Jan 15, 2020 12:16 pm

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

Deepak saini
Posts: 4
Joined: Wed Jan 15, 2020 6:05 am

Re: Code building of ESP32

Postby Deepak saini » Fri Jan 17, 2020 7:22 am

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..........
Last edited by Deepak saini on Tue Jan 21, 2020 9:42 am, edited 1 time in total.

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Code building of ESP32

Postby ESP_Sprite » Sun Jan 19, 2020 9:34 am

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.

Who is online

Users browsing this forum: No registered users and 13 guests