Network semaphore error
Richard M. Barry
R.Barry at sstl.co.uk
Thu Sep 18 12:42:26 UTC 2003
I'm getting a run-time error when I run RTEMS on a custom StrongArm 1100 board we developed in house. More details about the problem:
I wrote a network device driver for the HDLC comms chip on the board, put it in the bsp and compiled the bsp. To test it I wrote a simple application that just opens a socket to listen on. It all compiled fine, but when I try to run the application, it exits on a fatal error, saying it can't release the network semaphore (detailed output below). It doesn't seem to even get into my network driver's code (I put a printf at the beginning of EVERY function in the driver to make sure), so it crashes out while trying to initialise the network code I guess? Any ideas on where to start looking for the problem? The application Makefile defines MANAGERS=all, and the system.h for the application is also listed below.
Console output when running application:
----------------------------------------
RTEMS RELEASE rtems-ss-20011210(ARM/StrongARM 1100/armssdr)
COPYRIGHT (c) 1989-1999.
On-Line Applications Research Corporation (OAR).
SA1100 SSDR (armssdr) Board Support Package
COPYRIGHT (c) Surrey Satellite Technology Ltd (SSTL), 2001
work_space_size = 0x80000
maximum_extensions = 0x1
microseconds_per_tick = 0x2710
ticks_per_timeslice = 0x32
maximum_devices = 0x14
number_of_device_drivers = 0x4
Device_driver_table = 0x804B600
_heap_size = 0x0
rtemsFreeMemStart = 0x80CEF40
work_space_start = 0x804EF40
work_space_size = 0x80000
Ram disk start = 0x18000000
heap size = 00080000
Initialized console input on port 0, output on port 2
Clock driver
Can't release network semaphore
fatal error, exiting
EXECUTIVE SHUTDOWN! Any key to reboot...
*************
system.h
--------
#include <rtems.h>
/*#include <pmacros.h> */
/* functions */
rtems_task Init(
rtems_task_argument argument
);
/* configuration information */
#include <bsp.h> /* for device driver prototypes */
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_PTY_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#if 0
#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024)
#endif
#define CONFIGURE_MAXIMUM_SEMAPHORES 10
#define CONFIGURE_MAXIMUM_TASKS 20
#define CONFIGURE_MAXIMUM_TIMERS 10
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 3
#define CONFIGURE_MICROSECONDS_PER_TICK 10000
/*
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
#define CONFIGURE_MAXIMUM_POSIX_THREADS 4
#define CONFIGURE_MAXIMUM_POSIX_TIMERS 4
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
*/
/*
#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE*8)
*/
#define CONFIGURE_INIT_TASK_STACK_SIZE (4096)
#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_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
*/
/*
#define CONFIGURE_EXTRA_TASK_STACKS (10*1024)
*/
#include <console.h>
#include <clockdrv.h>
#include <rtems/pty.h>
#define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
rtems_driver_address_table Device_drivers[] = {
CONSOLE_DRIVER_TABLE_ENTRY,
CLOCK_DRIVER_TABLE_ENTRY,
PTY_DRIVER_TABLE_ENTRY,
{NULL, NULL, NULL, NULL, NULL, NULL}
};
#if 0
#define STACK_CHECKER_ON 1
#endif
#include <confdefs.h>
/* end of include file */
Richard Barry
More information about the users
mailing list