Code generation

I have a code generator in my project (written in Python), which goes through all the source files, collects some information, and generates some additional code. It may (re)place some code inline, and insert other derived info into a separate source file which is also part of the project. This setup must run before compiling the project.

I’m looking for a way to get the list of all source files which will be used to generate the final app, run the code generator logic on those files, and then let PIO proceed with the build.

The code generator does not generate new files, i.e. the file dependency graph does not change, and it’s clever enough not to alter a source file if nothing inside needs to be adjusted.

It would be very useful if I can avoid running the code generator on source files (all inside the project directory) which are not included in the current build. I.e. if a specifc [env:...] doesn’t use files from say lib/xyz/..., then the code generator should not process them, to avoid collecting information and generating table info which is not used in that specific build.

So my question is whether there’s a clean way to tap into PIO’s (or SCons’s) dependency information, and run custom code after the build set is known, but before PIO launches compile & link commands. I’ve been looking at pre/post advanced scripting, but don’t have enough experience with it yet to plot a path forward.

In the past, I’ve used make with gcc’d .d file dependency generation to (somewhat painfully and imprecisely) collect the set of files, before running PIO do perform the actual build. But I’d much prefer to add all the logic to PIO to simplify the workflow and reduce dependencies on other tools.

Update - A follow-up Q is whether advanced scripting can be used with pio test. I noticed that by default the scripts only get activated with pio run.

More … - Here’s some of the output from pio test -e native -v:

g++ -o .pio/build/native/program .pio/build/native/test/native/basic.o .pio/build/native/test/native/doctest.o .pio/build/native/test/native/flow.o .pio/build/native/test/native/gpio.o .pio/build/native/test/native/hier.o .pio/build/native/test/native/mem.o .pio/build/native/test/native/types.o .pio/build/native/test/native/vecof.o .pio/build/native/test/tmp_pio_test_transport.o -L.pio/build/native .pio/build/native/libUnityTestLib.a
Testing…

That final g++ call links everything together. If PIO can provide that list of the sources from which this link step was generated, and do so before any compiles start, then that would be enough to support code generation (the headers are easy to find from the .cpp source files themselves).

3 Likes

Very interesting question.

We are in a similar position at Embeetle IDE: to integrate PIO properly into Embeetle, we need to know which source files will be built for a specific environment.

The $ pio run --target compiledb command can be helpful. It dumps a json file at:

<project>/.pio/build/<environment-name>/compile_commands.json

For An Arduino Uno, I got this:

[
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/CDC.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/CDC.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/CDC.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial0.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial0.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial0.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial1.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial1.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial1.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial2.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial2.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial2.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial3.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial3.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial3.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/IPAddress.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/IPAddress.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/IPAddress.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/PluggableUSB.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/PluggableUSB.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/PluggableUSB.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/Print.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/Print.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/Print.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/Stream.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/Stream.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/Stream.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/Tone.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/Tone.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/Tone.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/USBCore.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/USBCore.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/USBCore.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/WInterrupts.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/WInterrupts.c",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/WInterrupts.c"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/WMath.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/WMath.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/WMath.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/WString.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/WString.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/WString.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/abi.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/abi.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/abi.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/hooks.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/hooks.c",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/hooks.c"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/main.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/main.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/main.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/new.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/new.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/new.cpp"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring.c",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring.c"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_analog.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_analog.c",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_analog.c"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_digital.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_digital.c",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_digital.c"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-as -x assembler-with-cpp -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -o .pio/build/uno/FrameworkArduino/wiring_pulse.S.o /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.S",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.S"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_pulse.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.c",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.c"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_shift.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard /home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_shift.c",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_shift.c"
    },
    {
        "command": "/home/kristof/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/src/main.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p -DPLATFORMIO=50203 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -Iinclude -Isrc -I/home/kristof/.platformio/packages/framework-arduino-avr/cores/arduino -I/home/kristof/.platformio/packages/framework-arduino-avr/variants/standard src/main.cpp",
        "directory": "/home/kristof/pio_projects/my_project",
        "file": "/home/kristof/pio_projects/my_project/src/main.cpp"
    }
]

Hope this helps.

Aha, that’s definitely a step in the right direction. I’ll look into it, thank you.

1 Like