Hello:
Our company has just started to use the RTT functionality of the JLink for terminal output. I have two issues that hopefully have answers and are not super hard to solve. We have tried fiddling with RTT for the past day or so.
First question:
We are using an STM32L476 with 128K RAM. There are two RAM banks: one starts at 0x10000000 (32K) the other starts at 0x20000000 (96K). When the JLink server starts up and we click the RTT tab and start it, the GDB server runs its scan process to try and find the RTT control block. It never finds it because the GDB server is only scanning RAM bank 2. Our control block is in RAM bank 1. Now to test the theory, we forced the control block into RAM bank 2 and it found it, and RTT worked fine. However, this is not an option in our end application; we cannot force the control block into a fixed location. Why is the GDB server not scanning the entire RAM memory map for the control block? I went poking around down into the segger installation directory to see if I could find a file where the MCU memory spaces are mapped out. There is a file called MCU.csv which seems to map out all of the memory spaces for all the supported MCUs. On the other hand... it looks like this file only supports a single bank of RAM and not multiple banks. If I scroll down to my selected MCU, it maps out bank 2 (the one that GDB was scanning) and not bank 1. Does this file control the memory map for the MCUs while scanning? If so... why does it not support multiple banks?
Second question:
We have tried going into low power modes while using RTT. We have tried to go into what is referred to as "sleep" and "stop2" on the STM32L4 MCU. RTT does not like either mode and the GDB server fails to read the RTT data memory if we go into either of these modes using the WFI instruction. We have resolved to the fact that this might be a necessary evil to not go into the low power modes while using RTT. Is this something that Segger is aware of? Is it not possible to go into low power modes with RTT, or do you think it is just a problem with the STM32L4 part?
Thanks
Our company has just started to use the RTT functionality of the JLink for terminal output. I have two issues that hopefully have answers and are not super hard to solve. We have tried fiddling with RTT for the past day or so.
First question:
We are using an STM32L476 with 128K RAM. There are two RAM banks: one starts at 0x10000000 (32K) the other starts at 0x20000000 (96K). When the JLink server starts up and we click the RTT tab and start it, the GDB server runs its scan process to try and find the RTT control block. It never finds it because the GDB server is only scanning RAM bank 2. Our control block is in RAM bank 1. Now to test the theory, we forced the control block into RAM bank 2 and it found it, and RTT worked fine. However, this is not an option in our end application; we cannot force the control block into a fixed location. Why is the GDB server not scanning the entire RAM memory map for the control block? I went poking around down into the segger installation directory to see if I could find a file where the MCU memory spaces are mapped out. There is a file called MCU.csv which seems to map out all of the memory spaces for all the supported MCUs. On the other hand... it looks like this file only supports a single bank of RAM and not multiple banks. If I scroll down to my selected MCU, it maps out bank 2 (the one that GDB was scanning) and not bank 1. Does this file control the memory map for the MCUs while scanning? If so... why does it not support multiple banks?
Second question:
We have tried going into low power modes while using RTT. We have tried to go into what is referred to as "sleep" and "stop2" on the STM32L4 MCU. RTT does not like either mode and the GDB server fails to read the RTT data memory if we go into either of these modes using the WFI instruction. We have resolved to the fact that this might be a necessary evil to not go into the low power modes while using RTT. Is this something that Segger is aware of? Is it not possible to go into low power modes with RTT, or do you think it is just a problem with the STM32L4 part?
Thanks
The post was edited 1 time, last by LostTime77 ().