cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing ITM debugger (SendChar/ReceiveChar) with a standalone PC program

mst0mst
Associate II
Posted on February 04, 2016 at 14:33

Greetings mates,

I have a curious question... I am using ITM_SendChar and ITM_ReceiveChar as simple and lightweight comm interface for a STM32F4 discovery.

But, is it possible to develop a standalone application/executable capable of communicate with the debugger?

I know that ST-Link utility and Keil, and other IDEs are capable of this, but now I need to develop my own C language based program for a PC.

I also know that UART to USB or Virtua Com Port are cheap solutions , but we have the requirement of use no hardware addons and or more wires

Thanks in advance,

P.S. Probably this is not the correct sub-forum for this question, excuse me in this case.

3 REPLIES 3
Posted on February 04, 2016 at 20:23

There's STVP and presumably the likes of Segger have libraries and DLLs for automation.

http://www.st.com/web/en/catalog/tools/PF210568

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mst0mst
Associate II
Posted on February 05, 2016 at 09:57

Thanks Clive1,

SEGGER provides a set of libraries and source code for PC called J-Link SDK, of course at a high price. But these appears to be good to excelent libraries.

STVP and related libraries are useful only for MCU programming, or custom programming algorithms, is not bad, but these aren´t useful for SWO data exchange.

Really is very annoying that there isn´t a ST-Link SDK   :(

Other people talk about OpenOCD, Texane and similar, but most information is regarding about Linux environment. A ready to use and easy to use set of libraries is preferable, due to SWO data exchange needs to be integrated into Matlab/Simulink graphical programming environment.

Posted on February 05, 2016 at 17:37

Unfortunately getting other developers to work on your project often involves payment, or a shared common goal. What you want to do is complicated both at the target and PC level. Around here we use serial ports, because they are cheap, in everything, and have drivers and interfaces accessible to user space applications. Get into JTAG/SWD it becomes a lot more involved, and the market significantly more niche. Pretty sure ST doesn't want to get involved in the endless technical support task this would become, it takes a lot of work to make things ''easy'', and there are likely much more profitable applications of these engineers.

Perhaps the most realistic solution is that the ST-LINK implement a VCP with connectivity to the SWO data? This at least would be platform agnostic.

You might want to check the newest F4-DISCO release (STM32F407G-DISC1), as it might provide the ST-LINK V2-1 implementation with a VCP/USART connectivity. The

http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1848/PF262395?icmp=tt2951_gl_pron_oct2015&sc=stm32f469idiscovery

definitely has this, along with mbed support. As do all the NUCLEO boards, the new NUCLEO-144 board being a particularly attractive alternative to the old F4-DISCO.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..