Getting Started with Build-time Configurations
When you’re writing firmware, you sometimes want to turn on or off specific features, such as UART logging or sensor drivers, without rewriting your core application logic. Hard-coding these choices into your source files leads to messy code and difficult debugging. Build-time configurations solve this problem by separating your feature selection from your executable code. When you use build-time configurations, you get smaller binaries and lower power consumption because you’re not powering unused peripherals.
In this guide, you will learn about build-time configurations and how they work on the Texas Instruments CC2340 series and Nordic Semiconductor 54 L series development boards.
What Are Build-time Configurations?
You can think of your build-time configuration as the gatekeeper for your board’s hardware resources. When you enable a feature such as the UART console in your configuration, the compiler adds the necessary driver code and allocates the required memory to your firmware build. When you turn off a feature, the compiler ignores all the hardware-specific code, saving precious flash and RAM because the unused code never reaches the firmware build.
Configuring the TI CC2340R5 with SysConfig
TI uses the SysConfig tool to modify the build-time configuration. SysConfig provides a visual interface to manage pin muxing, driver settings, and stack configurations. When you save your SysConfig file (.syscfg), the tool generates C header and source files that define the constants and structures your application uses.
One of the easiest things you can try with the build-time configuration on your TI CC2340R5 LaunchPad is to enable UART. Fortunately, we have already published a previous tutorial on getting started with UART logging. All you need to do to enable UART is described in the steps there. Here’s what happens when you follow those instructions, in the context of build-time configurations:
- When you add a UART2 instance to your project’s SysConfig, you have added UART to your build-time configuration.
- When you add the code
uart = UART2_open(0, &uartParams);to your main application file, you are initializing a UART object associated with the UART instance in your build-time configuration. - When you see the terminal output, you know you have successfully enabled UART in your build-time configuration and that your firmware has accessed that peripheral correctly.

Configuring the Nordic nRF54L15 with Kconfig
Nordic uses the Kconfig system to configure the build. Kconfig is a configuration language that manages dependencies between different software components. You specify your choices in a configuration file, typically prj.conf, and the compiler follows them when building your firmware. Unlike TI’s SysConfig, Kconfig is text-based.
One of the easiest things you can try with the build-time configuration on your Nordic nRF54L15 is to enable UART. Fortunately, we have already published a previous tutorial on getting started with UART logging. All you need to do to enable UART is described in the steps there. Here’s what happens when you follow those instructions, in the context of build-time configurations:
- When you add
CONFIG_UART_CONSOLE=yto yourprj.conf, you have added UART to your build-time configuration. This tells the compiler to include the UART console driver and enables logging functions likeprintk(). - When you add the code
printk("nRF54L15 UART logging started!\n");to your main application file, you are passing text to the function that the compiler connected to the UART peripheral itself. - When you see the terminal output, you know you have successfully enabled UART in your build-time configuration and that your firmware has accessed that peripheral correctly.

Wrapping Up
To build robust firmware, you need a clear strategy for managing hardware features. On the TI CC2340R5, you will use SysConfig to generate hardware metadata, while on the Nordic nRF54L15, you will use Kconfig to handle driver dependencies. These tools give you the power to change device behavior without touching your core application logic. As you master build-time configurations, you’re well on your way to creating efficient, production-level code that can scale from one board to thousands.
Ready to connect your devices anywhere on Earth? Get started with Hubble Network for free →