starkrobotics 0 Posted December 15, 2013 Share Posted December 15, 2013 I ended up installing a Lubuntu partition on my laptop and decided that I'd like to figure out how to program my MSP430. After trying for some time to get Eclipse working, I decided that it would probably be simpler (and slightly more tech-savvy) to do everything via Makefiles and the command prompt. Anybody else here doing the same thing? Quote Link to post Share on other sites
rockets4kids 204 Posted December 15, 2013 Share Posted December 15, 2013 Yup. Emacs + mspgcc + make + mspdebug is my preferred toolchain. Quite a number of people work completely outside of the CCS environment. Quote Link to post Share on other sites
simpleavr 399 Posted December 15, 2013 Share Posted December 15, 2013 I am using Linux Mint. For starter projects command line environment is more agile. On windows side, I install cygwin for a similar build environment. If you are new to msp430, I suggest you download the code examples to start with, http://processors.wiki.ti.com/index.php/MSP430G2_LaunchPad it pretty much covers all the various device features in one-file example projects. It is very handy to cut&paste from these examples. I don't even use makefiles as most of my projects are one-file big. I use the following script to compile. It will just take my last c file edited and compile it + flash. Every quick to play around. #!/bin/bash MMCU=msp430g2231 GMCU=G2231 PRG=$1 if [ -z $PRG ]; then LAST_FILE=`ls -tr *.c | tail -1` PRG=`basename $LAST_FILE .c` fi SRC=$PRG.c GCCBIN=/usr/bin CFLAGS="-Os -Wall -ffunction-sections -fdata-sections -fno-inline-small-functions -Wl,-Map=$PRG.map,--cref -Wl,--relax -Wl,--gc-sections" rm *.elf rm *.hex echo "$GCCBIN/msp430-gcc $CFLAGS -I$GCCBIN/../msp430/include -mmcu=$MMCU -o $PRG.elf $PRG.c" $GCCBIN/msp430-gcc $CFLAGS -I$GCCBIN/../msp430/include -mmcu=$MMCU -o $PRG.elf $PRG.c if [ $? -ne 0 ]; then exit fi $GCCBIN/msp430-objdump -DS $PRG.elf > $PRG.lst $GCCBIN/msp430-strip $PRG.elf $GCCBIN/msp430-size --totals $PRG.elf $GCCBIN/msp430-objcopy -O ihex $PRG.elf $PRG.hex # mspdebug rf2500 "prog $PRG.elf" exit Quote Link to post Share on other sites
chibiace 46 Posted December 15, 2013 Share Posted December 15, 2013 i use nano,gedit and mspdebug with mspdebug rf2500 'prog main.elf' in a script under /usr/bin/ starkrobotics 1 Quote Link to post Share on other sites
starkrobotics 0 Posted December 16, 2013 Author Share Posted December 16, 2013 i use nano,gedit and mspdebug with mspdebug rf2500 'prog main.elf' in a script under /usr/bin/ Thanks! For whatever reason I've never tried using only single quotemarks, and I could download/run the program if I entered that line right into the cmd prompt. But I could never get the "prog main.elf" line to work in any of my scripts. Cripes, syntax is a pain.... Quote Link to post Share on other sites
rockets4kids 204 Posted December 16, 2013 Share Posted December 16, 2013 man bash Quote Link to post Share on other sites
spirilis 1,265 Posted December 16, 2013 Share Posted December 16, 2013 The double-quotes should still work. starkrobotics 1 Quote Link to post Share on other sites
starkrobotics 0 Posted December 19, 2013 Author Share Posted December 19, 2013 The double-quotes should still work. Hmm yeah. I went back and re-ran my script with double-quotes, worked just fine. It's possible I had the syntax wrong in something else... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.