Page 1 of 1

include mcpwm.h in header file

Posted: Sun May 24, 2020 8:05 pm
by kyrpav
I have esp-idf 4.2 with eclipse i am trying to create c++ project. and installed esp plugin in eclipse.

My classes work properly but i can not include in .h file components like mcpwm.h
in general i can not include whatever is under /driver/

Re: include mcpwm.h in header file

Posted: Sun May 24, 2020 9:55 pm
by PeterR
Bump you're post! best not to ad a duplicate ;)
I was wrong earlier, you have to "driver/xxxxx' or 'driver/include/xxxx', whatever, you can work that out.
So maybe your search paths are wrong.
Most IDF stuff is in directory 'compenent-x/include' where as you are in 'driver/xxx' or whatever (see above).
Google you're tool's search paths setup, blat all combos then roll back. Then you will know.
EDIT: I never know how may ../ I need to add. So many IDEs! Just go for it then binary chop. Unless you can find a succient guide.

Re: include mcpwm.h in header file

Posted: Sun May 24, 2020 10:35 pm
by kyrpav
i can do "driver/mcpwm.h" in cpp but in .h there is not anything like this in under "d...."

When you setup eclipse with esp-idf plugin the preferences are not the same so you can not go and include more paths.

i have to go like this to find it

Code: Select all

#include "../../../../../../../Programs/esp/esp-idf/components/driver/include/driver/mcpwm.h"
so i suppose there is something that it is not ok in my paths but how do i fix it.

It seems that in .h file Eclipse start somewhere deep in .espressif folder but in .cpp file it has also components/drivers/include folder to start.