Jump to content
MichaelCollier

msp430 upload command line example please?

Recommended Posts

Hello,

 

I'm looking for a command line example for uploading to msp4302553 on a launchpad.

 

Can anyone advise how to enable the output window to show the params being passed to the command shell? Or alternatively paste an example here for me please?  

 

I usually modify the preferences.txt file to make "upload.verbose=true" then copy and paste into a command prompt / terminal window. This works for arduino avr/pic32 etc. But for the energia IDE it doesn't seem to show (I only get feedback from the uploader).

 

I'm guessing the mspdebug.exe program is used since it appears quickly in task manager. With previous bootloaders I would provide a port-number, file-name, part number, memory-type, read/write/verify flags etc etc. but rather than guess it would be very helpful to have an exact copy of the energia settings for this.

 

 

Thanks in advance,

Michael

Share this post


Link to post
Share on other sites

Have you tried enabling the verbose options in Energia's "File | Preferences" menu?

 

I get:

E:\energia-0101E0014\hardware\tools\msp430\bin\msp430-g++ -c -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=14 -IE:\energia-0101E0014\hardware\msp430\cores\msp430 -IE:\energia-0101E0014\hardware\msp430\variants\launchpad C:\Users\Kirk\AppData\Local\Temp\build6355379804887280731.tmp\sketch_feb01a.cpp -o C:\Users\Kirk\AppData\Local\Temp\build6355379804887280731.tmp\sketch_feb01a.cpp.o 
[E:\energia-0101E0014\hardware\tools\msp430\bin\msp430-g++, -c, -Os, -Wall, -ffunction-sections, -fdata-sections, -mmcu=msp430g2553, -DF_CPU=16000000L, -MMD, -DARDUINO=101, -DENERGIA=14, -IE:\energia-0101E0014\hardware\msp430\cores\msp430, -IE:\energia-0101E0014\hardware\msp430\variants\launchpad, C:\Users\Kirk\AppData\Local\Temp\build6355379804887280731.tmp\sketch_feb01a.cpp, -o, C:\Users\Kirk\AppData\Local\Temp\build6355379804887280731.tmp\sketch_feb01a.cpp.o]
E:\energia-0101E0014\hardware\tools\msp430\bin\msp430-gcc -c -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=14 -IE:\energia-0101E0014\hardware\msp430\cores\msp430 -IE:\energia-0101E0014\hardware\msp430\variants\launchpad E:\energia-0101E0014\hardware\msp430\cores\msp430\atof.c -o C:\Users\Kirk\AppData\Local\Temp\build6355379804887280731.tmp\atof.c.o 

... and so on.

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for reply..

 

The output you list is for the building part (hence calls to gcc), I need the output that comes after that, during the upload process. The line might begin something like this..

 

E:\energia-0101E0014\hardware\tools\msp430\mspdebug  [followed by params here..]

 

As I mentioned before, I have enabled "upload.verbose=true" which normally works on other arduino IDE's, I'm not sure if energia IDE supports this param or if it has different name.

Share this post


Link to post
Share on other sites

@@MichaelCollier -

In the File | Preferences menu, there are checkboxes for verbose output for compilation and uploading. In the "preferences.txt" file it stores "upload.verbose=true" if the checkbox is checked and "upload.verbose=false" if it is not checked.

 

This is the output following compilation of the basic sketch it loads when you start Energia, with that flag enabled.

 

 

Binary sketch size: 389 bytes (of a 16,384 byte maximum)
E:\energia-0101E0014\hardware\tools\msp430\mspdebug\mspdebug tilib --force-reset "prog C:\Users\Kirk\AppData\Local\Temp\build6309369342544986447.tmp\sketch_feb01a.cpp.hex" 
MSPDebug version 0.22 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2013 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.

MSP430_GetNumberOfUsbIfs
MSP430_GetNameOfUsbIf
Found FET: HID0013:COM4
MSP430_Initialize: HID0013:COM4
Firmware version is 20409001
MSP430_VCC: 3000 mV
MSP430_OpenDevice
MSP430_GetFoundDevice
Device: MSP430G2xx3 (id = 0x00de)
2 breakpoints available
MSP430_EEM_Init
Chip ID data: 25 53
Erasing...
Programming...
Writing  358 bytes at c000...
Writing   32 bytes at ffe0...
Done, 390 bytes total
MSP430_Run
MSP430_Close

Share this post


Link to post
Share on other sites

That's great, thanks, works for me now..

 

 

..If anyone needs this in future..

 

mspdebug tilib --force-reset "prog C:\Blink.cpp.hex"

 

The manual for mdsdebug can be found here: http://mspdebug.sourceforge.net/manual.html

 

Note the use of quotations around the entire prog command and filename parameter, it caught me out...

 

Thanks again,

Michael

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×