I noticed that there are project templates for an "ARM C Project" and a "Cortex-M C/C++ Project". I've tried using this template:
https://sourceforge.net/projects/nrf51osx/
…but it's a little out of date, and I'd like to know how to create an nrf51 project myself. When I make a project with the template above, I noticed that it uses GCC for compilation. When I use the Cortex-M C/C++ template, it uses G++. I'd rather use GCC.
Under Project Properties->C/C++ Build->Tool Chain Editor->Used tools, I can click the Select Tools… button, check "Allow all changes", and then remove Cross ARM C++ Compiler and Cross ARM C++ Linker, but the changes don't stick.
How do I just use GCC (not G++) with the Cortex-M0?
all GNU ARM Eclipse templates are C++.
may I ask you what is the disadvantage of having the projects linked with G++ instead of GCC?
Ah… Well, it's easier to compare a GCC project with its options to the makefiles provided by Nordic. I guess I just wanted to make sure the G++ compiler wasn't putting any object code in that I didn't want.
I'm still confused about both the C and C++ compiler settings showing up in the "Used Tools" section--it sounds like only the C++ compiler should show up, right?
if you have no c++ source files in your project, the c++ compiler is never used.
the advantage of using g++ as linker is that, even for c projects, you can link a library that has a c interface but internally uses c++ (this is perfectly possible).
if you have no c++ object files in the project, there is no difference.
nope, c and assembly files are compiled with gcc, c++ files are compiled with g++, each with a separate set of options. both share the common option.
as long as you do not use c++ files, you don't need to bother with g++ options.
So when I look at the console output, I see that the g++ compiler is called, not gcc. Is g++ just passing all the info on to gcc? Forgive my ignorance of the interactions between g++ and gcc.
unless you use .cpp files, most probably you see the g++ linker called
nope. both g++ and gcc are just some kind of wrappers for the actual compiler (cc1) and linker (ld).
in the toolchain install folder you have the GNU original manuals, please read them for more details.