From 016859d23af06b5a41ca942d6798900cd3162401 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 8 Jul 2008 15:35:13 +0000 Subject: 2008-07-08 Joel Sherrill * Makefile.shared: Add -g. Leave temporary files for debug. * rtems_init.c: zero out workspace and heap automatically. This is required by the GNAT run-time. --- ChangeLog | 6 ++++++ Makefile.shared | 5 +++-- rtems_init.c | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a5bc4e..2dd9172 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-07-08 Joel Sherrill + + * Makefile.shared: Add -g. Leave temporary files for debug. + * rtems_init.c: zero out workspace and heap automatically. This + is required by the GNAT run-time. + 2008-02-06 Joel Sherrill * Makefile: Added exception_test. diff --git a/Makefile.shared b/Makefile.shared index 4d99bd3..a91b450 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -33,7 +33,7 @@ all: $(PROGRAM).exe $(PROGRAM).exe: rtems_init.o $(FILESYSTEM_OBJS) $(PROGRAM).adb $(EXTRA_OBJS) $(AS:as=gnatmake) \ - -I$(RTEMS_MAKEFILE_PATH)/lib/include/adainclude \ + -g -I$(RTEMS_MAKEFILE_PATH)/lib/include/adainclude \ -v $(EXTRA_GNATFLAGS) \ -O -gnata -gnatE -gnato -g $(PROGRAM) -o $(@) \ -bargs -Mgnat_main \ @@ -50,7 +50,8 @@ ifeq ($(RTEMS_BSP_FAMILY),pc386) $(OBJCOPY) -O binary $(@).obj $(@).bin $(RTEMS_MAKEFILE_PATH)/build-tools/bin2boot -v $(@).bt $(HEADERADDR) \ $(START16FILE) $(START16ADDR) 0 $(@).bin $(RELOCADDR) 0 - rm -f $(@).obj $(@).bin + # rm -f $(@).obj + rm -f $(@).bin endif rtems_init.o: ../rtems_init.c ../networkconfig.h $(FILESYSTEM_SRCS) diff --git a/rtems_init.c b/rtems_init.c index cc3699a..179f71e 100644 --- a/rtems_init.c +++ b/rtems_init.c @@ -199,6 +199,8 @@ void *POSIX_Init( void *argument ) status = pthread_attr_setstacksize( &attr, stacksize ); assert( !status ); + attr.schedpolicy = SCHED_RR; + attr.schedparam.sched_priority = 122; status = pthread_create( &thread_id, &attr, start_gnat_main, NULL ); assert( !status ); @@ -246,6 +248,10 @@ void *POSIX_Init( void *argument ) /* Account for any extra task stack size */ #define CONFIGURE_MEMORY_OVERHEAD (GNAT_MAIN_STACKSPACE) +/* Make sure the C Program Heap and Workspace are zeroed for GNAT */ +#define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY TRUE + #define CONFIGURE_INIT +void _flush_cache() {} #include -- cgit v1.2.3