This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Command line tracing in Ubuntu

Hi again.

I'm using nRF52 DK board in Ubuntu. I can flash the device with the blinky example (I haven't yet tried the softdevice tough), but I cannot really get any traces out of the SW. I added simple printf to blinky main loop to keep things simple.

JLinkExe -device nrf52 -if swd -speed 4000

SEGGER J-Link Commander V5.10u (Compiled Mar 17 2016 19:06:22) DLL version V5.10u, compiled Mar 17 2016 19:06:19

Connecting to J-Link via USB...O.K. Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17 Hardware version: V1.00 S/N: 682343799 VTref = 3.300V

Type "connect" to establish a target connection, '?' for help J-Link>connect Device "NRF52" selected.

if I run tstart I get:

Trace could not be started, no trace clock.

What is still missing here?

Parents
  • Ok, lets reform the question.

    What is the easiest way to try the tracing under linux? I noticed, that there's pretty much no printf:s in other examples than the uart.

    I managed to get uart traces out (only to terminal, not via any j-link related tool) from putty-example by adding uart config to example:

    const app_uart_comm_params_t comm_params =
    {
      RX_PIN_NUMBER,
      TX_PIN_NUMBER,
      RTS_PIN_NUMBER,
      CTS_PIN_NUMBER,
      APP_UART_FLOW_CONTROL_ENABLED,
      false,
      UART_BAUDRATE_BAUDRATE_Baud38400
    };
     // Initialize.
    
    APP_UART_FIFO_INIT(&comm_params,
                     UART_RX_BUF_SIZE,
                     UART_TX_BUF_SIZE,
                     uart_error_handle,
                     APP_IRQ_PRIORITY_LOW,
                     err_code);
    

    However when I tried this with any soft device example, no trace is outputted properly (some random characters appear to terminal occasionally). The app_trace_init seems to do same thign with higher bus clock, but that's it.

    Is there something in the softdevice that re-routes the uart output? Or is this matter of some makefile setting?

  • Now it works. const app_uart_comm_params_t comm_params = { RX_PIN_NUMBER, TX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, APP_UART_FLOW_CONTROL_ENABLED, false, UART_BAUDRATE_BAUDRATE_Baud115200 };

    And the main thing was to change the tx buffer size in the file to 2k. apparently the whole system outputs so much trace that it overflows.

Reply
  • Now it works. const app_uart_comm_params_t comm_params = { RX_PIN_NUMBER, TX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, APP_UART_FLOW_CONTROL_ENABLED, false, UART_BAUDRATE_BAUDRATE_Baud115200 };

    And the main thing was to change the tx buffer size in the file to 2k. apparently the whole system outputs so much trace that it overflows.

Children
No Data
Related