README.md: Fix example program, elaborate on blurb
The example program (which is untested by the way) is corrected to generate the desired sawtooth, and a more realistic baudrate is chosen. Blurb extended by supported signal types.
This commit is contained in:
parent
3ad06eeada
commit
8b3a9ed381
21
README.md
21
README.md
@ -3,7 +3,7 @@
|
|||||||
▓ ▓ ▒ ░ ██ ██ ██ Streaming Event Trace
|
▓ ▓ ▒ ░ ██ ██ ██ Streaming Event Trace
|
||||||
▓ ▓ ▓ ░░ ███████ █████ ██ A tiny signal tracing library
|
▓ ▓ ▓ ░░ ███████ █████ ██ A tiny signal tracing library
|
||||||
▓ ▓ ▒ ░ ██ ██ ██
|
▓ ▓ ▒ ░ ██ ██ ██
|
||||||
▓▓▓▓▓ ░░░ ███████ ███████ ██ Version 1.0.1 Alpha
|
▓▓▓▓▓ ░░░ ███████ ███████ ██ Version 1.0.2 Alpha
|
||||||
```
|
```
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
@ -12,6 +12,9 @@ SET is a small tracing library written in C99.
|
|||||||
It is highly optimized for minimal data usage and aims to be easy to use
|
It is highly optimized for minimal data usage and aims to be easy to use
|
||||||
while also being flexible enough to be integrated in hard real time systems.
|
while also being flexible enough to be integrated in hard real time systems.
|
||||||
|
|
||||||
|
Signals types supported are almost all skalars (integers, floats),
|
||||||
|
integer arrays, events and strings.
|
||||||
|
|
||||||
# How to use
|
# How to use
|
||||||
|
|
||||||
SET requires the integrator to implement a few functions such as the timestamp and output functions in order to work.
|
SET requires the integrator to implement a few functions such as the timestamp and output functions in order to work.
|
||||||
@ -19,11 +22,11 @@ Apart from that, it is up to the specific use case how to stream data.
|
|||||||
In its simplest form, traces are processed with no real time demands on a dedicated interface.
|
In its simplest form, traces are processed with no real time demands on a dedicated interface.
|
||||||
For more advanced usage, this library allows packets to be written, as the time budget allows,
|
For more advanced usage, this library allows packets to be written, as the time budget allows,
|
||||||
into any given buffer to send its contents via DMA to for instance a serial output.
|
into any given buffer to send its contents via DMA to for instance a serial output.
|
||||||
|
Due to its packet format, the output interface can still be utilitzed as is unless
|
||||||
|
the text sent contains the packet preamble or epilouge, which are "\033[s" and "\033[u" respectively.
|
||||||
|
|
||||||
Simple example on Arduino:
|
## Simple example on Arduino
|
||||||
|
|
||||||
````c
|
````c
|
||||||
|
|
||||||
#include "set.h"
|
#include "set.h"
|
||||||
|
|
||||||
// Basic implementation of output and timestamp retrieval
|
// Basic implementation of output and timestamp retrieval
|
||||||
@ -43,14 +46,14 @@ void setup()
|
|||||||
set_enable(set_drop); // drop traces on full buffer
|
set_enable(set_drop); // drop traces on full buffer
|
||||||
|
|
||||||
set_u8trace("Serial.Ready", 0, false);
|
set_u8trace("Serial.Ready", 0, false);
|
||||||
Serial.begin(921600);
|
Serial.begin(2000000);
|
||||||
while (!Serial);
|
while (!Serial);
|
||||||
set_u8trace("Serial.Ready", 1, false);
|
set_u8trace("Serial.Ready", 1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
unsigned sawtooth = 0;
|
static unsigned sawtooth = 0;
|
||||||
|
|
||||||
if (sawtooth < 0xFFFF) sawtooth++;
|
if (sawtooth < 0xFFFF) sawtooth++;
|
||||||
else sawtooth = 0;
|
else sawtooth = 0;
|
||||||
@ -92,8 +95,10 @@ It expects data via stdin, and displays any non-tracing traffic.
|
|||||||
|
|
||||||
Example usage tracing remotely via SSH:
|
Example usage tracing remotely via SSH:
|
||||||
````bash
|
````bash
|
||||||
# Open /dev/ttyUSB0 via SSH and record to "trace.vcd" with timescale of 1 microsecond with diagnostics enabled
|
# Open /dev/ttyUSB0 via SSH and record to "trace.vcd"
|
||||||
ssh user@host -C "picocom -b 921600 /dev/ttyUSB0" | ./set_record.py -d trace.vcd -s ./Sources -t "1 us" --diagnostics
|
# with timescale of 1 microsecond with diagnostics enabled
|
||||||
|
ssh user@host -C "picocom -b 921600 /dev/ttyUSB0" | \
|
||||||
|
./set_record.py -d trace.vcd -s ./Sources -t "1 us" --diagnostics
|
||||||
````
|
````
|
||||||
|
|
||||||
The resulting VCD can be inspected with dedicated programs such as GTKwave.
|
The resulting VCD can be inspected with dedicated programs such as GTKwave.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user