Hello,
I am new to ARM. Right I am trying to get up to speed with the SAM7S examples pack "at91sam7s-ek" available from the Microchip website.
When I load any project into Eclipse I get the following error After building project.
make: *** [obj/flash_board_cstartup.o] Error 2
I have checked that paths are correct and that the files are where they are supposed to be.
Is there anyone that can help me to get this running or can anyone recommend a better set of examples that actually work for the SAM7S devices.
Hi and welcome to the community!
Does the compiler give you anything else on the error ?
(All the lines marked with *** are interesting, and the two or three lines immediately above them)
Normally, when you get an error with an .o file, it's in the linker-phase of the build.
There are basically two phases...
1: Compiling (all .s / .S, .c, .cp and .cpp files)
2: Linking (collecting all the .o files and producing a single binary)
-The first thing you might want to check, is that there is actually a file called flash_board_cstartup.o in the 'obj' directory.
If not, it might be during compilation of the file; if that's the case, the compiler should tell you exactly what went wrong.
i'm sorry for delay.
i have still this problem
i install many plug-in but still remain this problem ??
I'm not familiar with Atmel projects, but since you have the GNU ARM Eclipse plug-ins installed, I guess you are trying to use them to build the project.
In Eclipse there are two types of projects, managed and unmanaged. Unmanaged projects have their own make files, and all Eclipse has to do is to start make properly, there is not much to configure to pass the build (there are some details related to the indexer, but they are not relevant for the build).
Managed projects are collections of source files, object files and libraries, that you want Eclipse to magically turn into a binary executable.
For this you need to tell Eclipse where are the source files, what options to use for each separate tool (compiler, assembler, linker, etc), where are the objet files, where are the libraries, where are the linker scripts, and so on. The configuration is a bit more elaborate, but you don't have to write any make file yourself, Eclipse (in fact the GNU ARM build plug-ins) does this for you.
From the structure of the project, I would guess it is a Makefile project, and the error seems a make error. You can still build Makefile projects as managed projects, but you need to do the configuration.
For example, to incorporate already compiled object files, you need to add them to the linker list of 'Other objects':
If you can provide more details about the project and the steps you did to end in this situation, maybe I can be of more help.
Regards,
Liviu
Do you think it can be a case problem (board_cstartup.S) ?
my setting C/C++ Build is not similar with your IDE ?
Is it possible that my IDE is not installed correctly ???
I have this error "fix "*** [obj/flash_board_cstartup.o] Error 2"" for any sample code !
> Is it possible that my IDE is not installed correctly
not necessarily, your picture reveals you have a Makefile project, and for this kind of project there are no advanced settings available.
what happens when you try to build the project outside Eclipse?
> a case problem ...
no, the build of Makefile projects should not be affected by the Eclipse annoyance with the assembly file extension case (.S accepted, .s ignored).
i do not test to build this project outside Eclipse
i have this problem for any program (even simple code) so my problem is Relate to IDE (setting , plug-in ,....)
my prioject attached to this comment
It is possible to see that you have problem with it or not?
As far as I've understood, .S is for pre-processed files, .s is normal assembly files without pre-processor (eg. output from the C-compiler), so both should be accepted, just built slightly differently.
this is the theory. the practice is slightly different
the rule you mentioned is indeed used by gcc. for various reasons, Eclipse does not distinguish case, and the build plug-ins, at least the GNU ARM Eclipse build plug-in, processes assembly files as pre-processed assembly files.
the bad news is that Eclipse, although unable to distinguish case, does not match .s files at all, so, in order to be included in a managed build, all assembly files should have the .S extension.
your project is not standalone, it requires the presence of other folders, probably other projects:
ilg-mbp:basic-emac-lwip-project-at91sam7x-ek-gnu ilg$ make Makefile:60: ../at91lib/boards/atmu1245_sam7x/board.mak: No such file or directory make: *** No rule to make target `../at91lib/boards/atmu1245_sam7x/board.mak'. Stop. ilg-mbp:basic-emac-lwip-project-at91sam7x-ek-gnu ilg$
this has nothing to do with Eclipse, any Makefile project, regardless the build plug-ins you use, is build by invoking make, step that you can easily perform in a terminal.
in fact, until you cannot build the project manually in a terminal, do not expect Eclipse to build it in the IDE.
for the Atmel projects I suggest you study the Atmel documentation, and eventually the Atmel forums, I doubt you'll get much help here.
Thank you for bringing some light on this; even though it's terrible that it's not handled as expected, it's still very helpful.
Perhaps Eclipse is doing this, because it expects that .s files are output files from the C-compiler, and thus it does not want to include them.
-I'm only guessing.