Building RTEMS application with libbsd
Jinhyun
jinhyun at konkuk.ac.kr
Thu Sep 8 06:09:22 UTC 2016
Hi, all.
I'm trying to run RTEMS network application on VirtualBox.
It seems that RTEMS mainline doesn't have network driver which can work on
VirtualBox.
So I decided to use libbsd package for this work. And I built the libbsd
package as mentioned in README.waf.
My question is, what do I do after "waf install"?
I tried to build the application using makefile which is used for other
applications before, but it failed with error message, "undefined reference
to `rtems_bsd_initialize`".
I exported a constant, RTEMS_MAKEFILE_PATH as bsp directory installed
libbsd.
And my application codes are as below.
----------------------------------------
#include <stdio.h>
#include <rtems/bsd/bsd.h>
#include <machine/rtems-bsd-commands.h>
rtems_task
Init (rtems_task_argument ignored)
{
rtems_bsd_initialize();
printf("Hello World\n");
}
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define
CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 #define
CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024)
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_SEMAPHORES 20
#define CONFIGURE_MAXIMUM_TASKS 20
#define CONFIGURE_MICROSECONDS_PER_TICK 1000
#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024)
#define CONFIGURE_INIT_TASK_PRIORITY 120
#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
RTEMS_NO_TIMESLICE | \
RTEMS_NO_ASR | \
RTEMS_INTERRUPT_LEVEL(0))
#define CONFIGURE_INIT
rtems_task Init (rtems_task_argument argument); #include <rtems/confdefs.h>
----------------------------------------
I think I missed something but I don't know what it is.
Please give me any advice.
Thanks,
Jin-Hyun.
More information about the users
mailing list