Skip to content

Feature request: Dump env vars: arduino-cli setenv --fqbn my:precious:board #77

@marcond

Description

@marcond

I'm just testing arduino-cli and I think it's GREAT. It will simplify so many things.

When I went to test a bootloader I'm working on, I missed an option to output a proper set of environment vars for compilation, matching a given architecture. Something generating an output like this:

$ arduino-cli setenv --fqbn arduino:avr:uno
           -- or --
$ arduino-cli config dump --fqbn arduino:avr:uno
# Vars for arduino:avr:uno
# Generated by arduino-cli-0.3.1-alpha.preview
AVR_GCC_HOME=~/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2
export AVR_GCC_HOME
PATH=$AVR_GCC_HOME/bin:$PATH
export PATH
MCU=atmega328p
export MCU
F_CPU=16000000L
export F_CPU
INCLUDES=~/.arduino15/packages/arduino/hardware/avr/1.6.23/cores/arduino:~/.arduino15/packages/arduino/hardware/avr/1.6.23/variants/standard
export INCLUDES
# ....and so on....

So I could just arduino-cli setenv --fqbn arduino:avr:uno >myvars.sh and then . myvars.sh afterwards. VERY handy.

I could hack something around this, but I'm lacking free time for some weeks.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions