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.

MSP430G2955: Energia code upload issue for MSP430G2955

Part Number: MSP430G2955
Other Parts Discussed in Thread: ENERGIA, MSP-EXP430G2ET, , ENERGYTRACE

Hi, I am trying to use MSP430G2955 on a custom board and MSP-EXP430G2ET LP to program it using SBW interface and Energia IDE. I can program the MSP430G2955 using CCS but I am unable to do it using Energia (version 23 or older). I have added the MSP430G2955 support to Energia using https://github.com/energia/msp430-lg-core/tree/G2955_support but while uploading I get following error:

MSPDebug version 0.24 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2016 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----------------- NOTE ------------------
Modified version of mspdebug for Energia
            Do not use standalone
-----------------------------------------
Chip info database from MSP430.dll v3.3.1.4 Copyright (C) 2013 TI, Inc.

Using new (SLAC460L+) API
MSP430_GetNumberOfUsbIfs
MSP430_GetNameOfUsbIf
Found FET: COM6
MSP430_Initialize: COM6
tilib: MSP430_VCC: Could not set device Vcc (error = 10)
Firmware version is 31000003
MSP430_VCC: 3000 mV
tilib: device initialization failed
the selected serial port tilib: device initialization failed
 does not exist or your board is not connected

PS: I have 47k resistor pulled-up on RESET pin on my G2955 board.

  • Hi Ali,

    I don't think it will be possible to do so since the Energytrace module traces the energy in the launchpad itself rather than the custom board.

    Best Regards,

    Diego Abad

  • Hi Diego, I am asking about the Energia IDE (Arduino like IDE for MSP430 Microcontrollers) and not the energytrace module. Thanks

  • I guess that there is some problem between old mspdebug and new ezFET, probably msp430.dll related. There is no break point debugging in Energia, so open source msp430flasher on any OS should work just fine for downloading binary to target device. Just try standalone CLI msp430flasher outside Energia with your setup to be sure that is working without issues. And than configure it to be default downloader inside Energia...

    1. copy msp430flasher (and related files) to energia-version\hardware\tools\msp430\bin

    2. add record for new uploading tool to energia-version\hardware\energia\msp430\platform.txt

    # msp430flasher
    tools.sbwplus.upload.params.verbose=
    tools.sbwplus.upload.params.quiet=
    tools.sbwplus.path={runtime.tools.mspdebug.path}
    tools.sbwplus.cmd.path={path}/bin/msp430flasher
    tools.sbwplus.upload.pattern={cmd.path} -e ERASE_MAIN -w "{build.path}/{build.project_name}.hex" -v -z [VCC]

    3. uploading tool for different boards (selectable by IDE) in energia-version\hardware\energia\msp430\boards.txt
    file should be modified from mspdebug or dslite to msp430flasher

    ...
    MSP-EXP430FR4133LP.upload.tool=msp430flasher
    ...
    MSP-EXP430G2553LP.upload.tool=msp430flasher
    ...
    MSP-EXP430FR5739LP.upload.tool=msp430flasher
    ...

    After this modifications, and restarted Energia, it should be ready for using MSP430flasher (with last version of msp430.dll) by IDE Upload button.

  • I guess that there is some problem between old mspdebug and new ezFET, probably msp430.dll related.

    A more recent version is available: https://github.com/dlbeer/mspdebug

    $ ./mspdebug --version
    MSPDebug version 0.25 - debugging tool for MSP430 MCUs
    Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc.
    

  • Thanks for your help.
    I was able to upload using MSP430 separately, and with your suggestion I was able to do it using Energia IDE.
    Few changes in the platform.txt file were required (mainly changing sbwplus to msp430flasher):

    platform.txt


    # msp430flasher
    tools.msp430flasher.upload.params.verbose=
    tools.msp430flasher.upload.params.quiet=
    tools.msp430flasher.path=C:\energia-1.8.10E23-windows\energia-1.8.10E23\hardware\tools\msp430
    tools.msp430flasher.cmd.path={path}/bin/msp430flasher.exe
    tools.msp430flasher.upload.pattern={cmd.path} -e ERASE_MAIN -w "{build.path}/{build.project_name}.hex" -v -z [VCC]

    boards.txt 

    #MSP-EXP430G2955SB

    MSP-EXP430G2955SB.vid.0=0x2341
    MSP-EXP430G2955SB.pid.0=0x0c9f

    MSP-EXP430G2955SB.name=MSP-SocketBoard w/ MSP430G2955

    MSP-EXP430G2955SB.build.mcu=msp430g2955
    MSP-EXP430G2955SB.build.f_cpu=16000000L
    MSP-EXP430G2955SB.build.core=msp430
    MSP-EXP430G2955SB.build.variant=MSP-EXP430G2955SB
    MSP-EXP430G2955SB.build.board=MSP_EXP430G2955SB
    MSP-EXP430G2955SB.build.extra_flags=

    MSP-EXP430G2955SB.upload.tool=msp430flasher
    MSP-EXP430G2955SB.upload.protocol=
    MSP-EXP430G2955SB.upload.maximum_size=57088
    MSP-EXP430G2955SB.upload.maximum_data_size=4096

**Attention** This is a public forum