[SOLVED] Dumping binary data from MCU to host via RTT

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Dumping binary data from MCU to host via RTT

    Hi,

    I have inherited a project from a former colleague that uses RTT for debugging and it works well. The embedded code uses SEGGER_RTT_TerminalOut function to send event messages to the debugger and onto the PC. The guy that wrote the code also wrote a python script that connects to port 19021 to get these messages.

    What I want to do is dump out the contents of an external flash chip connected to the micro controller that is running the RTT c code. I can easily get a buffer of bytes from the flash memory and just assumed that I can use the same method as used before (SEGGER_RTT_TerminalOut), but found that this is expecting null terminated strings, which causes problems.


    So my question is what is the proper way to do this? I feel that it is possible, having Googled around, but as I have not used RTT before or anything like it, I cannot work it out.


    Thanks in advance


    Ross
  • Hi Ross,
    Thanks for your inquiry.

    If you only want to send raw data to the host, you can use SEGGER_RTT_Write().
    For further information about this, and other functions available, please refer to the J-Link User Manual (UM08001).
    You can find the manual here:
    %JLinkInstallFolder%\Doc\Manuals
    And here:
    segger.com/downloads/jlink/

    Please find an excerpt from the manual, regarding said function, attached.


    Best regards,
    Fabian
    Images
    • SEGGER_RTT_Write.PNG

      58.95 kB, 710×592, viewed 22 times
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/


    Or you can contact us via e-mail.