DevAcademy fundamentals Lesson 3 Exercise 2 (CONFIG_MYFUNCTION=n)

Dear All,

I'm following the nRF Connect SDK Fundamentals and I have a weird problem in the Lesson 3 exercise 2, section "Adding custom configurations".

The part with CONFIG_MYFUNCTION=y, builds, flashes, outputs as expected on VCOM.

However when I try CONFIG_MYFUNCTION=n, it builds, flashes but there is no output from the VCOM. I see the following problem in the "Problems' console:

CONFIG_UART_CONSOLE was assigned the value y, but got the value n. Missing dependencies:
SERIAL_HAS_DRIVER

Using nrf52840DK, nrf connect SDK v2.9.0, SDK toolchain v2.7.0. Project is attached.

I guess I'm doing some stupid mistake but for the life of me can't find where.

Thank younrf_app.zip

  • Hi,

     

    thank you for sharing the .zip.

    I compiled this for nrf52840dk/nrf52840, and it prints as expected:

    *** Booting nRF Connect SDK v2.9.2-4ab7b98fc76f ***
    *** Using Zephyr OS v3.7.99-aa34a5632971 ***
    MYFUNCTION not enabled

     

    It sounds like your build folder (build/application-name/zephyr/.config file) may have been altered. Try deleting your build and regenerating it.

     

    Kind regards,

    Håkon

  • Dear Håkon,

    thank you for your reply and testing the project.

    *** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    MYFUNCTION not enabled

    Well, this is embarrassing but the reason for me not seeing the output was me opening the VCOM terminal too late to catch the output. So my apologies.

    The only excuse I have is that the originally posted Problem was throwing me off, thinking that the UART output suddenly stopped working. Indeed the 'problem' is still present even now. So the project builds, flashes, outputs to VCOM but the "Problems' console still shows:

    CONFIG_UART_CONSOLE was assigned the value y, but got the value n. Missing dependencies:
    SERIAL_HAS_DRIVER


    Do you get the same message? (I tried pristine build and also just deleting the whole build folder, no change.)

    Thank you

  • Hi,

     

    MPajo said:
    Well, this is embarrassing but the reason for me not seeing the output was me opening the VCOM terminal too late to catch the output. So my apologies.

    No worries, these things happen.

    MPajo said:

    The only excuse I have is that the originally posted Problem was throwing me off, thinking that the UART output suddenly stopped working. Indeed the 'problem' is still present even now. So the project builds, flashes, outputs to VCOM but the "Problems' console still shows:

    CONFIG_UART_CONSOLE was assigned the value y, but got the value n. Missing dependencies:
    SERIAL_HAS_DRIVER

    At my end, CONFIG_UART_CONSOLE is set to 'y'.

     

    What board are you targeting?

    This message is usually linked to issues like uart0 being disabled in device tree, or missing chosen console driver in the board itself, like this:

    https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts#L19

     

    You can check the compiled output in build/application-name/zephyr/zephyr.dts to verify if either uart or zephyr,console is set.

     

    Kind regards,

    Håkon

  • Dear Håkon,

    interesting. I'm using nRF52840-DF board.

    Yes, the compiled output shows the UART0 as console.

    /dts-v1/;
    
    / {
    	#address-cells = < 0x1 >;
    	#size-cells = < 0x1 >;
    	model = "Nordic nRF52840 DK NRF52840";
    	compatible = "nordic,nrf52840-dk-nrf52840";
    	chosen {
    		zephyr,bt-hci = &bt_hci_sdc;
    		zephyr,entropy = &cryptocell;
    		zephyr,flash-controller = &flash_controller;
    		zephyr,sram = &sram0;
    		zephyr,flash = &flash0;
    		zephyr,code-partition = &slot0_partition;
    		zephyr,console = &uart0;
    		zephyr,shell-uart = &uart0;
    		zephyr,uart-mcumgr = &uart0;
    		zephyr,bt-mon-uart = &uart0;
    		zephyr,bt-c2h-uart = &uart0;
    		zephyr,ieee802154 = &ieee802154;
    	};
    	
    	uart0: uart@40002000 {
    			compatible = "nordic,nrf-uarte";
    			reg = < 0x40002000 0x1000 >;
    			interrupts = < 0x2 0x1 >;
    			status = "okay";
    			current-speed = < 0x1c200 >;
    			pinctrl-0 = < &uart0_default >;
    			pinctrl-1 = < &uart0_sleep >;
    			pinctrl-names = "default", "sleep";
    		};
    

    Just following the instructions of the lesson's exercise. So no overlays or other modifications.

    In any case, thank you very much!

    Cheers

  • Hi,

     

    Everything looks to be in order, not sure why you are getting this warning.

    The fact that the console outputs as expected indicate that the serial driver is indeed enabled.

     

    Can you please share the full build output?

     

    Kind regards,

    Håkon

Related