RTT Control Block not found when using SRAM2 on some STM32L4 series

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

    • RTT Control Block not found when using SRAM2 on some STM32L4 series

      Just wanted to put this here in case anyone else runs into it.

      The STM32L43xxx/44xxx/45xxx/46xxx microcontroller family has SRAM1 and SRAM2. Difference is SRAM2 has extra features like optional parity check. For this problem, I do not have parity check enabled.

      When SEGGER_RTT_SECTION is not set, the linker may place _SEGGER_RTT and other RTT stuff in SRAM2 since RAM space (.data + .bss) is contiguous starting at 0x2000 0000 and there is no distinction from the linker's perspective.


      When the RTT Control Block _SEGGER_RTT is put into SRAM2 part of RAM space (for example, above 0x2002 0000), SystemView cannot see it at all, whether by using Automatic Detection or even manually put in the address of _SEGGER_RTT found from .map file!


      Note that _UpBuffer can still be in SRAM2 and it would still function. (i.e. SEGGER_SYSVIEW_SECTION does not need to be explicitly set to SRAM1)
    • Hello,

      Thank you for your inquiry.
      J-Link will only automatically search for a set default RAM section that we know will always be accessible after reset.
      This is usually RAM starting at 0x20000000 + accessible RAM size.
      Should you use some other RAM section it is customer responsibility to make sure it is initialized correctly and the search range has to be set manually to include that RAM as well e.g. with exec command: SetRTTSearchRanges

      sincostan wrote:

      When the RTT Control Block _SEGGER_RTT is put into SRAM2 part of RAM space (for example, above 0x2002 0000), SystemView cannot see it at all, whether by using Automatic Detection or even manually put in the address of _SEGGER_RTT found from .map file!
      Setting the address manually should work. Could you provide a simple example project for reproduction purposes using Embedded Studio segger.com/products/development-tools/embedded-studio/?


      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 ticketing system can be used as well: segger.com/ticket/