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

Using RTT viewer in SDK 12.2 SES

sdkconfig.txtmainc.txt(/attachment/6fb97103178e9eb2c30302351e63ce8f)Can you please tell whether i follow the the entire tutorial as in the link or just the first step for SDK 12.2 SES. Even if i use the first step, i need the CMSIS wizard that uses Java tool to modify the functionality in sdkconfig.h to enable logging through the RTT viewer.

But somehow there is a problem with opening the .jar file, since Java tool is not working for my windows.

Is there an alternative way to modify the sdkconfig.h, not manually, as there are chances of errors coming up if i change it myself, then there will be further problems

Parents
  • Hi,

    It should be sufficient to enable NRF_LOG in sdk_config.h and set the backend to use RTT.

    I'm not aware of any other tools that can edit the CMSIS files, except Keil and CMSIS Configuration Wizard. Why not try to undertand how the file works and fix the errors instead of looking for another tool? The documentation can be found here, and on the Keil page linked there. If you have some issues, post it here and I will try to help you solve it.

    To enable logging over RTT, set the following defines in your sdk_config.h file:

    #define NRF_LOG_ENABLED 1
    
    #define NRF_LOG_BACKEND_SERIAL_USES_UART 0
    
    #define NRF_LOG_BACKEND_SERIAL_USES_RTT 1
    

    If you have enabled deferred logging by setting #define NRF_LOG_DEFERRED 1, you need to call NRF_LOG_PROCESS() or NRF_LOG_FLUSH() in you main loop, to process the log queue.

    Best regards,

    Jørgen

  • Hi, I have done all the necessary changes in the SDKconfig.h file but when i open the rtt viewer command window, as per the tutorial some text hello should be printed as shown in my mainc file. but nothing is printed. So probably, the RTT isn't working. Can you help me fix this?

    I even tried to put the #define NRF_LOG_DEFERRED 0 as it was already 1 when i first viewed the file. This would have made things a bit easier for operating the RTT viewer. But still nothing is being printed.

    I quote the line from the tutorial referred to earlier saying "Now, load the code you compiled above onto your device, and you should see the text "Hello World!" appear. Notice if you open Termite you will also see the text "Start.." which is still printed on the serial port as before. You can now use the ble_app_uart project as intended, but also send text to RTT in order to debug. Keep in mind that SEGGER_RTT_WriteString() is much faster than printf, so you can safely call this function without it affecting the real time properties of your application."

Reply
  • Hi, I have done all the necessary changes in the SDKconfig.h file but when i open the rtt viewer command window, as per the tutorial some text hello should be printed as shown in my mainc file. but nothing is printed. So probably, the RTT isn't working. Can you help me fix this?

    I even tried to put the #define NRF_LOG_DEFERRED 0 as it was already 1 when i first viewed the file. This would have made things a bit easier for operating the RTT viewer. But still nothing is being printed.

    I quote the line from the tutorial referred to earlier saying "Now, load the code you compiled above onto your device, and you should see the text "Hello World!" appear. Notice if you open Termite you will also see the text "Start.." which is still printed on the serial port as before. You can now use the ble_app_uart project as intended, but also send text to RTT in order to debug. Keep in mind that SEGGER_RTT_WriteString() is much faster than printf, so you can safely call this function without it affecting the real time properties of your application."

Children
No Data
Related