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.

CCS/MSP430FR6989: Opening COM port failed! Connection to MSP430 dev boards.

Part Number: MSP430FR6989
Other Parts Discussed in Thread: ENERGIA, , MSP430FR5969, MSP430G2553

Tool/software: Code Composer Studio

I can't connect to my MSP430FR6989 to upload a code. I tried Windows and Mac OS. I tried Code Composer Studio, Energia and CCS cloud. I get an error "Opening COM port failed!". The same happens to my other development boards, such as MSP430FR5969 and the one with MSP430G2553. What can I do to fix this?

  • Are you trying to load code to your target board or simply communicate with it via serial port?

    To load code, that normally happens via JTAG, you must use the Debug button in CCS (little bug icon). Are you using this or something different? This icon, by default, will perform the job of connecting to target and loading the code from your active project. 

  • AartiG, I am trying to do both. I get a problem as soon as I try to connect to the board. In CCS Cloud I go to "Target" and then "Connect COM port...". I choose proper COM port that corresponds to the board and I get the error that I attached to my post. I just tried to upload a code to the board without choosing "Target -> Connect COM port..." and it uploaded well in CCS Cloud. I can't get it to work in Energia or CCS. In Energia I choose "Tools -> Boards" and choose the right board. Then I choose the right COM port in "Tools -> Port". I can't even verify the code. It gives an error:

    "Energia: 1.6.10E18 (Mac OS X), Board: "MSP-EXP430FR6989LP"

    failed MSpanList_Insert 0x30d000 0x2ec6161db07c 0x0
    fatal error: MSpanList_Insert

    runtime stack:
    runtime.throw(0x2ad50b)
    /usr/local/go/src/runtime/panic.go:491 +0xad fp=0x7ffeefbff460 sp=0x7ffeefbff430
    runtime.MSpanList_Insert(0x2cb168, 0x30d000)
    /usr/local/go/src/runtime/mheap.c:692 +0x8f fp=0x7ffeefbff488 sp=0x7ffeefbff460
    MHeap_FreeSpanLocked(0x2c7d60, 0x30d000, 0x100)
    /usr/local/go/src/runtime/mheap.c:583 +0x163 fp=0x7ffeefbff4c8 sp=0x7ffeefbff488
    MHeap_Grow(0x2c7d60, 0x8, 0x0)
    /usr/local/go/src/runtime/mheap.c:420 +0x1a8 fp=0x7ffeefbff508 sp=0x7ffeefbff4c8
    MHeap_AllocSpanLocked(0x2c7d60, 0x1, 0x0)
    /usr/local/go/src/runtime/mheap.c:298 +0x365 fp=0x7ffeefbff548 sp=0x7ffeefbff508
    mheap_alloc(0x2c7d60, 0x1, 0x12, 0x0)
    /usr/local/go/src/runtime/mheap.c:190 +0x121 fp=0x7ffeefbff570 sp=0x7ffeefbff548
    runtime.MHeap_Alloc(0x2c7d60, 0x1, 0x10000000012, 0xf989)
    /usr/local/go/src/runtime/mheap.c:240 +0x66 fp=0x7ffeefbff5a8 sp=0x7ffeefbff570
    MCentral_Grow(0x2cfad8, 0x0)
    /usr/local/go/src/runtime/mcentral.c:197 +0x8b fp=0x7ffeefbff610 sp=0x7ffeefbff5a8
    runtime.MCentral_CacheSpan(0x2cfad8, 0x0)
    /usr/local/go/src/runtime/mcentral.c:85 +0x167 fp=0x7ffeefbff648 sp=0x7ffeefbff610
    runtime.MCache_Refill(0x309000, 0x12, 0x0)
    /usr/local/go/src/runtime/mcache.c:90 +0xa0 fp=0x7ffeefbff670 sp=0x7ffeefbff648
    runtime.mcacheRefill_m()
    /usr/local/go/src/runtime/malloc.c:368 +0x57 fp=0x7ffeefbff690 sp=0x7ffeefbff670
    runtime.onM(0x224f58)
    /usr/local/go/src/runtime/asm_amd64.s:273 +0x9a fp=0x7ffeefbff698 sp=0x7ffeefbff690
    runtime.mallocgc(0x120, 0x1beba0, 0x0, 0x0)
    /usr/local/go/src/runtime/malloc.go:178 +0x849 fp=0x7ffeefbff748 sp=0x7ffeefbff698
    runtime.newobject(0x1beba0, 0x309000)
    /usr/local/go/src/runtime/malloc.go:353 +0x49 fp=0x7ffeefbff770 sp=0x7ffeefbff748
    runtime.newG(0x276ba)
    /usr/local/go/src/runtime/proc.go:233 +0x2a fp=0x7ffeefbff788 sp=0x7ffeefbff770
    allocg(0x2ba660)
    /usr/local/go/src/runtime/proc.c:925 +0x1f fp=0x7ffeefbff798 sp=0x7ffeefbff788
    runtime.malg(0x8000, 0x2ba700)
    /usr/local/go/src/runtime/proc.c:2106 +0x1f fp=0x7ffeefbff7c8 sp=0x7ffeefbff798
    runtime.mpreinit(0x2baac0)
    /usr/local/go/src/runtime/os_darwin.c:137 +0x27 fp=0x7ffeefbff7e0 sp=0x7ffeefbff7c8
    mcommoninit(0x2baac0)
    /usr/local/go/src/runtime/proc.c:201 +0xc9 fp=0x7ffeefbff808 sp=0x7ffeefbff7e0
    runtime.schedinit()
    /usr/local/go/src/runtime/proc.c:138 +0x55 fp=0x7ffeefbff830 sp=0x7ffeefbff808
    runtime.rt0_go(0x7ffeefbff868, 0x14, 0x7ffeefbff868, 0x0, 0x0, 0x14, 0x7ffeefbffa10, 0x7ffeefbffa48, 0x7ffeefbffa54, 0x7ffeefbffa64, ...)
    /usr/local/go/src/runtime/asm_amd64.s:95 +0x116 fp=0x7ffeefbff838 sp=0x7ffeefbff830
    arduino-builder returned 2

    Error compiling for board MSP-EXP430FR6989LP."
  • Viacheslav Plotnikov said:
    I just tried to upload a code to the board without choosing "Target -> Connect COM port..." and it uploaded well in CCS Cloud. I

    That is good news. 

    I'm not very familiar with Energia so I can't comment on the errors you are seeing there. I would suggest continuing to run and debug code either on CCS Cloud or CCS desktop. 

  • AartiG, could you please connect any board to a computer and choose "Target -> Connect COM port..." in CCS Cloud? Does it show the same error? I tried it already on several boards and different computers. I wonder if there is a problem with CCS Cloud at the moment. My boards are updated with the latest firmware.
  • I just tried this with the new MSP430G2ET launchpad. I first clicked on Debug to load the program to device. Then I selected Target->Connect COM port and it did not show any errors. I clicked on Resume to run the program and text was printed on the serial port. Please see screenshot below.

  • AartiG, thank you very much for doing that. Sadly, I still have the same issue. I can use CCS Cloud but CCS and Energia can't be used to upload a code. I will try to figure out what the problem actually is and post here the solution that, hopefully, I will find.

  • Viacheslav Plotnikov said:
    I can use CCS Cloud but CCS and Energia can't be used to upload a code.

    With CCS Cloud, the required target configuration (Connection and Device specification) to connect and download code to the target happens behind the scenes. But for desktop CCS, this is something you need to specify via the target configuration file. In the target config file, make sure the Connection is TI MSP430 USB1 and Board or Device is your specific device. Do not select a UART Connection here. Once the target is connected and code downloaded, then you can open a serial COM port using Terminal view in CCS or some other terminal program outside CCS.

    Good luck and hope you are able to get this working soon.