Skip to content

Build_Flags

Mike edited this page Jan 9, 2023 · 5 revisions

PlatformIO Build Flags

These flags are used to tell the KNX Stack what you wantor need.
You can control the behavier and remove not needed components.
You can finde them in your platformio.ini.

NameDescriptionRequired
DBG_TRACE
KNX_BUTTONPin Number for ProgButton
KNX_DEBUG_SERIALSerial where debug logs will be printed. Only if KNX_NO_PRINT is not defined.
KNX_FLASH_OFFSETOffset in Flash where the UserFlash starts. Must be a multiple of 4096
KNX_FLASH_SIZESize of UserFlash. Must be multiple of 4096. Only if USE_RP2040_EEPROM_EMULATION is not defined.
KNX_LEDPin Number for ProgLED. Also used for fatal Error display.
KNX_NO_AUTOMATIC_GLOBAL_INSTANCEStack won't create the knx instance automaticly. You need to create it manually.
KNX_NO_DEFAULT_UARTCreate a knx instance without set KNX_SERIAL.
KNX_NO_SPIDon't include SPI library
KNX_NO_PRINTDon't print debug messages to KNX_DEBUG_SERIAL.
KNX_SERIALSerial to the BCU. Default is platform specific Serial.
KNX_WAIT_FOR_ADDRAfter seeing a L2 packet start, stay in loop until address bytes are received and the AK/NAK packet is sent.
LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONSCore won't provide byteorder functions. Stack provides those already.yes
MASK_VERSIONDefine your Mask Version.yes
NCN5120Implements function to stop the chip.
NO_KNX_CONFIGDon't automaticly include the correct medium for your Mask Version.
PIO_FRAMEWORK_ARDUINO_ENABLE_RTTIRequired for RP2040yes
PROG_BTN_PRESS_MIN_MILLISTime the Prog-Button must be pressed minimal.
PROG_BTN_PRESS_MAX_MILLISTime the Prog-Button must be pressed maximal.
SMALL_GROUPOBJECTReduces the size of each GroupObject from 19 Bytes to 8 Bytes.
USERDATA_SAVE_SIZE
USE_BINSEARCHActivate binary search in GroupAddressTable. Is faster with many different GroupAddresses.
USE_CEMI_SERVERActivates CEMI Server. Required for USE_USB.
USE_DATASECUREActivate support for DataSecure Features.
USE_IPActivate KNX over IP support. Ony if NO_KNX_CONFIG is not defined.
USE_SAMD_EEPROM_EMULATIONActivate EEPROM Emulation
USE_RFActivate KNX over RF support. Only if NO_KNX_CONFIG is not defined.
USE_RP2040_EEPROM_EMULATIONEEPROM Emulation from arduino-pico core (max 4k) can be used.
USE_RP2040_LARGE_EEPROM_EMULATIONA RAM-buffered Flash.
USE_TPActivate KNX over TwistedPair support. Only if NO_KNX_CONFIG is not defined.
USE_USBActivates features to use it as USB Interface. This will automaticly define USE_CEMI_SERVER

KNX_NO_AUTOMATIC_GLOBAL_INSTANCE

By default the Stack will create a knx instance for you with the correct platform.
Sometimes it is a good option to create this instance by your own. (Because you dont want to use a prog button)
Once you added this flag you can create it by adding following line in your main code:

KnxFacade<xxxPlatform,BauXXX> knx;

Clone this wiki locally