I can't build firmware with sample ubx_bmd345eval

Hi,

We tried to build firmware sample ubx_bmd345eval_nrf52840 to ublox bmd-345 with the template nrf/samples/openthread/coprocessor unsuccessfully. 

Added the next lines in the CMakeLists.txt:

set(OVERLAY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/overlay-usb.conf")
set(DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/usb.overlay")
Finally, the command executed to build.
west build -p always -b ubx_bmd345eval_nrf52840 nrf/samples/openthread/coprocessor/ -- -DOVERLAY_CONFIG="overlay-usb.conf" -DDTC_OVERLAY_FILE="usb.overlay"
With that configuration above, each time we compile it gives a different failure, between steps 411-413 (both included). We have used nrf connect sdk 2.0.0 and 2.2.0.
Could you give us more information to build firmware sample ubx_bmd345eval_nrf52840?
Thank you in advance,
David Pérez
 
Parents
  • Hi David,

    The ublox bmd-345 devicetree node nrf_radio_fem is based on the generic-fem-two-ctrl-pins node. As you can see in the link, two of the properties of this node are tx-gain-db and rx-gain-db. However, these properties are missing in the ublox bmd-345 devicetree file, see ubx_bmd345eval_nrf52840.dts#L120. The solution is to add them in a devicetree overlay. Since you also want to use USB, I would recommend creating a new overlay file for the board with both USB and nrf_radio_fem:

     / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    };
    
    &nrf_radio_fem {
        tx-gain-db = <10>;
        rx-gain-db = <10>;
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };
    

    If you call this overlay file ubx_bmd345eval_nrf52840.overlay and place it in coprocessor/boards, it will automatically be added when you build for ubx_bmd345eval_nrf52840, as long as you do not specify any other devicetree overlay files. So you do not need to manually add it with DTC_OVERLAY_FILE. You still need to add overlay-usb.conf as OVERLAY_CONFIG.

    Just a heads up for later, you do not need to add the overlay files in both CMakeLists.txt and in the build command. Doing either of the options is enough.

    Best regards,

    Marte

  • Happy new year!!

    Thanks for your quick response. Following your indications i can build the firmware but it's not detected over USB port.

    I attached the application.

    Thank very much,

    David Pérez


    rcp-ubx-bmd345_1.0.0.zip

  • Hi David,

    I am not that familiar with the BMD-345 evaluation board, but I see that it has two USB ports. Are you certain that you are using the correct one? At least for the nRF52840 DK when you use USB it will be the nRF USB connector and not the J2 USB connector, so you will have to connect to the nRF USB to get the device to show up as an USB device. I have tested with building the co-processor sample for ubx_bmd345eval_nrf52840 with your overlay and overlay-usb.conf, and at least when running it on nRF52840 DK it shows up and works as expected. 

    Can you try programming your board with the hex file I have attached? Make sure to reset the board after programming.

    72155.zephyr.hex

    Best regards,

    Marte

  • Hi Marte,

    We will try it and i will notice you the next week.

    Thanks very much,

    David Pérez

  • Hi Marte,

    Not detected the USB connection with that .hex.

    At the moment, we have only managed to detect USB with the template nrf52840dongle_nrf52840, like the next picture:

    Best regards,

    David Pérez

  • Hi David,

    I have been trying to compare the generated files when building for nrf52840dongle_nrf52840 with ubx_bmd345eval_nrf52840, but I have not been able to find any obvious reasons for why the dongle firmware works, but not the firmware for the BMD-345 eval kit.

    One thing I saw, however, was that the ubx_bmd345eval_nrf52840 had several configurations related to console and UART enabled. Can you try adding the following to prj.conf?

    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    CONFIG_USE_SEGGER_RTT=n
    CONFIG_STDOUT_CONSOLE=n

    Please also try completely deleting the build directory and creating a new one. Sometimes devicetree changes are not applied even with pristine build.

    Best regards,

    Marte

  • Hi Marte,

    We delete the old build configuration before to launch the build configuration again. But it also doesn't work with the above lines added in prj.conf.

    Finally, our board works with the generic overlay-usb.conf conf and front end skyworks RFX2411 included in ublox bmd345 module with the nrf52840dongle_nrf52840 template, with the following files modified:

    - nrf52840dongle_nrf52840.overlay:

    / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    
        // Enable Skyworks RFX2411 front end (PA/LNA)
        nrf_radio_fem: bmd345-fem {
            compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
            ctx-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
            crx-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
            // tx-gain-db = <10>;
            // rx-gain-db = <10>;
        };
    
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };
    

    - prj.conf

    #
    # Copyright (c) 2020 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # Set OpenThread NCP architecture
    CONFIG_OPENTHREAD_COPROCESSOR=y
    CONFIG_OPENTHREAD_COPROCESSOR_RCP=y
    
    # Logging
    CONFIG_LOG=y
    CONFIG_OT_COPROCESSOR_LOG_LEVEL_ERR=y
    CONFIG_LOG_MAX_LEVEL=4
    CONFIG_OPENTHREAD_DEBUG=y
    CONFIG_OPENTHREAD_LOG_LEVEL_CRIT=y
    CONFIG_LOG_BACKEND_SPINEL=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=y
    CONFIG_BOOT_BANNER=y
    
    # Increase logging thread stack size due to Spinel backend needs
    CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048
    
    # Enable OpenThread features set
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y
    
    CONFIG_NET_L2_OPENTHREAD=y
    
    # Generic networking options
    CONFIG_NETWORKING=y
    
    CONFIG_ASSERT=y
    CONFIG_ASSERT_NO_COND_INFO=y
    CONFIG_MBEDTLS_SHA1_C=n
    CONFIG_FPU=y
    
    # ublox bmd345 config
    CONFIG_BOARD_ENABLE_DCDC=n

    The templates ubx_bmd345eval_nrf52840 doesn't work for our custom board with the ublox bmd345 and with the generic overlay-usb.conf. But the solution attached previously is enough for us by the moment. Now the ublox bmd345 transmits the signal strongly.

    Thank you very much for your help.

    Best regards,

    David Pérez

