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

No way to add build flags #16

Closed
Kernald opened this issue Aug 6, 2019 · 0 comments · Fixed by #17
Closed

No way to add build flags #16

Kernald opened this issue Aug 6, 2019 · 0 comments · Fixed by #17

Comments

@Kernald
Copy link
Contributor

Kernald commented Aug 6, 2019

Before PlatformIO 4 (I'm not 100% sure it's the actual cause, but it's the likely culprit), passing two build_flags options to the same section of the platformio.ini kind of worked (I guess the last one was overriding the previous ones silently, which wasn't great either), and as a result, doing something like this was an option:

platformio_project(
    name = "test",
    src = "main.cc",
    board = "nodemcuv2",
    environment_kwargs = {
        "build_flags": "-DMQTT_SOCKET_TIMEOUT=60 -DMQTT_KEEPALIVE=60 -DMQTT_MAX_PACKET_SIZE=256 -DSERIAL_SPEED=9600",
    },
    framework = "arduino",
    platform = "espressif8266",
    deps = [
        ...
    ],
)

PlatformIO now (rightfully) complains about build_flags being defined twice - it's indeed defined in the template. It would be nice to have an extension point to those flags.

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

Successfully merging a pull request may close this issue.

1 participant