Hello,
Sorry for the basic question. I've ran through some of the examples with no troubles, but would like to add some of my own functionality in separate c files so I don't have one big long source file. How do go about adding my own files to a project? Do I have to update a make file somewhere?
Sorry for the basic question. Just getting going with the ESP32, but having fun
Thanks,
Oc.
Multipe C files - Update make?
Re: Multipe C files - Update make?
If you are using the ESP-IDF build system and the template application, you should find a folder called "main" in your project. Create your new source files in that directory with the file suffix of ".c". Now when you run the existing build / make, your new source files will be automatically compiled and linked. It appears that the build system will compile all source files in main that end in .c or .cpp and link them together for you. There is more that can be said on this topic but I'm hoping that this answers the core question.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Multipe C files - Update make?
Hi Kolban.
Thanks for the reply. Yep, looks like you are correct I've just added a couple of new .c / .h files and everything seems to link and work OK.
.....well that was easy
Yes, I'm just working with the ESP-IDF build system.
Thanks.
Thanks for the reply. Yep, looks like you are correct I've just added a couple of new .c / .h files and everything seems to link and work OK.
.....well that was easy
Yes, I'm just working with the ESP-IDF build system.
Thanks.
Who is online
Users browsing this forum: Google [Bot] and 92 guests