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

platformio deplibs with extra_script #692

Closed
wuwx opened this issue Jun 12, 2016 · 2 comments
Closed

platformio deplibs with extra_script #692

wuwx opened this issue Jun 12, 2016 · 2 comments
Assignees

Comments

@wuwx
Copy link

wuwx commented Jun 12, 2016

I have manage a project with platform, the project struct like this:

src:
  user_main.c
lib:
  hello
    hello.c
    hello.h

user_main.c:

    #include "hello.h"
    void user_init(void)
    {
        printf("Hello\r\n");
    }

platformio.ini:

    extra_script = extra_script.py

extra_script.py:

    env.Append(

        CPPPATH=[
           join("$PROJECT_DIR", "sdk", "include"),
        ]
    )

but when i use pio run build the project, lib/hello doesn't include sdk/include path

but user_main.o include sdk/include

it seems lib directory can't support extra_script

how can i fix it, thanks

@ivankravets
Copy link
Member

This is not possible with PlatformIO 2.0. PlatformIO builds libraries in isolated environments. You will be able to use extraBuildFlags in PlatformIO 3.0.

Temporary solution is to use build_flags = -I$PROJECT_DIR/sdk/includes

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

2 participants