builder
¶Optional | Type: String
Override default PlatformIOLibBuilder
with another builder. Currently supported
builders:
PlatformIOLibBuilder
(default)
ArduinoLibBuilder
MbedLibBuilder
Custom macros/defines
"build": {
"flags": "-D MYLIB_REV=1.2.3 -DRELEASE"
}
Extra includes for C preprocessor
"build": {
"flags": [
"-I inc",
"-I inc/target_x13"
]
}
Force to use C99
standard instead of C11
"build": {
"unflags": "-std=gnu++11",
"flags": "-std=c99"
}
Build source files (c, cpp, h
) at the top level of the library
"build": {
"srcFilter": [
"+<*.c>",
"+<*.cpp>",
"+<*.h>"
]
}
Extend PlatformIO Build System with own extra script
"build": {
"extraScript": "generate_headers.py"
}
generate_headers.py
Import('env')
# print(env.Dump())
env.Append(
CPPDEFINES=["HELLO=WORLD", "TAG=1.2.3", "DEBUG"],
CPPPATH=["inc", "inc/devices"]
)
# some python code that generates header files "on-the-fly"