Terminal I/O host to target with 4.02e example files

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Terminal I/O host to target with 4.02e example files

    Hello,
    I'm using IAR 5.30 with Jlink 4.02e and terminal I/O.
    So far I've got no problem using the code provided in SEGGER\JLinkARM_V402e\Samples\DCC\IAR.
    The only thing I could not make working is Host to target via terminal I/O.

    I've seen in your code this comment:

    Source Code

    1. There is a new capability flag. C-SPY will use the new protocol when this is set.
    2. #define DCC_CAP_TERM_OUT 0x80


    So i think this is my problem. Where do i need to put this #define. In my C code? Seems strange, how will it have effect?
    Anyhow, I've tried it, and has no effect.

    When I enter commands in Terminal I/O the buffer isn't flushed. If I deactivate buffering on terminal I/O input (host->target) I don't receive commands 0x93xx_xxxx.
    The only commands I receive in :

    C Source Code

    1. /*********************************************************************
    2. *
    3. * _HandleRead
    4. *
    5. * Function description
    6. * Performs Command / data read from host
    7. */
    8. static void _HandleRead(void) {
    9. U32 Data;
    10. U32 val = _ReadDCCStat();
    11. if ((val & 1) == 0) { // Data or command received ?
    12. return; // Nothing received
    13. }
    14. Data = _ReadDCC();
    Display All


    Val is always equal to 0x6000_00xx.

    Do I miss something with Cspy?

    Thx for any help!