We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The example about c++ progran under DS-5 CPP directory is compiled by me with the armcc ,not gcc. But there is an error when compile。
Error: C3321E: automatic configuration failed - could not determine configuration from GCC
make: *** [arm_linux_config.xml] Error 1
I do not know the reason. Please tell me the answer. Thanks!
If my bare metal c++ project use the GNU extesion, I must only use the arm-linux-gnueabifh-* tool or the arm-none-linux-gnueabi-* tool to compile the project and now the armcc tool can not meet the requirment. Is it correct? thanks!
Hi zgyypmmm,
You can use those compilers ("DS-5 GCC" in the Toolchain Editor or selected when you create the Project) but you have to be careful. By default they will try and source standard libraries which target Linux.
The sysroot is important, as it not only provides the base locations of the standard libraries but the include locations, it is a simpler way of passing in all the defaults with one option, rather than having a very, very large and hard to maintain list of -I and -isystem (somewhat equivalent to armcc -J). You can do tricks like pass "-nostdlib" and "-nostdinc" and provide all the include and library information you need manually within the toolchain settings, but having a valid sysroot is important.
What you will have probably better success with is to take the Linaro bare metal compiler and install it, adding it to your path. The "Bare Metal Executable" GCC is set to "arm-none-elf" or "arm-none-eabi" which this compiler provides. You can find it here:
http://www.linaro.org/downloads/
Way, way down at the bottom "Bare Metal". A hint: when using this compiler, if you wish to use semihosting you will need to either supply "-specs=rdimon.spec" to the compiler while linking, and if you want any kind of "file" IO you will need to reimplement certain functions as per the specifications for the "newlib" C library which is somewhat documented here:
http://wiki.osdev.org/Porting_Newlib
Ta,
Matt
Thank your detail answer! Thank you again!