Hi Chris, I'm glad you helped me, but I'm kind of lost in RTEMS development cycle.
I followed all steps of section 2 (Quick-Start),and in the end there is a instruction "make install" is that one you talking about ? Also, I did not quite understand section 4 (installation), it seems somewhat redundant to section 2, what is new about it ? And, if I understand it correctly, after all steps of section 2 I should have a functional environment for rtems for an ERC32 target (which is exactly the one I want). So, now I didn't understand how exactly I configure the files and the environment with my own .c codes in order to be compiled for the ERC 32 target. Note that section 2.8 ("Build your application) is "TODO" at the moment. So there is no instruction there and I don't know exactly how to proceed. I have an old document of an old system, the ERC32 cross compile system (provided by ESA), and in the instructions, after the configuration of the environment the next step was to compile with sparc-rtems-gcc and the next one was to use sparc-rtems-gdb for simulation or to load it on the target. So as I noticed, is not this way anymore. So for me to compile a fresh new application for my ERC32 target, I don't need to use directy the sparc-rtems5-gcc compiler ? Also, once my environment is set-up what is the next step ? Sorry for this amount of doubts and questions, I need to learn this for my masters. Em dom, 24 de mar de 2019 às 01:19, Chris Johns <chr...@rtems.org> escreveu: > On 24/3/19 3:28 am, Michel Macena wrote: > > I'm a beginner with RTEMS > > Welcome. > > > and I have built a RTEMS5 environment for an erc32 > > chip (the example in RTEMS Docs) in my computer with > > linux mint. > > Great and well done. > > > The environment comes with sample applications. I'm trying to > > compile the > > sample from "hello" (init.c) using sparc-rtems5-gcc, here's the command > line: > > > > sparc-rtems5-gcc -g -O2 > > /home/michel/masters_project/src/rtems/testsuites/samples/hello/init.c -o > > /home/michel/masters_project/compile_test/hello2.exe > > > > but it returns the following error: > > > > fatal error: rtems.h: No such file or directory > > #include <rtems.h> > > ^~~~~~~~~ > > compilation terminated. > > > > So I tried to comment rtems.h in the code and leave the next library of > the code, > > tmacros.h, so I tried to compile again and had the following error: > > > > fatal error: tmacros.h: No such file or directory > > #include <tmacros.h> > > ^~~~~~~~~~~ > > compilation terminated. > > > > I have used the locate command and found these libraries in the > envinronment tree. > > Did you run 'make install' after building RTEMS? > > > As far as I perceived the sparc-rtems5-gcc does not find or ignore the > libraries. > > I added the bin folder to the PATH variable, also I have created the > variable > > RTEMS_MAKEFILE_PATH based in older versions instructions. I found that > > that RTEMS_MAKEFILE_PATH variable should point to where the BSP files > are. But > > I'm not sure if in the present version of RTEMS it is still necessary > since I > > have not found any instructions for this in the main docs. > > > > command line: > > export RTEMS_MAKEFILE_PATH=/home/michel/masters_project/build/b-erc32 > > > > Could someone help ? > > I would start by taking a look at the Executables section in the User > Manual .. > > https://docs.rtems.org/branches/master/user/exe/index.html > > Section 7.2 has a detailed figure that shows the pieces that need to be > brought > together to build an RTEMS application. The compiler (cc) needs to be told > where > the various pieces can be found. > > RTEMS supports a wide range of architectures and BSPs and each of these > can vary > the start up files so we have to tell the compiler a bunch of things using > a > 'specs' file. This lets us correctly link a BSP executable. > > > Also if you have a working environment could you copy your > > project tree for me ? > > I would have a look at examples-v2. This is collection of example programs > in a > separate repo ... > > https://git.rtems.org/examples-v2/ > > I see README.Makefile and README.waf. The first is for using a Makefile > and the > second is using the waf build system. Looking the compiler command lines > should > provide the details you need for a specific BSP. > > I hope this helps. > > Chris >
_______________________________________________ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users