Got some question about where I should put header file in the folder and how to include it in the user_main.c file, based on the ESP8266 RTOS SDK.
I want to wire a module, similar as RTOS_SDK/examples/project_template/sample_lib, what I did as follow:
1. copy the contents of RTOS_SDK/examples/project_template to a fold (named p1) with same level as RTOS_SDK 2. put all my .c files to p1/sample_lib 3. check the lib name in p1/sample_lib/Makefile as libsample.a 4. check the folder name and lib name in the file of p1/Makefile 5. put my .h file sample.h directly into p1/include 6. include the header file in user_main.c by using #include "sample.h" 7. compile and download successfully.
The question is that the structure is not clear. With more than one header files, there will be a lot of header files in p1/include without any clue of which c files they linked to. So I would like to put header files in p1/include/sample_lib or p1/sample_lib/include, but I don't know how to make the compiler happy by modify the Makefile or other files, and how to include it in user_main.c. I tried include it by using #include "sample_lib/sample.h" but no luck.