Problem bringing up custom board with custom board file

On a new board based on nRF9160 I am having trouble figuring out how to bring up the board.

I am using Azure IoT hub and can successfully build an application that can connect using the nRF9160DK_NRF9160 Non Secure board files. This is working both on the DK board and on my custom hardware board.

I have copied the nRF9160DK_NRF9160 board to my own board and renamed files and definitions to match my own board.

I can see that when using the DK board package I get a nrf9160dk_nrf9160_ns.conf file with some configuration that I do not find I my board files. I have copied these definitions into my prj.conf file.

When debugging my board using my custom board files (NS) I get this output on J-Link RTT:

00> *** Booting nRF Connect SDK v3.5.99-ncs1 ***
00> I: Starting bootloader
00> I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
00> I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
00> I: Boot source: none
00> I: Image index: 0, Swap type: none
00> I: Bootloader chainload address offset: 0x10000
00> I: Jumping to the first image slot

But when using the board definition for nRF9160DK_NRF9160 Non Secure I get this:

00> *** Booting nRF Connect SDK v3.5.99-ncs1 ***
00> [00:00:16.895,935] <inf> azure_iot_hub_sample: Azure IoT Hub sample started
00> [00:00:16.895,965] <inf> azure_iot_hub_sample: Bringing network interface up and connecting to the network
00> [00:00:17.124,908] <inf> nrf_modem_lib_trace: Trace thread ready

.... connecting and running.

What am I missing for my own board definition. I am working in the same project file with just the above two build definitions...

Parents
  • Hi,

    Instead of going straight to the full example, I suggest that you start by testing with the Hello World sample and then testing incrementally more complicated samples up to your app.

    Regards,
    Sigurd Hellesvik

  • Trying to figure out why I have so many conflicts with the uart, I have remove use of it in my application.

    I have removed decaration of uart0 from the DTS.

    In DTS I have also removed the use of uart0

        chosen {
    /*      
            zephyr,console = &uart0;
            zephyr,shell-uart = &uart0;
            zephyr,uart-mcumgr = &uart0;
    */      
        };
    And in prj.conf got:
    CONFIG_TFM_LOG_LEVEL_SILENCE=y
    CONFIG_NRF_MODEM_LIB_TRACE=n
    So I am trying to remove all use of uart0...
    I now cannot compile because of at_host.c where uart0 is used in 
    #if DT_HAS_CHOSEN(ncs_at_host_uart)
    static const struct device *const uart_dev = DEVICE_DT_GET(DT_CHOSEN(ncs_at_host_uart));
    #else
    static const struct device *const uart_dev = DEVICE_DT_GET(DT_NODELABEL(uart0));
    #endif
    How do I prevent this use of uart0
    -------------------------
    It is not really that I need uart0 to be unused. But my problems seems to come from uart usage conflict.
    It would be nice to have uart0 as a console and for all the default and uart2 for my modbus port. But I am unable to figure out a DTS and configuration that can work with that.
  • Now I have tried adding 

    chosen { 
      ncs,at-host-uart = &uart2;
    }

    And declared uart2 in the DTS, then I can compile. So that seems to remove last reference to uart0,

    So I found out that CONFIG_AT_HOST_LIBRARY removes this dependency. 

    So I have removed the AT host library and is trying to reintroduce the use of uart0 in my application.

Reply
  • Now I have tried adding 

    chosen { 
      ncs,at-host-uart = &uart2;
    }

    And declared uart2 in the DTS, then I can compile. So that seems to remove last reference to uart0,

    So I found out that CONFIG_AT_HOST_LIBRARY removes this dependency. 

    So I have removed the AT host library and is trying to reintroduce the use of uart0 in my application.

Children
No Data
Related