Posts

When Compile-Time Configuration Helps—and When It Hurts

Should you configure firmware before compilation or while it is running? Imagine you are developing firmware for a smart home controller. Your product supports: Wi-Fi communication. Bluetooth communication. Temperature monitoring. LCD display. Power-saving mode. Debug logging. Data storage. However, not every customer needs every feature. One product uses Wi-Fi and an LCD display. Another product uses Bluetooth without an LCD display. A third product uses only temperature monitoring and data storage. Now you have an important engineering decision. Should you include all features in one firmware and enable or disable them while the device is running? Or should you select the required features before compilation and create a separate firmware build for each product? This is where compile-time configuration becomes useful. Compile-time configuration allows developers to select certain firmware features, hardware options and implementation choices before the compiler generates the final p...
Recent posts