We have an M0 here (custom mfg, but OTS IP), and need to use RTT fluidly. I've got the V5.10p software and Keil UV5 and a USB J-Link through JTAG. We are running code in RAM.
When I did the RTT Viewer and "Existing Session", I got:
0> SEGGER J-Link V5.02f - Real time terminal output
0> J-Link V10 compiled Mar 15 2016 18:03:41 V10.0, SN=50000599
0> Process: UV4.exe
But no other viewer output. This looks like text which sources from the debugger, not our cortex. That last line looks irregular- I'm using UV5, not UV4. I went with USB, "Cortex-M0", JTAG, 1MHz, RTT Control Block 0=auto, got nothing.
Inside Keil, I tried the Command window and typed _SEGGER_RTT and got 0x10000434, so I put that into "RTT Control Block" and it WORKS, my printf data comes across and anything I type ends up in the downlink buffer. But I can't ask our users to manually check the address after every compile and copy that into the config.
The manual says SEGGER_RTT_IN_RAM should be defined as (1) in certain cases. I found this in older versions of RTT code (which also didn't work automatically, with or without this defined to 1, and I called the Init task)- but it does NOT exist at all in v5.10p, even though it's still in the User Guide. There's nothing to set.
I read some ambiguous stuff that the SEGGER_RTT_IN_RAM wasn't necessary if you had the Jlink, even with the code in RAM, it could get the _SEGGER_RTT from code automatically. I did see the Keil Command window say "ws SEGGER_RTT_IN_RAM" at some point, which I thought was RTT Viewer grabbing the address without exhaustively searching RAM. But it wasn't working with or without that SEGGER_RTT_IN_RAM =1. I don't see any way to query RTT Viewer to see what address it's trying to use for the Buffer Control Block, although Channel Infos does give the buffer sizes.
The actual question: how can I get this to automatically find the RTT Control block, instead of asking Keil for _SEGGER_RTT and copying it into the Viewer config manually?
When I did the RTT Viewer and "Existing Session", I got:
0> SEGGER J-Link V5.02f - Real time terminal output
0> J-Link V10 compiled Mar 15 2016 18:03:41 V10.0, SN=50000599
0> Process: UV4.exe
But no other viewer output. This looks like text which sources from the debugger, not our cortex. That last line looks irregular- I'm using UV5, not UV4. I went with USB, "Cortex-M0", JTAG, 1MHz, RTT Control Block 0=auto, got nothing.
Inside Keil, I tried the Command window and typed _SEGGER_RTT and got 0x10000434, so I put that into "RTT Control Block" and it WORKS, my printf data comes across and anything I type ends up in the downlink buffer. But I can't ask our users to manually check the address after every compile and copy that into the config.
The manual says SEGGER_RTT_IN_RAM should be defined as (1) in certain cases. I found this in older versions of RTT code (which also didn't work automatically, with or without this defined to 1, and I called the Init task)- but it does NOT exist at all in v5.10p, even though it's still in the User Guide. There's nothing to set.
I read some ambiguous stuff that the SEGGER_RTT_IN_RAM wasn't necessary if you had the Jlink, even with the code in RAM, it could get the _SEGGER_RTT from code automatically. I did see the Keil Command window say "ws SEGGER_RTT_IN_RAM" at some point, which I thought was RTT Viewer grabbing the address without exhaustively searching RAM. But it wasn't working with or without that SEGGER_RTT_IN_RAM =1. I don't see any way to query RTT Viewer to see what address it's trying to use for the Buffer Control Block, although Channel Infos does give the buffer sizes.
The actual question: how can I get this to automatically find the RTT Control block, instead of asking Keil for _SEGGER_RTT and copying it into the Viewer config manually?
The post was edited 1 time, last by Dannym ().