CrasyCat:
Is there a reason that Virtual SCI over the BDM cable seems to be possible with CW for HCS12 V4.6 for the Abatron BDI cable but not for the P&E Multilink/Cyclone Pro cables? There is example code with CW 4.6 for doing terminal i/o with the Abatron BDI with output going to the terminal component window. See the TERMBGND.C file for the "Calculator - Ram" example.
I believe that it might be possible to do console I/O over BDM with the P&E Multilink cable and the Codewarrior HIWAVE debugger. I see that the 3rd party tool called the NoIce debugger from John Hartman (see
http://www.noicedebugger.com/68hc12.html) has a Virtual SCI feature which works over BDM with the P&E Micro multilink cable.
Here is a short excerpt from the TERMBGND.c which shows how the terminal i/o ram buffer on the target is used to perform i/o to the terminal component. I believe that WSPADR is also used to define a terminal i/o buffer when HIWAVE uses D-Bug12 over a serial cable rather than BDM.
/* This module is used for the terminal emulation. It will allow
HI-WAVE to communicate through the BDM interface with an application
running on the target system */
#ifndef WSPADR /* if not defined on the command line */
#define WSPADR 0x2000 /* define work space for HC912DG128 */
#endif
typedef struct {
unsigned char rxFlag;
unsigned char rxChar;
char* txBuffer;
} TermDataT;
#define TermData (*((TermDataT*)(WSPADR)))
static char txBuffer[2];
char GetChar(void)
{
char rxChar;
while (TermData.rxFlag == 0); /* wait for input */
rxChar = TermData.rxChar;
TermData.rxFlag = 0;
return rxChar;
}
void PutChar(char ch)
{
txBuffer[0] = ch;
txBuffer[1] = 0;
TermData.txBuffer = txBuffer;
while (TermData.txBuffer != 0); /* wait for output buffer empty */
}