How to add header and source files to project

Posts: 2
Joined: Wed Feb 19, 2020 2:41 pm

How to add header and source files to project

Postby christian28 » Fri Feb 21, 2020 2:51 pm

Hi all
I'm using eclipse and an esp32 wroom module.

I already setup the environment.
For simple projects like blink example and hello world example it's no problem to build, flash and debug. This works very fine.

Only problem is how to add header and sourcefiles?
As example: I want to write a mathfunction in another file and call the function from main. Eclipse always says that theres no reference. Please see attached files.

Best regards
(190 Bytes) Downloaded 28 times
(157 Bytes) Downloaded 25 times
(98 Bytes) Downloaded 29 times

User avatar
Posts: 272
Joined: Sat Oct 01, 2016 9:05 am

Re: How to add header and source files to project

Postby ESP_krzychb » Fri Feb 21, 2020 9:46 pm

Hi christian28,

Do you have "CMakeLists.txt" files in your project?
Is "test_header.c" included in "CMakeLists.txt" in your "main" folder?

I think the safest way to start a new project is by going to File > New > Espressif IDF Project. This will set the key files for you. Then add your extra files and update CMakeLists.txt.

Please check ... r/examples how this is done for small typical projects or see formal description in ... le-project.

Who is online

Users browsing this forum: No registered users and 3 guests