sparkfun NRF9160 thing plus Serial LTE Modem Help

I have the sparkfun NRF9160 thing plus, and using the NRF Connect SDK v1.8.0 in visual studio code I can load programs like Blinky and hello world and everything works great. When I try to upload the Serial LTE Modem Example, I will not build. I get the following error:

^~~~~~
c:\Users\David\Desktop\LTETHREE\SERmodem\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
| ^~~~~~~~~~~~
c:\Users\David\Desktop\LTETHREE\SERmodem\build\zephyr\include\generated\devicetree_unfixed.h:5386:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_cts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
5386 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
2641 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
c:\Users\David\Desktop\LTETHREE\SERmodem\src\slm_at_host.c:249:6: note: in expansion of macro 'DT_PROP'
249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
| ^~~~~~~
C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
2641 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
c:\Users\David\Desktop\LTETHREE\SERmodem\src\slm_at_host.c:249:14: note: in expansion of macro 'DT_NODELABEL'
249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
| ^~~~~~~~~~~~
[113/319] Linking C static library modules\segger\libmodules__segger.a
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'c:\Users\David\ncs\v1.8.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\David\Desktop\LTETHREE\SERmodem\build'
The terminal process terminated with exit code: 1.

I'm assuming I need to change something in a configuration file, is that correct?

Thanks in advance!

Parents
  • Hi,

     

    The log shows that rts and cts is undefined:

    DT_PROP(DT_NODELABEL(uart0), cts_pin));

    If you create a DTS overlay file for your board, holding this to basically set the RTS/CTS to "disconnected" (you can ofcourse set them to valid gpio numbers if you'd like):

    &uart0 {
    	cts-pin = <0xFFFFFFFF>;
    	rts-pin = <0xFFFFFFFF>;
    };
    

     

    and place this in boards/sparkfun_thing_plus_nrf9160_ns.overlay, then it should compile.

    PS: remember to re-configure the build after making changes to the DTS.

     

    Kind regards,

    Håkon

  • Thanks,

    Unfortunately this gave a very similar error:

    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:6: note: in expansion of macro 'DT_PROP'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~~~~~~
    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: note: each undeclared identifier is reported only once for each function it appears in
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:6: note: in expansion of macro 'DT_PROP'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~~~~~~
    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_cts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:249:6: note: in expansion of macro 'DT_PROP'
    249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:249:14: note: in expansion of macro 'DT_NODELABEL'
    249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
    | ^~~~~~~~~~~~
    [117/313] Building C object CMakeFiles/app.dir/src/slm_at_commands.c.obj
    [118/313] Building C object CMakeFiles/app.dir/src/slm_at_tcp_proxy.c.obj
    [119/313] Building C object CMakeFiles/app.dir/src/slm_at_udp_proxy.c.obj
    [120/313] Building C object CMakeFiles/app.dir/src/slm_at_icmp.c.obj
    [121/313] Building C object CMakeFiles/app.dir/src/slm_at_socket.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\Users\David\ncs\v1.8.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\David\Desktop\acv\vca\build'
    The terminal process terminated with exit code: 1. 

Reply
  • Thanks,

    Unfortunately this gave a very similar error:

    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:6: note: in expansion of macro 'DT_PROP'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~~~~~~
    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: note: each undeclared identifier is reported only once for each function it appears in
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:6: note: in expansion of macro 'DT_PROP'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~~~~~~
    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_cts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:249:6: note: in expansion of macro 'DT_PROP'
    249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:249:14: note: in expansion of macro 'DT_NODELABEL'
    249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
    | ^~~~~~~~~~~~
    [117/313] Building C object CMakeFiles/app.dir/src/slm_at_commands.c.obj
    [118/313] Building C object CMakeFiles/app.dir/src/slm_at_tcp_proxy.c.obj
    [119/313] Building C object CMakeFiles/app.dir/src/slm_at_udp_proxy.c.obj
    [120/313] Building C object CMakeFiles/app.dir/src/slm_at_icmp.c.obj
    [121/313] Building C object CMakeFiles/app.dir/src/slm_at_socket.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\Users\David\ncs\v1.8.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\David\Desktop\acv\vca\build'
    The terminal process terminated with exit code: 1. 

Children
Related