[SOLVED]Jlink RTT and STM32F4

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

    • [SOLVED]Jlink RTT and STM32F4

      Hi!

      I have a eval board about STM32F407ZG. I want to test segger RTT print. I have used segger RTT before. I am using Segger jlink edu v10.Today i download SEGGER Embedded Studio for ARM 4.18 at home and want to learn to use. I use the last jlink package. It's JLink v6.46i.
      But i have a problem about RTT. when i use RTT in attach mode, it's ok. I start to debug at Embedded Studio and will print log message normally at Debug Terminal. But i use RTT in Stand-alone mode
      and print no message. I use JLinkRTTViewer.exe connect to jlink and select USB connection ,then select the target device(eg: STM32F407ZG), the target interface(eg: SWD) and its speed(eg: 4000Khz) and RTT control block is Auto detection.
      Terminal 0 print no message.

      The JLinkRTTViewer.exe log is shown:

      The JLinkRTTViewer.exe connection is shown:


      The JLinkRTTViewer.exe Channel infos is shown:


      My example code is shown:

      Source Code

      1. //RTT PRINT
      2. #ifdef __SEGGER_RTT_
      3. uint8_t rttTemp[100] = {0};
      4. uint8_t RTT_Channel = 0;
      5. uint16_t rttLen = 0;
      6. #endif
      7. #ifdef __SEGGER_RTT_
      8. rttLen = sprintf((char*)rttTemp, "STM32407ZG LED\r\n");
      9. SEGGER_RTT_Write(RTT_Channel, rttTemp, rttLen);
      10. #endif
      11. while (1)
      12. {
      13. #ifdef __SEGGER_RTT_
      14. rttLen = sprintf((char*)rttTemp, "LED: %d\r\n", num++);
      15. SEGGER_RTT_Write(RTT_Channel, rttTemp, rttLen);
      16. #endif
      17. LED1_TOGGLE();
      18. LL_mDelay(300);
      19. LED0_TOGGLE();
      20. }
      Display All

      I think jlink don't scan the address of the RTT Control Block rightly.

      Best regards,
      Long
      embedded software engineer, live in shanghai.
    • Hello,

      Thank you for your inquiry.
      Such an issue is not known to us.
      We tried to reproduce the issue with the example project attached.
      Could you give it a try?
      Does that work on your board stand alone as well?

      Where do you place your RTT control block?
      Could you try using the latest J-Link software version?
      segger.com/downloads/jlink/#J-…twareAndDocumentationPack
      Does it work then?

      Best regards,
      Nino
      Files
      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 contact us per e-mail.
      Alternatively our support system can be used as well: segger.com/ticket/
    • Hello,

      Thank you for your help.
      It's ok on my board stand alone. I compare two project configurations and find it's different about start code. My project linker is GNU. You example select SEGGER.
      In practice, I found different linkers should have different startup codes. If i select gnu linker, it must select corresponding startup code.
      I don't place my RTT control block at specific address manual. I am using the latest J-Link software version. It's JLink v6.46i.

      This is my test code. I use STM32CubeMX to generate example code. Could you try using my example code?
      STM32F4xx_test.zip

      The jlink version is shown.



      The debug is shown and log messages is printed normally at Debug Terminal.


      Best regards,
      Long
      embedded software engineer, live in shanghai.
    • Hello Long,

      Please understand that we can't assist you further here as it would leave the assist scope of our forum as it is user responsibility to debug user made setup issues.
      We provided you with a working example project for reference which you can use for further investigation.

      Best regards,
      Nino
      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 contact us per e-mail.
      Alternatively our support system can be used as well: segger.com/ticket/