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.

MSP430FR5969 Nothing Printing

Hello all, this is an embarrassingly simple problem but I do not know how to fix it. Essentially, nothing is printing to my console in CCS. I have tried using sprintf statements and puts statements but literally nothing will print. For the sake of simplicity, I have included a snippet of code using the puts() statement that should print (right) but nothing is printing. Note: I am viewing the COM5 serial terminal which is the UART terminal for the MSP launchpad I am using, I don't know what other terminal I could be looking at. Appreciate any help!

#include <stdio.h>

(in main)

char MyStr[10] = "Python";
puts(MyStr);

  • You need to be looking at the CCS console.

    You might also try using fflush().

    You will only get stdio output when running under the debugger.

    If you want UART output, you need to roll your own routines. You can start with the echo examples, and then move to this tutorial:

    http://www.simplyembedded.org/tutorials/msp430-uart/

  • Hi Kieran,

    Have you tried increasing the heap size? For example on the basic new project if you attempt a hello world program, "Hello World" won't even write. This is because the heap size is set to 160 for default. If you change the heap size to 320 for example it should appear. To increase go to Project->Properties->MSP430 Linker -> Basic Options -> Heap Size and change from 160 to 320.

    Then Test the basic Hello world if you can.

    #include <msp430.h> 
    #include <stdio.h>
    
    /**
     * main.c
     */
    int main(void)
    {
    	WDTCTL = WDTPW | WDTHOLD;	// stop watchdog timer
    	printf("Hello World!\n");
    	return 0;
    }
    

  • "Have you tried increasing the heap size?"

    Good point, though stack size helps, too.

**Attention** This is a public forum