[rtems-libbsd commit] usb01 builds but does not link
Joel Sherrill
joel at rtems.org
Wed Mar 21 17:44:37 UTC 2012
Module: rtems-libbsd
Branch: master
Commit: 71141b3aa8cc05012bd0c0e87400a92fbb79cd6d
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=71141b3aa8cc05012bd0c0e87400a92fbb79cd6d
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Wed Mar 21 12:45:18 2012 -0500
usb01 builds but does not link
---
testsuite/usb01/Makefile | 48 +++++++++++++++++++++------------
testsuite/usb01/demo-shell-minimal.h | 6 +++-
testsuite/usb01/init.c | 2 +-
testsuite/usb01/usb-sysinit.h | 36 ++++++-------------------
4 files changed, 44 insertions(+), 48 deletions(-)
diff --git a/testsuite/usb01/Makefile b/testsuite/usb01/Makefile
index 2d97767..6f5aae9 100644
--- a/testsuite/usb01/Makefile
+++ b/testsuite/usb01/Makefile
@@ -1,28 +1,40 @@
-#
-# $Id$
-#
include ../../config.inc
-PGM=${ARCH}/usb01.exe
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+include $(RTEMS_CUSTOM)
+include $(PROJECT_ROOT)/make/leaf.cfg
-# optional managers required
-MANAGERS=all
+APP_PIECES = init \
+ test-file-system
-# C source names
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+APP_O_FILES = $(APP_PIECES:%=%.o)
+APP_DEP_FILES = $(APP_PIECES:%=%.dep)
-AM_CPPFLAGS += -I $(INSTALL_BASE)/include
-LINK_LIBS += $(INSTALL_BASE)/libbsd.a -Wl,-Map=jennifer.txt
+APP = app.exe
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
+DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
+AM_CPPFLAGS += -I $(INSTALL_BASE)/include -I.
+
+CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused
+
+LINK_LIBS += $(INSTALL_BASE)/libbsd.a
+
+CXXFLAGS += $(CFLAGS)
+
+all: $(APP)
+
+$(APP): $(APP_O_FILES)
+ $(CXX) $(CXXFLAGS) $^ $(LINK_LIBS) -o $(APP)
+
+clean:
+ rm -f $(APP_O_FILES) $(APP_DEP_FILES)
-OBJS= $(C_O_FILES)
+dist:
+ cd .. && tar cjf usb-demo/usb-demo.tar.bz2 \
+ `find usb-demo -name '*.h' -o -name '*.c'` usb-demo/Makefile
-all: ${ARCH} $(PGM)
+%.dep:
+ touch $@
-$(PGM): $(OBJS)
- $(make-exe)
+include $(APP_DEP_FILES)
diff --git a/testsuite/usb01/demo-shell-minimal.h b/testsuite/usb01/demo-shell-minimal.h
index 5df1ef8..f23b750 100644
--- a/testsuite/usb01/demo-shell-minimal.h
+++ b/testsuite/usb01/demo-shell-minimal.h
@@ -23,13 +23,15 @@
#ifndef DEMO_SHELL_MINIMAL_H
#define DEMO_SHELL_MINIMAL_H
-#include <bsp/irq-info.h>
-
#define CONFIGURE_SHELL_COMMAND_CPUUSE
#define CONFIGURE_SHELL_COMMAND_PERIODUSE
#define CONFIGURE_SHELL_COMMAND_STACKUSE
+#if defined(BSP_HAS_IRQ_INFO)
+#include <bsp/irq-info.h>
+
#define CONFIGURE_SHELL_USER_COMMANDS \
&bsp_interrupt_shell_command
+#endif
#endif /* DEMO_SHELL_MINIMAL_H */
diff --git a/testsuite/usb01/init.c b/testsuite/usb01/init.c
index 79c1e67..0cd833b 100644
--- a/testsuite/usb01/init.c
+++ b/testsuite/usb01/init.c
@@ -260,7 +260,7 @@ static void Init(rtems_task_argument arg)
sc = rtems_media_server_initialize(200, 32 * 1024, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES);
ASSERT_SC(sc);
- sc = rtems_bsd_initialize_with_interrupt_server();
+ sc = rtems_bsd_initialize();
ASSERT_SC(sc);
rtems_bsd_shell_initialize();
diff --git a/testsuite/usb01/usb-sysinit.h b/testsuite/usb01/usb-sysinit.h
index b77a12b..d4513c1 100644
--- a/testsuite/usb01/usb-sysinit.h
+++ b/testsuite/usb01/usb-sysinit.h
@@ -20,46 +20,28 @@
* http://www.rtems.com/license/LICENSE.
*/
-#include <rtems/freebsd/machine/rtems-bsd-sysinit.h>
+#include <freebsd/machine/rtems-bsd-sysinit.h>
#include <bsp.h>
#ifdef USB_SYSINIT_INIT
-#if defined(LIBBSP_ARM_LPC24XX_BSP_H) || defined(LIBBSP_ARM_LPC32XX_BSP_H)
- #define NEED_USB_OHCI
-#elif defined(__GEN83xx_BSP_h) || defined(LIBBSP_POWERPC_QORIQ_BSP_H)
- #define NEED_USB_EHCI
-#endif
-
-#if defined(LIBBSP_POWERPC_QORIQ_BSP_H)
- #define NEED_SDHC
-#endif
-
SYSINIT_NEED_FREEBSD_CORE;
SYSINIT_NEED_USB_CORE;
-#ifdef NEED_USB_OHCI
+#if defined(LIBBSP_ARM_LPC24XX_BSP_H) || defined(LIBBSP_ARM_LPC32XX_BSP_H)
SYSINIT_NEED_USB_OHCI;
-#endif
-#ifdef NEED_USB_EHCI
+#elif defined(__GEN83xx_BSP_h)
SYSINIT_NEED_USB_EHCI;
#endif
SYSINIT_NEED_USB_MASS_STORAGE;
-#ifdef NEED_SDHC
- SYSINIT_NEED_SDHC;
-#endif
const char *const _bsd_nexus_devices [] = {
- #ifdef NEED_USB_OHCI
- "ohci",
- #endif
- #ifdef NEED_USB_EHCI
- "ehci",
- #endif
- #ifdef NEED_SDHC
- "sdhci",
- #endif
- NULL
+ #if defined(LIBBSP_ARM_LPC24XX_BSP_H) || defined(LIBBSP_ARM_LPC32XX_BSP_H)
+ "ohci",
+ #elif defined(__GEN83xx_BSP_h)
+ "ehci",
+ #endif
+ NULL
};
#endif /* USB_SYSINIT_INIT */
More information about the vc
mailing list