Results 1 to 3 of 3
I have a project for work where I am trying to compile code using GCC but with a target for VxWorks. I do most of my coding using Windows as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-07-2012 #1
- Join Date
- Sep 2012
Compiling with GCC with a target for VxWorks
- 09-07-2012 #2
In short you need another compiler. The thing is usually if you use gcc on your machine it produces binaries which can be run on this machine. If you runCode:
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
If you want to use your (host) machine to build binaries and run them on another machine (target) then you need a so-called cross-compiler. As to gcc you need just to install another version of gcc along with one you have which will produce binaries for VxWorks. I haven't dealt with cross-compilers for VxWorks but I've had experience with ThreadX RTOS kernel which usually runs on ARM processors. So I had to install one more gcc which had the name something like arm-linux-gcc (target-vendor-compiler) and use it to produce binaries which then I launched on a board with ARM9 processor.
- 09-08-2012 #3
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
What is the target hardware - ARM, x86, MIPS? That is the critical thing. In any case, all GNU compilers can handle ELF object format for .o and library files, and on any platform such ELF code can be generated (by default these days). The key is in the linker stages where the code gets converted into binary machine code. My advice is to consult with the VxWorks team about what you need to do.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!