Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for include folder in a project #1107

Closed
ivankravets opened this issue Oct 5, 2017 · 6 comments
Closed

Add support for include folder in a project #1107

ivankravets opened this issue Oct 5, 2017 · 6 comments
Milestone

Comments

@ivankravets
Copy link
Member

ivankravets commented Oct 5, 2017

  • Describe in documentation
  • Automatically add include_dir value to CPPAPTH before building

http://docs.platformio.org/en/latest/projectconf/section_platformio.html#include-dir

@ivankravets ivankravets added this to the 3.5.0 milestone Oct 5, 2017
@ivankravets ivankravets changed the title Add support for inc folder in a project Add support for include folder in a project Dec 14, 2017
@ivankravets
Copy link
Member Author

Resolved via ca8bc38

ivankravets added a commit that referenced this issue Dec 28, 2017
… issue #1236, issue #1235, issue #953, issue #1118, issue #1107, issue #1196, issue #1179, issue #1161, issue #1126, issue #104, issue #1033, issue #1034, issue #1175, issue #1173, issue #1155, issue #1188, issue #1111, issue #1153, issue #1150, issue #1145, issue #1139, issue #1137, issue #1170, issue #1157, issue #1102, issue #1105, issue #1140, issue #1154, issue #1066, issue #1038, issue #1054, issue #1055, issue #1061, issue #1017)
@ussserrr
Copy link

What is purpose of this change? I actually opened my 2-month-ago project and just can't compile it ('not found' error). Only with option include_dir = inc compilation was successful.

@ivankravets
Copy link
Member Author

This is the folder which will be automatically added to CPPPATH.
Default value is include.

You rename your inc folder to include and remove that extra option

@KubaMiszcz
Copy link

KubaMiszcz commented Apr 13, 2018

I have project exported from CubeMX, and it generates Inc where it keeps .h files

after add include_dir = Inc below framework = stm32cube in platformio.ini it still throws error: src\main.c:41:10: fatal error: main.h: No such file or directory

for me making a symlink inside root projectfolder: mklink /d Include Inc (inside root) helps

it is better than rename Inc to Includes after every regenerate project in CubeMX

@ussserrr
Copy link

@KubaMiszcz you should add include_dir option below dedicated [platformio] section of platformio.ini:

...

[platformio]
include_dir = Inc

See docs for more information.
For me, I preferred to write a small python utility that automate creation and updating PlatformIO projects with CubeMX: stm32pio. It also handles Inc and Include cases.

@KubaMiszcz
Copy link

youre right, it works perfectly, I missed this [platformio] tag, but it should be more clearly marked in Docs :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants