This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

printf() through Spy-Bi-Wire hangs [MSP430, CCStudio]

Other Parts Discussed in Thread: CCSTUDIO, MSP430FR5739

Colleagues,

I can’t seem to make the printf() to work through Spy-Bi-Wire (SBW) in CCStudio. The program execution just hangs, when it gets to printf().

My setup consists of:

  • MSP430FR5739
  • MSP-FET430UIF
  • Code Composer Studio 5.3.0.00090



To try to enable the printf(), I’ve changed these settings in Project->Properties:

  • Console I/O (CIO) enabled
  • Stack size 768, heap size 1024
  • printf() support minimal

Here’s my code. Only the while loop was written by me. The rest was when I created the project with Grace.

/*
 * ======== Standard MSP430 includes ========
 */
#include <msp430.h>
#include <stdio.h>

/*
 * ======== Grace related includes ========
 */
#include <ti/mcu/msp430/Grace.h>

/*
 *  ======== main ========
 */
int main(void)
{
    Grace_init();                   // Activate Grace-generated configuration

    while (1)
    {
        P1OUT |= BIT0;
        __delay_cycles(100000);
        P1OUT &= ~ (BIT0);
        __delay_cycles(100000);

        printf("*");    // hangs here
    }

    return (0);
}

The problem is that program execution hangs, when it gets to printf().

What am I missing?  Any suggestion, insight or reference is really appreciated!

Cheers,
- Nick

  • IIRC, console I/O works by placing a breakpoint into the putchar and getchar functions. This breakpoint then is handled by the debugger and fetches/injects the console data through JTAG.

    Apparently the breakpoint is set and triggered but not properly handled. Or something like that.

  • At one point, I though that there's a problem with me CCStudio installation.  Initially, I've installed 5.3 on top of 4. I've installed CCStudio 5.3 on another computer (virgin one, on the 1st computer, I've installed ).  I'm seeing exactly the same problem.

    Come to think of it, I'm using the same FET430. May be, the problem is in my FET430 or it's firmware.

    Have anyone else had problems like this?

    - Nick

**Attention** This is a public forum