nRF5340
SDK 2.6.1
I am migrating a project (based on coap_client) from NCS 2.4.1 to NCS 2.6.1, and I get a compiler error:
In file included from D:/NordicSemi/v2.6.1/nrfxlib/nrf_802154/serialization/src/nrf_802154_spinel_net.c:53:
D:/NordicSemi/v2.6.1/nrfxlib/nrf_802154/serialization/src/nrf_802154_spinel_net.c: In function 'nrf_802154_energy_detected':
D:/NordicSemi/v2.6.1/nrfxlib/nrf_802154/serialization/src/nrf_802154_spinel_net.c:135:37: error: 'result' undeclared (first use in this function); did you mean 'p_result'?
135 | NRF_802154_SPINEL_LOG_VAR("%u", result);
| ^~~~~~
The offending code is this:
void nrf_802154_energy_detected(const nrf_802154_energy_detected_t * p_result)
{
nrf_802154_ser_err_t res;
SERIALIZATION_ERROR_INIT(error);
NRF_802154_SPINEL_LOG_BANNER_CALLING();
NRF_802154_SPINEL_LOG_VAR("%u", result);
res = nrf_802154_spinel_send_cmd_prop_value_is(
SPINEL_PROP_VENDOR_NORDIC_NRF_802154_ENERGY_DETECTED,
SPINEL_DATATYPE_NRF_802154_ENERGY_DETECTED,
p_result->ed_dbm);
SERIALIZATION_ERROR_CHECK(res, error, bail);
bail:
SERIALIZATION_ERROR_RAISE_IF_FAILED(error);
return;
}
If I open this file, right click on 'result' and choose "Go to definition", it takes me to <sdk>/nrfxlib/nrf_802154\driver\src\nrf_802154_notification_swi.c. I can see that it has been compiled in the compiler output.
My child_image\802154_rpmsg.conf:
CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_LOG=y CONFIG_NRF_802154_SER_LOG=y # Support 21540 fem 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=10 CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=20 CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB=10 #CONFIG_BT_CTLR_TX_PWR_ANTENNA=22 CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y # RTT CONFIG_CONSOLE=n CONFIG_LOG=y CONFIG_LOG_PRINTK=y CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y # 2.6.1 from CLI sample # Enable the frame encryption feature in the radio driver, it's required for proper working # OPENTHREAD_CSL_RECEIVER and OPENTHREAD_LINK_METRICS_SUBJECT features CONFIG_NRF_802154_ENCRYPTION=y
This compiled just fine with NCS 2.4.1. What am I missing?
Edit: It compiles if I comment out CONFIG_NRF_802154_SER_LOG=y, and I see this on the RTT Viewer
[00:00:00.001,312] <err> sync_rtc: Failed synchronized RTC setup (err: -12) *** Booting nRF Connect SDK v3.5.99-ncs1-1 *** [00:00:00.001,281] <err> sync_rtc: Failed synchronized RTC setup (err: -12) *** Booting nRF Connect SDK v3.5.99-ncs1-1 *** [00:00:00.001,281] <err> sync_rtc: Failed synchronized RTC setup (err: -12) *** Booting nRF Connect SDK v3.5.99-ncs1-1 *** [00:00:00.001,312] <err> sync_rtc: Failed synchronized RTC setup (err: -12) *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
Mary