mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 04:09:26 +08:00
usb01 builds but does not link
This commit is contained in:
parent
5373700fcd
commit
71141b3aa8
@ -1,28 +1,40 @@
|
|||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
include ../../config.inc
|
include ../../config.inc
|
||||||
|
|
||||||
PGM=${ARCH}/usb01.exe
|
|
||||||
|
|
||||||
# optional managers required
|
|
||||||
MANAGERS=all
|
|
||||||
|
|
||||||
# C source names
|
|
||||||
C_FILES = init.c
|
|
||||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
|
|
||||||
|
|
||||||
AM_CPPFLAGS += -I $(INSTALL_BASE)/include
|
|
||||||
LINK_LIBS += $(INSTALL_BASE)/libbsd.a -Wl,-Map=jennifer.txt
|
|
||||||
|
|
||||||
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
||||||
include $(RTEMS_CUSTOM)
|
include $(RTEMS_CUSTOM)
|
||||||
include $(PROJECT_ROOT)/make/leaf.cfg
|
include $(PROJECT_ROOT)/make/leaf.cfg
|
||||||
|
|
||||||
OBJS= $(C_O_FILES)
|
APP_PIECES = init \
|
||||||
|
test-file-system
|
||||||
|
|
||||||
all: ${ARCH} $(PGM)
|
APP_O_FILES = $(APP_PIECES:%=%.o)
|
||||||
|
APP_DEP_FILES = $(APP_PIECES:%=%.dep)
|
||||||
|
|
||||||
$(PGM): $(OBJS)
|
APP = app.exe
|
||||||
$(make-exe)
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
dist:
|
||||||
|
cd .. && tar cjf usb-demo/usb-demo.tar.bz2 \
|
||||||
|
`find usb-demo -name '*.h' -o -name '*.c'` usb-demo/Makefile
|
||||||
|
|
||||||
|
%.dep:
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
include $(APP_DEP_FILES)
|
||||||
|
@ -23,13 +23,15 @@
|
|||||||
#ifndef DEMO_SHELL_MINIMAL_H
|
#ifndef DEMO_SHELL_MINIMAL_H
|
||||||
#define DEMO_SHELL_MINIMAL_H
|
#define DEMO_SHELL_MINIMAL_H
|
||||||
|
|
||||||
#include <bsp/irq-info.h>
|
|
||||||
|
|
||||||
#define CONFIGURE_SHELL_COMMAND_CPUUSE
|
#define CONFIGURE_SHELL_COMMAND_CPUUSE
|
||||||
#define CONFIGURE_SHELL_COMMAND_PERIODUSE
|
#define CONFIGURE_SHELL_COMMAND_PERIODUSE
|
||||||
#define CONFIGURE_SHELL_COMMAND_STACKUSE
|
#define CONFIGURE_SHELL_COMMAND_STACKUSE
|
||||||
|
|
||||||
|
#if defined(BSP_HAS_IRQ_INFO)
|
||||||
|
#include <bsp/irq-info.h>
|
||||||
|
|
||||||
#define CONFIGURE_SHELL_USER_COMMANDS \
|
#define CONFIGURE_SHELL_USER_COMMANDS \
|
||||||
&bsp_interrupt_shell_command
|
&bsp_interrupt_shell_command
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* DEMO_SHELL_MINIMAL_H */
|
#endif /* DEMO_SHELL_MINIMAL_H */
|
||||||
|
@ -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);
|
sc = rtems_media_server_initialize(200, 32 * 1024, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES);
|
||||||
ASSERT_SC(sc);
|
ASSERT_SC(sc);
|
||||||
|
|
||||||
sc = rtems_bsd_initialize_with_interrupt_server();
|
sc = rtems_bsd_initialize();
|
||||||
ASSERT_SC(sc);
|
ASSERT_SC(sc);
|
||||||
|
|
||||||
rtems_bsd_shell_initialize();
|
rtems_bsd_shell_initialize();
|
||||||
|
@ -20,45 +20,27 @@
|
|||||||
* http://www.rtems.com/license/LICENSE.
|
* http://www.rtems.com/license/LICENSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/freebsd/machine/rtems-bsd-sysinit.h>
|
#include <freebsd/machine/rtems-bsd-sysinit.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
|
||||||
#ifdef USB_SYSINIT_INIT
|
#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_FREEBSD_CORE;
|
||||||
SYSINIT_NEED_USB_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;
|
SYSINIT_NEED_USB_OHCI;
|
||||||
#endif
|
#elif defined(__GEN83xx_BSP_h)
|
||||||
#ifdef NEED_USB_EHCI
|
|
||||||
SYSINIT_NEED_USB_EHCI;
|
SYSINIT_NEED_USB_EHCI;
|
||||||
#endif
|
#endif
|
||||||
SYSINIT_NEED_USB_MASS_STORAGE;
|
SYSINIT_NEED_USB_MASS_STORAGE;
|
||||||
#ifdef NEED_SDHC
|
|
||||||
SYSINIT_NEED_SDHC;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *const _bsd_nexus_devices [] = {
|
const char *const _bsd_nexus_devices [] = {
|
||||||
#ifdef NEED_USB_OHCI
|
#if defined(LIBBSP_ARM_LPC24XX_BSP_H) || defined(LIBBSP_ARM_LPC32XX_BSP_H)
|
||||||
"ohci",
|
"ohci",
|
||||||
#endif
|
#elif defined(__GEN83xx_BSP_h)
|
||||||
#ifdef NEED_USB_EHCI
|
|
||||||
"ehci",
|
"ehci",
|
||||||
#endif
|
#endif
|
||||||
#ifdef NEED_SDHC
|
|
||||||
"sdhci",
|
|
||||||
#endif
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user