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

Dynamic variables/templates for use in platformio.ini #705

Closed
sticilface opened this Issue Jun 24, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@sticilface
Contributor

sticilface commented Jun 24, 2016

I'd like to define some variables that are constant between about 6 [env]. is this possible...

something like

[platformio]
src_dir = ./MyMelvanimate ; keeps arduino happy :)
data_dir = ./MyMelvanimate/data
env_default = esp12e-debug
test_var='-lstdc++ -Wl,-Tesp8266.flash.4m.ld -lc -I"/Users/amelvin/Arduino/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" -L"/Users/amelvin/Arduino/esp8266/tools/sdk/libc/xtensa-lx106-elf/lib"'

then later

[env:debug]
platform = espressif
framework = arduino
board = esp12e
;build_flags = -lstdc++ -Wl,-Tesp8266.flash.4m.ld -lc -I"/Users/amelvin/Arduino/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" -L"/Users/amelvin/Arduino/esp8266/tools/sdk/libc/xtensa-lx106-elf/lib" ;   -DDebug_ESPManager -DDEBUG_ESP_PORT=Serial -DDebugUDP ; -DDebugMelvanimate ;-DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI
build_flags = $test_var; -lstdc++ -Wl,-Tesp8266.flash.4m.ld
board_flash_mode = qio
board_f_cpu = 160000000L
board_f_flash = 80000000L
lib_install = 13, 547, 89 ; 64 = arduinojson
upload_port = 192.168.1.70 ; nodemcu

@sticilface sticilface closed this Jun 24, 2016

@ivankravets ivankravets reopened this Jun 24, 2016

@ivankravets ivankravets self-assigned this Jun 24, 2016

@ivankravets ivankravets added the feature label Jun 24, 2016

@ivankravets ivankravets added this to the 3.0.0 milestone Jun 24, 2016

@sticilface

This comment has been minimized.

Show comment
Hide comment
@sticilface

sticilface Jun 24, 2016

Contributor

thats great cheers. Was a question so moved it to the forum.

Contributor

sticilface commented Jun 24, 2016

thats great cheers. Was a question so moved it to the forum.

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Jun 24, 2016

Member

Why did you close this issue? That is a great feature for PaltformIO 3.0. I had the same idea 👍

Now, it should be 100% implemented.

Member

ivankravets commented Jun 24, 2016

Why did you close this issue? That is a great feature for PaltformIO 3.0. I had the same idea 👍

Now, it should be 100% implemented.

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Jun 24, 2016

Member

I propose a next format of dynamic variables:

[common]
build_flags = -DHELLO -Icustom/inc

[env:uno_debug]
build_flags = -DDEBUG ${common.build_flags}

[env:uno_release]
build_flags = -DRELEASE ${common.build_flags}
Member

ivankravets commented Jun 24, 2016

I propose a next format of dynamic variables:

[common]
build_flags = -DHELLO -Icustom/inc

[env:uno_debug]
build_flags = -DDEBUG ${common.build_flags}

[env:uno_release]
build_flags = -DRELEASE ${common.build_flags}

@ivankravets ivankravets changed the title from Is it possible to use variables in platformio.ini? to Dynamic variables/templates for use in platformio.ini Jun 24, 2016

@ivankravets ivankravets referenced this issue Jun 24, 2016

Closed

PlatformIO 3.0 Roadmap #423

28 of 37 tasks complete
@sticilface

This comment has been minimized.

Show comment
Hide comment
@sticilface

sticilface Jun 25, 2016

Contributor

This looks great:)

Contributor

sticilface commented Jun 25, 2016

This looks great:)

@itsjustvenky

This comment has been minimized.

Show comment
Hide comment
@itsjustvenky

itsjustvenky Jun 26, 2016

Yes.. this is really a nice idea.a great feature indeed

itsjustvenky commented Jun 26, 2016

Yes.. this is really a nice idea.a great feature indeed

@ivankravets ivankravets modified the milestones: 3.0.0, 3.0 Aug 30, 2016

@ivankravets ivankravets modified the milestones: 3.0, 3.1.0, 3.2.0 Sep 10, 2016

@ivankravets

This comment has been minimized.

Show comment
Hide comment
Member

ivankravets commented Sep 17, 2016

@raymusmunt

This comment has been minimized.

Show comment
Hide comment
@raymusmunt

raymusmunt commented Sep 17, 2016

Works great @ivankravets

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets
Member

ivankravets commented Sep 17, 2016

ivankravets added a commit that referenced this issue Sep 19, 2016

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