This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hello World sample doesn't prints “Hello World” to the console from external board

Hi all,

when I program Hello World sample to my own customized board base on nrf5340, no prints at all. is there any thing I missed?

when I program the Blinky sample to my own board, the led on my board will blink, so I am sure my own board is fine. I did not change anything except the while loop in the main.c, prj.conf file is empty. when I program the code to nrf5340dk it works, I can see the continues print out but not on my own customized board which also use nrf5340 as MCU.

the pic below shows my source code and nrf terminal output which is empty:

the pic below shows my external board connected to nrf5340dk and external board programmed the Blinky sample and is running:

Parents
  • Looking at the picture it seems you have connected power and SWD pins, while you are trying to monitor UART pins? You need to connect the UART pins to a UART-USB bridge (e.g FTDI) if you want to receive the UART characters. If you can't connect the UART pins, you may be able to debug over the SWD pins by enabling RTT, this is described here:
    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_testing.html#how-to-use-rtt 

    Kenneth

  • Hi Kenneth,

    Thanks your help, when I follow the steps to enable RTT, add the RTT config lines in prj.conf, the following error came out when build the project:

    C:\Users\scott\ncs\v1.7.0\zephyr\drivers\console\rtt_console.c:16:10: fatal error: SEGGER_RTT.h: No such file or directory
    16 | #include <SEGGER_RTT.h>
    | ^~~~~~~~~~~~~~
    compilation terminated.
    [68/81] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/nrf53/power.c.obj
    [69/81] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/nrf53/soc.c.obj
    [70/81] Building C object zephyr/CMakeFiles/zephyr.dir/C_/Users/scott/ncs/v1.7.0/nrfxlib/crypto/nrf_cc312_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj
    [71/81] Generating linker_zephyr_prebuilt.cmd
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\Users\scott\ncs\v1.7.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\scott\ncs\my-apps\my-helloworld\build'
    The terminal process terminated with exit code: 1.

    For the other approach your recommend "connect the UART pins to a UART-USB bridge (e.g FTDI)", I have no idea how to operate this with nrf5340dk.

    By the way, I am confused why the Hello World sample can print log from nrf5340dk onboard nRF5340 SoC but can NOT on my own customized board since both of them use the same SoC, when I build the Hello World sample to my own board, I also use nrf5340dk_nrf5340_cpuapp as the board and no board overlay file used.

  • When you make changes to prj.conf file you may need to reopen the project if you are using SES, alternatively build with --pristine option if you are building from command line with west.

    Regarding your problems with getting hello world output on your custom board, it because you have simply not connected physically the UART pins to the SEGGER chip that is doing the programming/debugging. Using RTT instead will do this over the SWD interface, which should be connected (same interface as the programming is done).

    Kenneth

Reply
  • When you make changes to prj.conf file you may need to reopen the project if you are using SES, alternatively build with --pristine option if you are building from command line with west.

    Regarding your problems with getting hello world output on your custom board, it because you have simply not connected physically the UART pins to the SEGGER chip that is doing the programming/debugging. Using RTT instead will do this over the SWD interface, which should be connected (same interface as the programming is done).

    Kenneth

Children
Related