GCC toolchain for 68HC12/68HC12X - gcc

I wonder if anyone is using GCC as production stable toolchain for Freescale's 68HC12 microcontroller family. It seems to me that there aren't up-to-date toolchains other than that from Freescale itself and those from Cosmic Software (http://www.cosmic-software.com/) and IAR (http://www.iar.com/), of course.
GNU 68HC11/12 (http://savannah.gnu.org/projects/m68hc11) is based on GCC 3.1 and its latest news is 4-year old
GCC-4.6 declared (http://gcc.gnu.org/gcc-4.6/changes.html) that Motorola 68HC11 and 68HC12 architectures are obsolete
GCC-HCS12 (http://gcc-hcs12.com/) sounds promising for what I'm looking for, yet it seems unmaintained. There exists a dozing Google Group gcc-hcs12 (http://groups.google.com/group/gcc-hcs12/), though. Plus, the available zip download contains a file called gnu-68hc1x-3.1.exe dated 2007.
MegaSquirt (http://www.msextra.com/tools/) seems to offer the most maintained toolchain, packaged on 29 Oct 2010. It is built on extended versions of the SCz tools (which I don't know what it means):
binutils-2.18 with S12X and XGATE enhancements
gcc-3.3.6 with S12/S12X ldivmod and larith enhancements
newlib with 9s12x target

GNU 68HC11/12 is based on GCC 3.3.6. The GNU 68HC11/12 release 3.1 is a bundle package which contains the complete tool chain based on Gcc 3.3.6, Gdb 6.4, Binutils 2.15 and Newlib 1.12.0.
Several projects have used it as a basis for their own needs. GCC-HCS12 and MegaSquirt are examples of such projects.
Some board vendors have also shipped the GNU 68HC11/12 version with their board.
MegaSquirt did some improvements on my original port for the support of XGate and
better support for H9S12X.
The gcc 3.3.6 release is the most stable and production ready release. Despite its apparent
oldness, it is more stable than what you could get with gcc 4.x recent mainstream releases.
The obsolete announcement is sad but I don' have time to work on repairing what is broken in GCC 4.6.

Related

Install older version of gcc for Fedora?

What is the difficulty in providing an easy way to downgrade gcc 6 to version 4?
I have a project that seems not forward-compatible with gcc. Therefore I'm trying to downgrade gcc to v4 but it is impossible.
The maintenance of each piece of software in the distribution takes some efforts. Especially in cases, when there is some security vulnerability that needs to be fixed and you have many parallel versions. There is no reason to keep old versions, if there is nobody using inside of the distribution.
Currently there is GCC 7 in Fedora 26, so GCC 4 is three major versions behind. If your application does not attempt to keep up with the GCC, Fedora is not an OS for you, because it moves forward. If you strive for backward compatibility, you should consider using RHEL/CentOS 7, where is still GCC 4 and it will be supported for years.

Clang or GCC compiler for c++ 11 compatibility programming on Windows?

I was wondering which compiler is better to use on Windows OS (8.1) in temrs of compatibility to c++11's (and later 14) functions, liberies and features (like lambdas) and is also comfortable to use (less bugs).
I am a university student hence I'm not looking at the subject product-wise (even though I do like to code a bit more than just projects for my studies).
I am currently using eclipse luna IDE if it matters.
Notice that compiler != IDE.
VC++ is one of the most populars on Windows and depending on its version it has a good support for C++11 features. Check the list on the msdn blog to find out if there's everything you need.
Gcc is also ported to Windows and you can install MinGW to use it (4.8.1.4 at the moment of writing this). It is pretty complete on C++11.
Clang is also available for the Windows platform and it is also complete on C++11 support (plus it has good diagnostic messages), but notice that you will have to use another linker since clang doesn't ship with one (although there is an ongoing effort to write it: http://lld.llvm.org/)
All the compilers I cited above are pretty stable but, based on my experience, if you're looking for latest and greatest C++11/14/17 features, you might just want to go for gcc or clang (VC++ is slower in adding support for newest features and the compiler is undergoing a huge update to modernize). Just keep in mind that these are compilers and not just IDEs, an IDE is a front-end supporting program that uses a compiler undercover to compile files.
To set up a C++11 compiler, I suggest installing MSYS2, it has a package manager (pacman) that can install fresh versions of GCC, GDB, Clang and many libraries like SDL, Lua etc. Very easy to use too.
As far as GCC vs CLang goes - I really tried hard to make CLang work (which is presumably faster and more friendly than GCC - produces better warnings, etc.), but failed. Issues were that CLang (which comes with MSYS2) is hard-coded to use GCC linker which produces some strange linker errors when using libstdc++ (std implementation from GCC). libc++ (a new implementation designed to work with CLang) didn't worked for me on Windows either.
So you either try build CLang from sources and hope that some configuration will work with C++11 library, OR just stick with GCC which works just fine out of the box.
As IDE, I suggest to take a look at CLion. It is very comfortable (infinitely more user-friendly and intuitive than Visual Studio, IMO). Just install it and point it to the mingw64 (or mingw32) folder of MSYS2, it will auto-detect everything for you.
It only works with CMake projects though.

how to use OpenMP library in xcode 5.1?

I want to use openMP library in my project but it seems as if there is no option for openMP in xcode 5.1. if someone knows then please help me
There is clang with OpenMP 3.1/4.0 support (though not official). You can take it here http://clang-omp.github.io/
OpenMP is not a library but a language extension to C, C++ and Fortran. It requires support built into the compiler. Xcode uses compilers based on the LLVM infrastructure. It used to provide two different compiler front-ends - Clang and GCC. Of those two, the former does not have support for OpenMP (yet). The GCC front-end provided some support for old OpenMP features but is no longer part of Xcode. It used to be based on a very old GCC version (4.2.1) and not actively updated since Apple started throwing all their resources into improving Clang.
In other words - no OpenMP support in Xcode 5.1. You can build your own modern (but non-LLVM) GCC from source and use it on the command line, but it's hard to integrate it with Xcode.

Most stable gcc/g++ version to date

I want to know which gcc/g++ version released is the most stable to date? I had an impression that gcc version 2.95 was the most stable but a few peers told me that gcc 3.x versions are now the most stable.
The 2.95 branch hasn't had an update in over ten years. I certainly wouldn't be using it for anything voluntarily. Use whatever is the latest available for your system unless you have specific knowledge of a need to use something else (a vague "impression" is not specific knowledge, actual bugs and specific compatibility problems are).
Even 3.x is rapidly aging. There is no general reason not to use 4.x.
The only gcc versions that are actively worked on - i.e. debugged and stabilized are gcc-4.n where n > 3 these days. Use the gcc-4.* series. Even cygwin and mingw are off gcc-3.* these days.
GCC 4.6.2 has been released recently, on 27 Oct 2011.
And chosing a specific version of GCC is not a guarantee that your binary will work on all linux-es you want, because distributions may have different versions of the C++ standard libraries.
I'll recommend not using something older than GCC 4.5, and preferably 4.6. However, you might want to use the version used to compile your linux distribution.

Code Sourcery GCC vs Vanilla GCC Compiler, what is the difference?

I've found a company that provides GCC based toolchains for ARM, MIPS but I don't know in what are they different from the vanilla GCC, of course, they bring other software pieces such as Eclipse, but when looking only at GCC and Binutils, are they different or just the same?
One big difference between a pre-compiled toolchain (like those provided by Code Sourcery, MontaVista, Wind River, etc) and one built from source is convenience. Building a toolchain from scratch, especially for cross-compiling purposes, is tedious and can be a complete pain. Also, the newest versions of glibc (or uClibc), gcc, and binutils aren’t always compatible as they're developed independently. There are open source tools to make this process easier (like crosstool-NG), but having a proven toolchain that’s been optimized for a certain platform can save a lot of time and headaches. This is especially true at the beginning of a new project. It also helps to have technical support when things go screwy. Of course…you have to pay for it most of the time.
That being said, compiling your own toolchain will most likely save you money and can allow more flexibility down the road. MontaVista, as far as I know, doesn’t include support for older platforms in their newest toolchain releases. For example, if you bought MontaVista Pro 4.X and it included a toolchain with gcc 3.3.X, that’s the toolchain you’re most likely going to be stuck with for the life of your project. Upgrading to a toolchain with gcc 4.X most likely wouldn’t be an option.
Hope that helps.

Resources