I guys, some of you will remember me posting everywhere about C++ in Atmel Software Package, "atmel-software-package-2.15".
Well! I got it working...
I have yet to full test it but it seems fine.
Releases · atmelcorp/atmel-software-package · GitHub
Wasn't aware of the new SAM9X60; a significant increase in the CPU's maximum frequency and it's in a SiP.
SAM9X60 - Microprocessors
Product Change Notification - SYST-05BNKQ138 - 06 Nov 2019 - Data Sheet - SAM9X60 SiP Data Sheet
"Dare to be naïve." - Buckminster Fuller
Last error appears to do with the final stages of the build. It fails when it tries to build the binary after linking. Now I'm no expert on make files but the final stage:
$(BUILDDIR)/$(BINNAME).elf: $(OBJS) $(LIBS) $(gnu-debug-lib-y) $(gnu-linker-script-y)
@cp $(gnu-debug-lib-y) $(BUILDDIR)/target/
$(ECHO) LINK $@
$(Q)$(CC) $(LDFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEFS) -T$(gnu-linker-script-y) -Wl,-Map,$(BUILDDIR)/$(BINNAME).map -o $@ $(OBJS) -Wl,--start-group $(LIBS) -Wl,--end-group -Wl,--no-undefined
is using the gcc compiler - $(Q)$(CC)
would this cause a problem for the c++ files?
when it tries to build the binary after linking
Anyway there is not problem invoking "gcc" for C++. "gcc" is a "compiler driver" not just an invocation of the C compiler. If you pass it a .s file it calls the assembler, if you pass it a .S file it calls the preprocessor then the assembler, if you pass it a .c file it calls the preprocessor then the C compiler, if you pass it a .cpp file (other C++ extensions are also available) then it will invoke the C++ compiler. if you later pass it just .o files then it will invoke the linker.
It's because it can invoke all these different things that because some command line options could be mistaken for assembler/preprocessor/C/C++/linker that you have things like -Wa, and -Wl, which say "here's an option but you should specifically pass it to the a=assembler or l=linker". There's even some examples of that in your command above. It's using -Wl to direct various options specifically to the linker.
© 2020 Microchip Technology Inc.