nrf5340 empty_app_core compilation failed

I am using nrf5340 audio DK,

The project I use is v3.0.2 .\samples\nrf5340\empty_app_core\. If the board target is nrf5340 audio DK

a compilation error will occur.
build error:zephyr/drivers/regulator/libdrivers__regulator.a(regulator_npm1100.c.obj):(.rodata.config_0+0x0): undefined reference to `__device_dts_ord_8


If I selected the target board as nrf5340dk/nrf5340/cpuapp and it compiled successfully.

  • Hi, 

    Like Simon pointed out, the build error indicates that the PMIC is not taken into consideration. This error can be resolved in a few ways depending on your needs.

    If you want to use the PMIC, you need to enable its driver and GPIO in prj.conf, make sure that the GPIO pin is not forwarded to the net core in main.c and add code to use it. We don't have any nRF Connect SDK guidelines for using nPM1100, but it is supported in Zephyr. There could also be other additions and modifications needed to get the empty_app_core sample working with PMIC for the nRF5340 Audio DK. Please refer to the Troubleshooting the devicetree part of Lesson 2 of the nRF Connect SDK Intermediate course on DevAcademy for general guidelines for resolving devicetree errors. 

    If you don't want to use the PMIC, you can disable it in a dts overlay: 

    / {
        pmic {
            status = "disabled";
        };
    };

    Disabling the PMIC in the overlay resulted in a successful build for me.

    Best regards,

    Maria

  • I deleted the pmic in C:\ncs\v3.0.2\zephyr\boards\nordic\nrf5340_audio_dk\nrf5340_audio_dk_nrf5340_cpuapp_common.dtsi and compiled successfully

Related