Dear MARC community,
While running bare metal applications, we faced the problem of getting
debug information from cores to the MCPC.
The sccGui shows data send from the SCC via pseudo UART, but
lacks the possibility of logging into files.
Furthermore, using the GUI with our remote access from Germany
is not much fun.
Since everything else in our build chain can be done from a terminal,
we implemented a new command line tool: sccUART.
It is designed to run on the host pc and captures all
characters that the SCC sends by calling out to either
0x2f8 or 0x3f8.
Once a core send 80 characters or a newline char, this data, preceded
by the processor identifier, is printed.
This buffering data avoids a mixup of output from different cores.
Additionally, sccUART can create a file for each core's output.
Example invocation:
./sccUART -f log
Example output:
0: This is core 0.
Created files: log0, log1, …, log47
'tail -f log0' allows to track only rck00's output
Example asm code to run on SCC (nasm style)
; void __outprint(char c);
global __outprint
__outprint:
push ebp
mov ebp, esp ; save caller context
push edx
mov eax, [ebp+8] ; get parameter
mov edx, 0x2f8
out dx, al ; sent parameter to mcpc
pop edx
pop ebp
ret
The tool's implementation bases on sccGui and sccDump and,
thus, you need a qt installation for building it.
Unfortunately, qt is not part of the standard MCPC software and
we installed qt and its dependencies manually.
A document covering the required steps is included in our
package, but be warned: it may take up to a coffee pot.
As for now sccUART is not compatible with the linux serial
driver (aka /dev/ttyS0). This is work in progress. Feel free
to contribue.
For any questions regarding sccUART:
jana.traue(at)tu-cottbus.de
tpresche(at)informatik.tu-cottbus.de