[examples-v2 commit] psx_sched_report: Add RTEMS configuration to address build issue.
Joel Sherrill
joel at rtems.org
Thu Oct 12 19:17:23 UTC 2017
Module: examples-v2
Branch: master
Commit: b6c5dbb24981b0ca93a94734acccb65be872b34f
Changeset: http://git.rtems.org/examples-v2/commit/?id=b6c5dbb24981b0ca93a94734acccb65be872b34f
Author: Joel Sherrill <joel at rtems.org>
Date: Thu Oct 12 14:16:44 2017 -0500
psx_sched_report: Add RTEMS configuration to address build issue.
Closes #3158.
---
posix_api/psx_sched_report/rtems_config.c | 39 +++++++++++++++++++++++++++++++
posix_api/psx_sched_report/wscript | 2 +-
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/posix_api/psx_sched_report/rtems_config.c b/posix_api/psx_sched_report/rtems_config.c
new file mode 100644
index 0000000..f985453
--- /dev/null
+++ b/posix_api/psx_sched_report/rtems_config.c
@@ -0,0 +1,39 @@
+
+#include <stdlib.h>
+
+int main(int argc, char **argv);
+
+static char *argv_list[] = {
+ "psx_sched_report",
+ ""
+};
+static void *POSIX_Init(void *arg)
+{
+ (void) arg; /* deliberately ignored */
+
+ /*
+ * Initialize optional services
+ */
+
+ /*
+ * Could get arguments from command line or have a static set.
+ */
+ (void) main(1, argv_list);
+
+ return NULL;
+}
+
+#include <bsp.h> /* for device driver prototypes */
+
+/* NOTICE: the clock driver is explicitly disabled */
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_UNLIMITED_OBJECTS
+#define CONFIGURE_UNIFIED_WORK_AREAS
+#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (64 * 1024)
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
diff --git a/posix_api/psx_sched_report/wscript b/posix_api/psx_sched_report/wscript
index 0cb9a52..208b078 100644
--- a/posix_api/psx_sched_report/wscript
+++ b/posix_api/psx_sched_report/wscript
@@ -11,6 +11,6 @@ def build(bld):
bld(features = 'c cprogram',
target = 'psx_sched_report.exe',
- source = ['test.c'],
+ source = ['test.c','rtems_config.c'],
lib = ['c'])
More information about the vc
mailing list