obe1line / stlink-trace Goto Github PK
View Code? Open in Web Editor NEWST-Link V2 ITM trace utility
ST-Link V2 ITM trace utility
Hi man, good work. I was looking to see whether something like this was already implemented in the stlink-v2->openocd->gdb toolchain, and found your work here. I was reading the source code of openocd tonight. The src/server/gdb_server.c sets a log callback function by calling log_add_callback in src/helper/log.c, which means that any part of openocd which wants to send a text message to GDB just has to call log_printf or log_printf_lf. This results in a packet sent by the gdbserver function gdb_output_con() to gdb. The packet is a VERBOSE REPLY which has a first byte of "O". The contents of the string are hex-encoded bytes. See for the protocol doc for example at
http://sourceware.org/gdb/talks/esc-west-1999/protocol.html.
So the easy integration for your ITM code into openOCD is to call log_printf with any received string, and it should get sent by openocd's gdb stub to be displayed in gdb.
Hopefully you can figure out the rest? I'm still inexperienced with the STM32 but I'd love to have ITM working for my programs.
gcc fails because there is an equals sign in #define CLOCK_DIVISOR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.