analog604 Posted January 13, 2013 Report Share Posted January 13, 2013 Hi Guys, This post relates my experience with problems using MIOS32 Toolchain (version mios32_toolchain_linux86_20101024.tgz) on Centos Linux (redhat basically) and what I did to resolve it by setting up a working Arm compiler for the LPC17/NXP1769. Here's my Linux version: Linux um 2.6.18-308.24.1.el5 #1 SMP Tue Dec 4 17:43:34 EST 2012 x86_64 x86_64 x86_64 GNU/Linux So I'm attempting to build MIOS32 apps on a Centos Linux server: Followed wiki instructions: http://www.midibox.org/dokuwiki/doku.php?id=linux_mios32_toolchain_core and installed toolchain mios32_toolchain_linux86_20101024.tgz set my paths and environment. Then I go to build the test app and got an error from the toolchain compiler: [root@um 001_forwarding_midi]# make rm -f project.hex Creating object file for app.c arm-none-eabi-gcc: /lib/libc.so.6: version `GLIBC_2.11' not found (required by arm-none-eabi-gcc) make: *** [project_build/app.o] Error 1 # OK am I using the right one? lets see [root@um 001_forwarding_midi]# which arm-none-eabi-gcc /usr/local/mios32_toolchain/bin/arm-none-eabi-gcc # YES- ok run compiler to see what happens, broken [root@um 001_forwarding_midi]# arm-none-eabi-gcc arm-none-eabi-gcc: /lib/libc.so.6: version `GLIBC_2.11' not found (required by arm-none-eabi-gcc) # Find out what is linked into it and if those libraries resolve (no they don't) [root@um ~]# ldd /usr/local/mios32_toolchain/bin/arm-none-eabi-gcc /usr/local/mios32_toolchain/bin/arm-none-eabi-gcc: /lib/libc.so.6: version `GLIBC_2.11' not found (required by /usr/local/mios32_toolchain/bin/arm-none-eabi-gcc) linux-gate.so.1 => (0xffffe000) libc.so.6 => /lib/libc.so.6 (0x00bae000) /lib/ld-linux.so.2 (0x00b8f000) --------- So after checking everything in the setup it seemed that my Linux version simply wouldn't work with the old libc compiled against the toolchain. I looked into installing the older libc 2.11, but couldn't get that to compile fully so moved on. Then I downloaded arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar from http://www.codesourcery.com Installed into /usr/local Updated path in /etc/bashrc and checked to see if it ran (looks good): [root@um trunk]# /usr/local/arm-2008q3/bin/arm-none-eabi-gcc -v Using built-in specs. Target: arm-none-eabi Configured with: [snip...] Thread model: single gcc version 4.3.2 (Sourcery G++ Lite 2008q3-66) # checked shared library dependencies (looks good): [root@um trunk]# ldd /usr/local/arm-2008q3/bin/arm-none-eabi-gcc linux-gate.so.1 => (0xffffe000) libc.so.6 => /lib/libc.so.6 (0x00bae000) /lib/ld-linux.so.2 (0x00b8f000) Then went on and built several MIOS32 apps without incident. :smile: Hope that this may save some time for someone, the entire process took 3 hours of mine! cheers Jay Quote Link to comment Share on other sites More sharing options...
TK. Posted January 13, 2013 Report Share Posted January 13, 2013 That's Linux... (however, on MacOS we've sometimes similar incompatibility issues - fortunately not with the MIOS32 toolchain). IMPORTANT: the codesourcery release is not qualified for some MIOS32 applications, such as MIDIbox SEQ V4 The "newlib" implementation can introduce unwanted delays and/or higher memory consumption. Therefore we created an own toolchain with a certain newlib release which is acceptable - and shouldn't change it anymore. The source code of the whole toolchain can be downloaded from: http://www.midibox.org/mios32_toolchain/ Please use this one. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
analog604 Posted January 13, 2013 Author Report Share Posted January 13, 2013 Thanks very much TK for that insight! I remember reading and seeing the linkage somewhere on this forum a month ago or so ago, but couldn't find it today, and wanted to try code on my fresh new LPC17. :) I'm on a Mac, but didn't want to get into the mess of using Xcode for this stuff, as I've been at odds with it for years. For example only trying to compile basic GNU code that was no issue on Linux and Solaris boxes. I'll try your toolchains! cheers~ Jay Quote Link to comment Share on other sites More sharing options...
TK. Posted January 14, 2013 Report Share Posted January 14, 2013 I'm also a Mac User, and I don't use Xcode for app development. All you need is the terminal + a good editor (such as xemacs) + MIOS Studio. :smile: Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
analog604 Posted January 14, 2013 Author Report Share Posted January 14, 2013 The toolchain was not building so easily under Linux, the package gcc build in particular failed. Not a big problems though, I've got to setup the gcc prerequistes more properly. Will do that later. In the meantime I got MIOS32 apps compiling from the Mac via Terminal/shell using the appropriate toolchain. :)) After installing xcode command line tools for 'make', I was all set. Thanks again.. next I will port Arduino code to Cortex for MIDIbox... that should be interesting. :) Quote Link to comment Share on other sites More sharing options...
TK. Posted January 14, 2013 Report Share Posted January 14, 2013 Thanks for confirming, that a Xcode installation is still required just for the basic build environment (make) - I wasn't sure about this. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
analog604 Posted January 14, 2013 Author Report Share Posted January 14, 2013 Yep, I all needed was the basic xcode452 cli tools from Apple Dev downloads. I just double checked the bill of materials in the mounted dmg: lsbom -s `pkgutil --bom /Volumes/Command\ Line\ Tools\ \(Lion\)/Packages/DeveloperToolsCLI.pkg` | grep make ./usr/bin/gnumake ./usr/bin/make ..and this is where it also places gcc. So no need to alter standard shell pathing. I worked for quite a few hours trying to get the toolchain to compile under redhat and I can get everything but the compilers! So I'll stick with the mac dev environment until I can figure it out. I already lived in Terminal shell all day! ;) -Jay Quote Link to comment Share on other sites More sharing options...
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.