Reply
  • Hi Marte,

    We delete the old build configuration before to launch the build configuration again. But it also doesn't work with the above lines added in prj.conf.

    Finally, our board works with the generic overlay-usb.conf conf and front end skyworks RFX2411 included in ublox bmd345 module with the nrf52840dongle_nrf52840 template, with the following files modified:

    - nrf52840dongle_nrf52840.overlay:

    / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    
        // Enable Skyworks RFX2411 front end (PA/LNA)
        nrf_radio_fem: bmd345-fem {
            compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
            ctx-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
            crx-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
            // tx-gain-db = <10>;
            // rx-gain-db = <10>;
        };
    
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };
    

    - prj.conf

    #
    # Copyright (c) 2020 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # Set OpenThread NCP architecture
    CONFIG_OPENTHREAD_COPROCESSOR=y
    CONFIG_OPENTHREAD_COPROCESSOR_RCP=y
    
    # Logging
    CONFIG_LOG=y
    CONFIG_OT_COPROCESSOR_LOG_LEVEL_ERR=y
    CONFIG_LOG_MAX_LEVEL=4
    CONFIG_OPENTHREAD_DEBUG=y
    CONFIG_OPENTHREAD_LOG_LEVEL_CRIT=y
    CONFIG_LOG_BACKEND_SPINEL=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=y
    CONFIG_BOOT_BANNER=y
    
    # Increase logging thread stack size due to Spinel backend needs
    CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048
    
    # Enable OpenThread features set
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y
    
    CONFIG_NET_L2_OPENTHREAD=y
    
    # Generic networking options
    CONFIG_NETWORKING=y
    
    CONFIG_ASSERT=y
    CONFIG_ASSERT_NO_COND_INFO=y
    CONFIG_MBEDTLS_SHA1_C=n
    CONFIG_FPU=y
    
    # ublox bmd345 config
    CONFIG_BOARD_ENABLE_DCDC=n

    The templates ubx_bmd345eval_nrf52840 doesn't work for our custom board with the ublox bmd345 and with the generic overlay-usb.conf. But the solution attached previously is enough for us by the moment. Now the ublox bmd345 transmits the signal strongly.

    Thank you very much for your help.

    Best regards,

    David Pérez

Children
Related