Fix SD cards connected to SPI port 0 for logger mass storage usage,

auto start drivers for UART.
This commit is contained in:
Martin Mueller
2012-03-11 15:17:05 +01:00
parent b4eeec0deb
commit 928862fa8c
2 changed files with 33 additions and 3 deletions
@@ -0,0 +1,22 @@
<!DOCTYPE airframe SYSTEM "airframe.dtd">
<!--
SD card connected to TWOG, stop button on PPM_IN, XBee 57600
-->
<airframe name="Logger">
<firmware name="logger">
<target name="ap" board="tiny_2.11" >
<configure name="LOG_MSG_FMT" value="LOG_XBEE"/>
<configure name="SPI_CHANNEL" value="1" />
<configure name="UART0_BAUD" value="B57600" />
<configure name="UART1_BAUD" value="B57600" />
<configure name="LOG_STOP_KEY" value="6" />
</target>
</firmware>
</airframe>
+11 -3
View File
@@ -26,12 +26,16 @@ ifndef UART1_BAUD
UART1_BAUD = B9600
endif
ifndef LOG_STOP_KEY
LOG_STOP_KEY = 7
endif
# a configuration program to access both uart through usb
ifeq ($(ARCH), lpc21)
ap.CFLAGS += -DUSE_LED
ap.CFLAGS += -DUSE_LED -DPERIPHERALS_AUTO_INIT
ap.srcs = mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c $(SRC_FIRMWARE)/main_logger.c
# PPRZ message format is default
@@ -42,6 +46,7 @@ endif
#set the speed
ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=$(UART0_BAUD) -DUSE_UART0_RX_ONLY
ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=$(UART1_BAUD) -DUSE_UART1_RX_ONLY
ap.CFLAGS += -DLOG_STOP_KEY=$(LOG_STOP_KEY)
ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ap.srcs += mcu_periph/uart.c
ap.srcs += $(SRC_ARCH)/mcu_arch.c
@@ -80,11 +85,14 @@ ap.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
ap.srcs += $(SRC_ARCH)/lpcusb/examples/msc_bot.c
ap.srcs += $(SRC_ARCH)/lpcusb/examples/msc_scsi.c
ap.srcs += $(SRC_ARCH)/lpcusb/examples/blockdev_sd.c
ifeq ($(SPI_CHANNEL), 1)
ap.srcs += $(SRC_ARCH)/lpcusb/examples/lpc2000_spi.c
else
ap.srcs += $(SRC_ARCH)/lpcusb/examples/lpc2000_spi0.c
endif
else
$(error usb_tunnel currently only implemented for the lpc21)
$(error logger currently only implemented for the lpc21)
endif