Hi,
I got my hardware modification which added the nRF21540 to our system more or less running under NCS v2.9.0.
Currently, I have the following FEM and antenna configuration in sysbuild/hci_ipc.conf:
# CONFIG_BT_CTLR_TX_PWR_PLUS_3=y ##### FEM Config ##### CONFIG_FEM=y CONFIG_MPSL=y CONFIG_MPSL_FEM=y CONFIG_MPSL_FEM_NRF21540_GPIO=y CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=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 ##### TX Power Config ##### CONFIG_BT_CTLR_TX_PWR_ANTENNA=20
Now, I decided it would be nice to have this configuration inside the board definition, as I can create one separate definition for our old hardware that doesn't have the nRF21540.
As hci_ipc is running on the net core, I decided to move the configuration to myboard_nrf5340_cpunet_defconfig. But when I try to perform a pristine build, I suddenly get a failure during the link process, saying b0n wouldn't fit into the flash. Normally, b0n shouldn't be affected by this configuration in my opinion... (I use mcuboot and b0n for providing software updates for both cores.)
I tried changing the configurations to hci_ipc_CONFIG_* in myboard_nrf5340_cpunet_defconfig, but then I got an error about malformed configuration lines.
Question 1: What is the reason why b0n fails to link? Does it try to add extra code to itself? If so, is this behavior intended?
Question 2: How can I create Kconfig artefacts that are only evaluated when a certain board is used? Either in the board definition or in the main project. What is the best way to go here? (It would be okay to add something like "if board == myboard ... endif" to sysbuild/hci_ipc.conf if this syntax works with .conf files...)
Best regards,
Michael
PS: Does my FEM configuration look fine like this? I'm still a bit unsure how the settings affect the driver and the tx power settings.
PPS: The project is intended for the FCC region, so please don't mind the 20 dB antenna setting