0

Currently I am working on a space/pin-constraint project. The software is run on a ARM M4F (MAX32660 MCU) Datasheet.

I have connected the MCU to my Dev-Machine via a Segger J-Link J-Link Debug probe through the SWD-Port.

I am using Eclipse CDT C/C++ Eclispe CDT C/C++.

My question:

Is it possible to send custom data via the SWD interface and show it in a Eclipse "Console-Like" window? I am okay with MCU-To-Eclipse Data-Direction and standard CMSIS Libs, as well as self-coded.

I am thinking about:

void SWD_Write(u32 data){ /* magic */ }

.....
if ( ... ){ SWD_Write( .... ); }
.....

Which results in a text-output (Best with timestamps, but not an issue if none available). It must be possible to export the text (either manual copy/paste or piped to file).

What I have researched so far:

  • I read about the ITM Article about ARM ITM Peripheral. But sadly, I cant use it as it requires a SWO pin - which is not available on my MCU.
  • Currently I am using stack variables and assigning values to them. I then hover the mouse and read the value from the Eclipse Debug GUI. This is not what I want!
JYelton
  • 32,302
  • 33
  • 134
  • 249
ElectronicsStudent
  • 2,746
  • 5
  • 18
  • Since you're using a Segger J-Link, you might consider using [Ozone](https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/application-debugging/) to debug instead of Eclipse. That will allow you to use Segger's "RTT" to perform printf-like operations over SWD from the MCU to a console window in the Ozone debugger application. – brhans Mar 16 '23 at 20:59
  • You seem to be looking for *semihosting*. – Eugene Sh. Mar 16 '23 at 20:59
  • @brhans According to https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/application-debugging/ "Ozone handles/works with Single Wire Output (SWO). On Cortex-M microcontrollers an additional pin on the debug interface, the SWO pin, can be used to send terminal output to the debugger" the SWO pins is required - which is not available. Or am i misunderstanding? – ElectronicsStudent Mar 16 '23 at 21:03
  • Hmmm - good question ... I know I've used Ozone on a project without SWO, but I can't remember if I used RTT at the same time. – brhans Mar 16 '23 at 21:08
  • @brhans Okay. Thank you for the information though! I downloaded to app for eval purposes and it looks great! Did not know about it yet, so thank you very much! – ElectronicsStudent Mar 16 '23 at 21:10
  • You might also consider [Crossworks](https://www.rowley.co.uk/crossworks/Evaluating.htm) instead of Eclipse for both developing & debugging - it offers similar printf-like functionality (through <__cross_studio_io.h>) and (as far as I remember) doesn't have any particular debugger requirements. It's not free, but you get 30 days of full-functionality evaluation or an unlimited time 16kB code size limit. – brhans Mar 16 '23 at 21:12
  • @EugeneSh. Is this the Semihosting you mentioned? https://mcuoneclipse.com/2023/03/09/using-semihosting-the-direct-way/ – ElectronicsStudent Mar 16 '23 at 21:16
  • Yes. Not sure it is the best resource though, but looks quite comprehensive – Eugene Sh. Mar 16 '23 at 23:29

0 Answers0