sergiocampama 7 Posted July 1, 2011 Share Posted July 1, 2011 what would you do differently? im always open to suggestions... as I'm not a hardcore linux user, I just use what i've learned in the last couple years... It's perfectly fine. I'm just a cranky ex-Slackware user that's just getting back into getting my hands dirty again with software (I've been lazy with my Linux machines for the past two years). I really appreciate that you've posted the detailed guide and I am glad that I can personally thank you for posting it. You saved me a lot of time since I was able to just copy and paste each step right into the terminal. thanks that was what I was trying to do... my only regret is not being a linux hacker so I could provide a general solution, but i only know how to use ubuntu... Quote Link to post Share on other sites
zborgerd 62 Posted July 2, 2011 Share Posted July 2, 2011 By the way... For those who still might want msppgcc4 instead of the standard mspgcc, this guide also provides good instructions: http://blog.wikifotos.org/2010/11/15/ms ... in-ubuntu/ Quote Link to post Share on other sites
xpg 127 Posted July 5, 2011 Share Posted July 5, 2011 Just thought I wanted to chime in: As it can be a bit of a pain to copy/paste the build descriptions for mspgcc uniarch, I've created a small script to ease this task. This simple build script fetches and builds the trunk of the MSP430 GCC Uniarch project as described on the uniarch wiki-page. Currently, it works only on Linux, as it tries to detect required packages and requests them to be installed. It has been tested on Ubuntu 11.04 and Fedora Core 13. Usage of the script is very easy. Create a new directory for MSP430 GCC Uniarch, copy build.sh to it, and run it. Example: # mkdir -p $HOME/msp430 # cp build.sh $HOME/msp430 # cd $HOME/msp430 # ./build.sh If the script finished succesfully (which might take a while) everything is installed into $HOME/msp430/install, and setting PATH to $HOME/msp430/install/bin allows msp430gcc to be invoked with "msp430-gcc". Get it here: http://xpg.dk/files/File/msp430/build.sh Feedback is appreciated. Cheers, Paul bluehash and jsolarski 2 Quote Link to post Share on other sites
jsolarski 94 Posted July 5, 2011 Share Posted July 5, 2011 trying the script now on Ubuntu 10.10 64bit-- Edit script works justin@desktop:~/msp460gcc/install/bin$ ./msp430-gcc -v Using built-in specs. Reading specs from /home/justin/msp460gcc/install/lib/gcc/msp430/4.5.2/../../../../msp430/lib/msp430mcu.spec COLLECT_GCC=./msp430-gcc COLLECT_LTO_WRAPPER=/home/justin/msp460gcc/install/libexec/gcc/msp430/4.5.2/lto-wrapper Target: msp430 Configured with: /home/justin/msp460gcc/gcc/configure --target=msp430 --enable-languages=c,c++ --prefix=/home/justin/msp460gcc/install Thread model: single gcc version 4.5.2 (GCC) only took about 30mins on my PC. BY any chance would git-clone work better then update? Quote Link to post Share on other sites
andres 0 Posted July 6, 2011 Share Posted July 6, 2011 Hi everyone, Help needed using GNU linker, ld. I've compiled latest mspgcc (uniarch, mspgcc-20110612) on Windows box. But the problem is, ld does have hardcoded paths. When I move mspgcc from the directory it was compiled into attempt to link results in ld not finding ldscripts: **** Build of configuration Debug for project blinky **** make all 'Building file: ../main.c' 'Invoking: Cross GCC Compiler' msp430-gcc -I"C:\MSPGCC4\msp430\include" -Os -g3 -Wall -c -fmessage-length=0 -mmcu=msp430g2452 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.c" 'Finished building: ../main.c' ' ' 'Building target: blinky.elf' 'Invoking: Cross GCC Linker' msp430-gcc -L"C:\MSPGCC4\msp430\lib" -mmcu=msp430g2452 -o"blinky.elf" ./main.o c:/mspgcc4/bin/../lib/gcc/msp430/4.5.2/../../../../msp430/bin/ld.exe: cannot open linker script file memory.x: No such file or directory collect2: ld returned 1 exit status make: *** [blinky.elf] Error 1 If i copy just the msp430/lib directory in to the old location where toolchain was built everything compiles/links ok. Any suggestions? BTW, if someone is interested in building mspgcc under windows I've a preliminary draft Windows batch file to do this (w/ mspgcc-20110612). It's based on Sergio Campama's Ubuntu tutorial with some Windows-specific changes. Prerequisites are MinGW+MSYS installation in C:\MinGW and GNU wget in path. Everything else needed should be downloaded/unpacked by this script. UPD: Can't add this batch file with sourceforge and GNU URL-s for fetching packages, too spammy - account was deleted immediately Quote Link to post Share on other sites
xpg 127 Posted July 6, 2011 Share Posted July 6, 2011 Hi everyone, Help needed using GNU linker, ld. I've compiled latest mspgcc (uniarch, mspgcc-20110612) on Windows box. But the problem is, ld does have hardcoded paths. When I move mspgcc from the directory it was compiled into attempt to link results in ld not finding ldscripts: Hello andre, I suggest that you install mspgcc into the directory where you want it to be. You can use --prefix for that during the configure phase. If you cannot do that for some reason I see (maybe) two more options: First, you could manually give the path to the linker scripts of the MCU you are using: msp430-gcc -L"C:\MSPGCC4\msp430\lib\ldscripts\msp430g2453" -mmcu=msp430g2452 -o"blinky.elf" ./main.o I'm guessing that this is the right path. Try searching for memory.x, you'll find the right msp430g2453 directory. Note, that it is important that the directory matches your -mmcu argument, else strange things might happen. The other option is a pure guess: If you compile gcc and binutils using "--with-build-sysroot", you will be able to supply the --sysroot argument to ld and gcc to indicate on each invocation, where it should look for its files. I haven't tried this yet, only read about it in the manuals. Hope this helps, just a tiny bit. /Paul andres 1 Quote Link to post Share on other sites
xpg 127 Posted July 6, 2011 Share Posted July 6, 2011 Edit script works Good to hear, thanks. BY any chance would git-clone work better then update? Hmm... I'm no git expert, but as far as I know git-clone is only meant for the initial cloning. After that git-pull must be used to keep things up-to-date. Anyone, feel free to correct me if I'm wrong :-). BTW, does anyone know of an Eclipse plugin for the MSP430 toolchains? Would be nice to have something like the Eclipse AVR plugin Cheers, Paul Quote Link to post Share on other sites
sergiocampama 7 Posted July 7, 2011 Share Posted July 7, 2011 keep in mind that xpg's script is for the latest non-release version of mspgcc, as it clones the repository... this is great when you want the latest of the latest, but if you need to have a stable release, and a release where you want to be able to give feedback on, it's better to have dated release version... jsolarski and xpg 2 Quote Link to post Share on other sites
xpg 127 Posted July 7, 2011 Share Posted July 7, 2011 keep in mind that xpg's script is for the latest non-release version of mspgcc, as it clones the repository... this is great when you want the latest of the latest, but if you need to have a stable release, and a release where you want to be able to give feedback on, it's better to have dated release version... Very good point. Thank you for pointing this out! Cheers, Paul Quote Link to post Share on other sites
andres 0 Posted July 7, 2011 Share Posted July 7, 2011 I suggest that you install mspgcc into the directory where you want it to be. You can use --prefix for that during the configure phase. Hello Paul, Clear. Thank you. I've recompiled feeding the final path to the configure scripts. Now I've mspgcc working for some simple stuff like blinking Launchpad' LEDs with msp430g2452 BTW, does anyone know of an Eclipse plugin for the MSP430 toolchains? Would be nice to have something like the Eclipse AVR plugin Usual Eclipse CDT's "C/C++ GCC Cross Compiler Support" and "C/C++ GDB Hardware Debugging" works for me on Windows (mspgcc and msp430-gdb + msp430-gdbproxy). Should work even better on Linux probably with mspdebug instead of gdbproxy. BR Andres buildmspgcc-20110612.zip Quote Link to post Share on other sites
xpg 127 Posted July 7, 2011 Share Posted July 7, 2011 Clear. Thank you. I've recompiled feeding the final path to the configure scripts. Now I've mspgcc working for some simple stuff like blinking Launchpad' LEDs with msp430g2452 Great! Usual Eclipse CDT's "C/C++ GCC Cross Compiler Support" and "C/C++ GDB Hardware Debugging" works for me on Windows (mspgcc and msp430-gdb + msp430-gdbproxy). Should work even better on Linux probably with mspdebug instead of gdbproxy. Well, it works. Just seems a bit clumpsy :-). /Paul ;-) Quote Link to post Share on other sites
gordon 229 Posted July 11, 2011 Share Posted July 11, 2011 Sergio and other people writing Uniarch install scripts and guides, as everyone and their grandma seems to trip over this trying-to-compile-libc-with-gcc3 issue, may I suggest to start your scripts/instructions with something along the lines of PATH=${PREFIX}/bin:${PATH} where PREFIX is (obviously ) the path Uniarch will be installed into? I am reasonably confident this will take care of all these ghost compilation failures (and will also possibly mask future issues, but those would be there without this not-solution anyway). Quote Link to post Share on other sites
sergiocampama 7 Posted November 10, 2011 Share Posted November 10, 2011 I have updated the guide and it now builds up to today's version. You can check it out on https://github.com/sergiocampama/Launchpad teedeeus, Fe2o3Fish and bluehash 3 Quote Link to post Share on other sites
Fe2o3Fish 33 Posted November 11, 2011 Share Posted November 11, 2011 Thanks Sergio! One correction (to be applied a few times) is that to untar a .bz2 file, the 'tar' program should be called with the 'j' option, not the 'z'. Sitting here waiting for my binutils to compile... -Rusty- Quote Link to post Share on other sites
sergiocampama 7 Posted November 11, 2011 Share Posted November 11, 2011 thanks! actually, the previous version of this guide had .tar.gz files, and I forgot to change some of the tar commands.. if you find any problem with the guide, please post it here so I can fix it... 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.