Assuming that you would want to use Eclipse with CDT as an IDE and have added in the RTEMS plugin (see above), to create a new project:
<File><New><Project...><C project><Others><RTEMS Executable>
Give it a project name and fill in the location for your project to live.
<right click><New><Source File><Source file:>init.c<Finish>
Here’s some code that you will eventually recognize, put it into init.c:
#include <bsp.h>
#include <stdio.h>
rtems_task Init(rtems_task_argument ignored) {
printf("Hello, World!\r\n");
}
/* NOTICE: the clock driver is explicitly disabled */
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
Next, you have to fill in the RTEMS path information:
<File><Properties><C/C++ Build><RTEMS>
The “Base path” is the directory that you specified with --prefix= when you built RTEMS.
The BSP path is a couple of directories down from the Base path.
How do I explain this?? With an example. I’m using RTEMS 5 on an STM32F767.
I use a Base path of:
/Users/me/RTEMS5/rtems/5
and my BSP path is:
/Users/me/RTEMS5/rtems/5/arm-rtems5/stm32f767
Your version of RTEMS, architecture, and BSP will vary, so it could be under 6/powerpc-rtems6/ss555 or what your particular install requires.
Compile, fix your/my mistakes, feel smug.
I mostly put this here so future me can refer to it, but it might help someone someday.