Compilation flags for optimization - sigfox-tech-radio/sigfox-ep-lib GitHub Wiki

Most of Sigfox radio parameters and features are conditioned to a dedicated flag, so that the stack can be configured to perfectly match your application, without dead code and thus with a minimum memory footprint. The flags are taken from the sigfox_ep_flags.h file which you can create from the provided template or generate with cmake when building the project (see section How to add Sigfox library to your project).

To have such a flexibility, the stack uses a lot of preprocessor directives, which makes the source code less readable. If you plan to look or modify the source files, we advise you to run the cmake pre-compilation command, that will remove all preprocessor directives according to your flags selection (see section Precompiled source code).

Below is the list of available flags.

Flag name Value Description
SIGFOX_EP_RCx_ZONE undefined / defined Support the RCx radio configuration if defined.
SIGFOX_EP_APPLICATION_MESSAGES undefined / defined Support uplink application messages if defined.
SIGFOX_EP_CONTROL_KEEP_ALIVE_MESSAGE undefined / defined Support uplink control keep alive message if defined.
SIGFOX_EP_BIDIRECTIONAL undefined / defined Support bidirectional procedure (downlink) if defined. Only applicable to application messages. Otherwise all messages will be uplink only.
SIGFOX_EP_ASYNCHRONOUS undefined / defined Asynchronous mode if defined, blocking mode otherwise.
SIGFOX_EP_LOW_LEVEL_OPEN_CLOSE undefined / defined Enable MCU and RF open/close functions if defined.
SIGFOX_EP_REGULATORY undefined / defined Enable radio regulatory control (DC, FH or LBT check) if defined. See note below and state machine
SIGFOX_EP_LATENCY_COMPENSATION undefined / defined Enable radio latency compensation to improve MCU timers accuracy.
SIGFOX_EP_SINGLE_FRAME undefined / defined Send 1 frame per message (N=1) if defined. Otherwise number of frames per message is dynamically given when sending a message (N=1, 2 or 3).
SIGFOX_EP_UL_BIT_RATE_BPS undefined / 100 / 600 If defined, give the only uplink bit rate supported (100bps or 600bps depending on the RC). Otherwise, value is dynamically given when sending a message.
SIGFOX_EP_TX_POWER_DBM_EIRP undefined / <tx_power_dbm_eirp> If defined, give the only TX power supported by the radio. Otherwise the value is dynamically given when sending a message.
SIGFOX_EP_T_IFU_MS undefined / <t_ifu_ms> If defined, give the fixed inter-frame delay used between uplink frames of a same message (0 to 2000ms). Value 0 disables the delay and associated timers to optimize memory space. Otherwise value is dynamically given when sending a message.
SIGFOX_EP_T_CONF_MS undefined / <t_conf_ms> If defined, give the fixed delay between downlink frame reception and uplink confirmation message (1400 to 4000ms). Otherwise value is dynamically given when sending a message.
SIGFOX_EP_UL_PAYLOAD_SIZE undefined / <ul_payload_size> If defined, give the only uplink payload length supported (0 to 12). Value 0 enables the bit 0, bit 1 and empty messages. Otherwise, all uplink payload lengths are dynamically supported.
SIGFOX_EP_AES_HW undefined / defined If defined, enable hardware AES through MCU API function. Otherwise the embedded driver from TI is used.
SIGFOX_EP_CRC_HW undefined / defined If defined, enable hardware CRC through MCU API functions. Otherwise the embedded driver is used.
SIGFOX_EP_MESSAGE_COUNTER_ROLLOVER undefined / 128 / 256 / 512 / 1024 / 2048 / 4096 If defined, give the only message counter rollover value supported. Otherwise, value is dynamically given when opening the library.
SIGFOX_EP_PARAMETERS_CHECK undefined / defined Enable parameters check if defined.
SIGFOX_EP_CERTIFICATION undefined / defined Enable certification features if defined (required to use addons RFP and TA).
SIGFOX_EP_PUBLIC_KEY_CAPABLE undefined / defined Enable public key switch feature if defined.
SIGFOX_EP_VERBOSE undefined / defined Enable credentials (ID / PAC) API access and version control functions if defined.
SIGFOX_EP_ERROR_CODES undefined / defined Use return codes if defined, otherwise all functions return void.
SIGFOX_EP_ERROR_STACK undefined / <error_stack_depth> If defined, store low level errors in a stack (the macro gives the depth). Errors can be read with the SIGFOX_EP_API_unstack_error() function.

Note

It is recommended to keep the SIGFOX_EP_REGULATORY flag enabled. However, the possibility of disabling this flag has been kept for optimization purposes: indeed, some devices could comply with their local regulation by design, thanks to a low TX power, a specific transmission periodicity, etc. In these specific cases, which depends on the application, the regulatory checks performed by the library become useless and can be removed to reduce the memory footprint.

⚠️ **GitHub.com Fallback** ⚠️