What is the proper way to conditionally build?

I am building (v2.5.0) for both the nrf52840dk and the nrf21540dk.

  1. west build -b nrf21540dk_nrf52840 -d build21540
  2. west build -b nrf52840dk_nrf52840 -d build52840

so I only want the following to compile with the nrf21540 build.

#FEM NRF21540
# CONFIG_MPSL_FEM_DEVICE_CONFIG_254=y
# CONFIG_MPSL_FEM_NRF21540_GPIO=y
# CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20
# CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=20
# CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB=10

Rather than commenting them out, what is the proper way to conditionally build based on the selected processor/dk board?

Parents Reply Children
No Data
Related