summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.shared5
-rw-r--r--rtems_init.c6
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 <joel.sherrill@oarcorp.com>
+
+ * 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 <joel.sherrill@oarcorp.com>
* 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 <rtems/confdefs.h>