RTEMS: how to compile and execute programs?

1.1k Views Asked by At

I've just started my academic project: Nano Sattelites Software Infrastructure. I installed RTEMS on CentOS and i can compile and execute sample programs, like hello or ticker. When i'm doing any changes to existing files(init.c for example) adding new files,tasks or functions, the compilation fails. I didn't find any tutorial like step-by-step explanation how create a new program from scratch and compile it, there are only examples on how to compile existing sample files and run them... Is anybody can help on this point?

2

There are 2 best solutions below

0
On

I had the same question and gedare's answer did work for me. I am sharing the updated URLs for his answer:

https://github.com/RTEMS/rtems-examples

Remeber to set the RTEMS_MAKEFILE_PATH variable. For me, it had to be:

RTEMS_MAKEFILE_PATH = /opt/rtems/4.10/sparc-rtems4.10/leon3

You may create an environment variable for it, or you can add this line to the top of your Makefile.

Also remember to add the toolchain bin dir to your PATH environment variable and use the correct version of the examples (git checkout to the correct branch after you clone the repository above.)

I hope this helps anyone out there with the same issue :)

2
On

You can check out the examples-v2.git repository for a Makefile-based approach and Waf-based approach to compile applications from outside of the RTEMS directory.