This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Having the RTT viewer after DFU

Hello there,

I have been using RTT viewer since a while and its works fine only if i program that board without DFU, and if i program this board with DFU it says "could not connect to target" as below...

and it disturbs my BLE Connection also, then i need to restart my board.

finally my problem is, i need to check(view/Debug) my data after DFU also, how can i do that please help me

Best Regards,

Rajender.

Parents Reply
  • Hi Rajender, 

    Define the macros in your app/sdk_config.h:

    #define SEGGER_RTT_ALIGNMENT 4
    #define SEGGER_RTT_BUFFER_ALIGNMENT 4
    #define SEGGER_RTT_SECTION ".rtt"

    Allocate section in the linker script file. In nrf5x_common.ld as that post

    The corresponding sections in the linker file look like this:

    SECTIONS
    {
      . = ALIGN(4);
      .mem_section_dummy_ram :
      {
      }
      .log_dynamic_data :
      {
        PROVIDE(__start_log_dynamic_data = .);
        KEEP(*(SORT(.log_dynamic_data*)))
        PROVIDE(__stop_log_dynamic_data = .);
      } > RAM
      .fs_data :
      {
        PROVIDE(__start_fs_data = .);
        KEEP(*(.fs_data))
        PROVIDE(__stop_fs_data = .);
      } > RAM
      
      .rtt :
      {
        KEEP(*(.rtt))
      } > RAM
    
      
    } INSERT AFTER .data;

    After updating with the app via DFU, reconnect to RTT view. You will see the log of the application. You might need to adjust the ram size as that post indicate. 

    -Amanda H.

Children
Related