Easily switch between different versions of GCC ARM Embedded
I need to switch between different versions of
GCC ARM Embedded somewhat often. I couldn’t find a good solution online so I threw together a simple shell script to simplify the process I call
switch-gcc-arm. Here’s a screenshot:
The script is pretty simple, even for a bash n00b like me. It uses symlinks so that standard
make files work:
For each version of gcc you want to support, you’ll need to add it is as an
elif statement and add it is as a new
option. The script creates a “virtual”
$BIN directory that points to whichever version of gcc you need. Make sure you add the path to the folder where you placed the script, as well as the
$BIN path you set as the virtual bin directory. I add the paths to my
.bash_profile and rely on the system keeping the last-used version of gcc.
Hope this helps someone. Any suggestions for improvements?