Tuchkata 0 Posted February 22, 2011 Share Posted February 22, 2011 Hi. One week ago I bought this microcontroller Kit : https://estore.ti.com/MSP-EXP430G2-MSP430-LaunchPad-Value-Line-Development-kit-P2031.aspx . It's the cheapest one for new devolepers so I decided to take it first and maybe later I'll buy an Arduino. I use mostly Linux (Ubuntu and Debian). Actually, I have a dualboot with Windows 7 but I don't really like the idea to restart my PC every time when I decide to programm the controller. So I installed mspgcc and everything about the Launchpad. I have to say it works pretty good. I can upload directly to the controller all apps that I programm but of course there is one problem. The mspgcc compiler uses different libraries from the original compiler that comes with the standar Windows IDE. So not all programms that I found in the Internet works with mspgcc. Is there any way to run the original compiler or are there some tutorials about mspgcc because it's pretty annoying. I found some good projects but I can't really use them. I hope you have some more ideas Cheers. Quote Link to post Share on other sites
linuxha 3 Posted February 22, 2011 Share Posted February 22, 2011 A lot of times it's not libraries but rather variable names or defines that are slightly different. I've been able to compile a few of the programs so far but I did have to change the method of defining the processor (I pass it in the Makefile) and a few definitions. What examples are you trying and what errors are you getting? BTW, I use nothing but Linux. Quote Link to post Share on other sites
Tuchkata 0 Posted February 22, 2011 Author Share Posted February 22, 2011 I don't really compile the examples because I don't have enough time at the moment but I just saw the difference between some original examples and some mspgcc examples. Can you give me some advices how to better learn the mspgcc or can you give me some links with documentation or tutorials about it ? Thank you in advance P.S. I found some nice tutorials here : Part 1, Part 2, Interrupts I'll try them on Friday or Sunday when I have more time. Quote Link to post Share on other sites
linuxha 3 Posted February 23, 2011 Share Posted February 23, 2011 I can't yet as I haven't found all the documentation for GCC and stuff like the interrupts (I suspect that it's on the associated web site). Are you using mspgcc4 or just mspgcc (do a msp-gcc -v and it will tell you). So far I've just been looking at the header files and doing searches on the internet. I'll have more, hopefully, soon. Quote Link to post Share on other sites
Tuchkata 0 Posted February 23, 2011 Author Share Posted February 23, 2011 tuchkata@tuchkata:~$ msp430-gcc -v Using built-in specs. Target: msp430 Configured with: /home/tuchkata/mspgcc4/build/gcc-4.4.3-build/../gcc-4.4.3/configure --prefix=/opt/msp430-gcc-4.4.3 --target=msp430 --enable-languages=c,c++ --with-pkgversion=MSPGCC4_r4-20100210 Thread model: single gcc version 4.4.3 (MSPGCC4_r4-20100210) Quote Link to post Share on other sites
jsolarski 94 Posted February 24, 2011 Share Posted February 24, 2011 Newer mspgcc4 supports almost all the same definitions as the windows IDE( ie same headers) , #pragma once is now supported in gcc now and should work with the interrupts like the sample code from TI, I will confirm it in the morning when i get home. lol means i may have to update those tutorials but the ones stated should work ... I personally use http://mspgcc4.sourceforge.net/ built from git. and it looks like your version is the same as mine, (confirm when i get home)...... these 2 docs have also helped me out with learning specifics as well http://sourceforge.net/projects/mspgcc/ ... on/031127/ The manual is a little dated but has good info. Quote Link to post Share on other sites
Tuchkata 0 Posted February 24, 2011 Author Share Posted February 24, 2011 I tried to install the original IAR Embedded Workbench IDE under Wine and it looks like it compiles the real code examples but the problem is that it creates some strange file formats and not the traditional .elf format. Can I upload these files to the microcontroller ? They are something like .r43 and so on. Quote Link to post Share on other sites
bluehash 1,581 Posted February 24, 2011 Share Posted February 24, 2011 Is there a .out? I dont use IAR though. Maybe someone who is using it can answer your question. Quote Link to post Share on other sites
jsolarski 94 Posted February 24, 2011 Share Posted February 24, 2011 I have not clue either about the the file formats of IAR..... but i did do some testing on mspgcc, #pragma once, does not work for mspgcc interrupts, all the other #defines and built-in functions will be fine under mspgcc. my version is Target: msp430 Configured with: /home/justin/mspgcc4/build/gcc-4.4.5-build/../gcc-4.4.5/configure --prefix=/usr --target=msp430 --enable-languages=c,c++ --with-pkgversion=MSPGCC4_20110130 : (reconfigured) /home/justin/mspgcc4/build/gcc-4.4.5-build/../gcc-4.4.5/configure --prefix=/usr --target=msp430 --enable-languages=c,c++ --with-pkgversion=MSPGCC4_20110130 Thread model: single gcc version 4.4.5 (MSPGCC4_20110130) Quote Link to post Share on other sites
linuxha 3 Posted February 24, 2011 Share Posted February 24, 2011 I've started to put together my MSP430 notes page. It's no where near completed (technically it isn't published yet) but it does contain my working Makefile and a converted TI blink program for the F2012. I've commented out the TI code that doesn't work (the #pragma for example). I'll work on it as I get time. The program is decent to test out the compiled, the mspdebug (loading, running, step, etc.). It worked well on my Ubuntu client. On my server there is a problem with getting the USB stick recognized. I still have a lot of work to do on the page. jsolarski and bluehash 2 Quote Link to post Share on other sites
jsolarski 94 Posted February 25, 2011 Share Posted February 25, 2011 great notes!! Quote Link to post Share on other sites
linuxha 3 Posted February 25, 2011 Share Posted February 25, 2011 Thanks, I'm not done yet! :-) I still have to add all the details and explain things. I learned a long time ago that notes were important (I still reference my college notes on various subjects). After I wrote the Linux book I found that I was often looking up material I wrote. I decided then I needed to put my notes online where I could easily find them (hmm, I've got to update Google to re-search my pages). Now what I really need is a good touch screen drawing program and a touch screen notes taking program (and of course a touchscreen bigger than my Android phone). Quote Link to post Share on other sites
zeke 693 Posted February 25, 2011 Share Posted February 25, 2011 Did you see the article on HackADay today? debugging-msp430-using-eclipse/ It links to Springuin's tutorial on getting Eclipse and mspgcc working on windows. bluehash 1 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.