Merge branch 'public-export-build' into fmuv2_bringup

This commit is contained in:
Lorenz Meier 2013-04-28 14:54:57 +02:00
commit a1503a8dd7
13 changed files with 60 additions and 35 deletions

View File

@ -38,7 +38,6 @@
# Sub-directories
SUBDIRS = adc can cdcacm nsh
SUBDIRS += math_demo control_demo kalman_demo px4_deamon_app
#SUBDIRS = adc buttons can cdcacm composite cxxtest dhcpd discover elf ftpc
#SUBDIRS += ftpd hello helloxx hidkbd igmp json keypadtest lcdrw mm modbus mount

View File

@ -116,7 +116,5 @@ endef
# command priority stack entrypoint
BUILTIN_COMMANDS := \
$(call _B, math_demo, , 8192, math_demo_main ) \
$(call _B, sercon, , 2048, sercon_main ) \
$(call _B, serdis, , 2048, serdis_main ) \
$(call _B, uorb, , 4096, uorb_main )
$(call _B, serdis, , 2048, serdis_main )

View File

@ -59,9 +59,6 @@ export INCLUDE_DIRS := $(PX4_MODULE_SRC) \
$(PX4_MODULE_SRC)/modules/ \
$(PX4_INCLUDE_DIR)
# Include from legacy app/library path
export INCLUDE_DIRS += $(NUTTX_APP_SRC)
#
# Tools
#

View File

@ -100,12 +100,19 @@
* Some of the USART pins are not available; override the GPIO
* definitions with an invalid pin configuration.
*/
#undef GPIO_USART2_CTS
#define GPIO_USART2_CTS 0xffffffff
#undef GPIO_USART2_RTS
#define GPIO_USART2_RTS 0xffffffff
#undef GPIO_USART2_CK
#define GPIO_USART2_CK 0xffffffff
#undef GPIO_USART3_TX
#define GPIO_USART3_TX 0xffffffff
#undef GPIO_USART3_CK
#define GPIO_USART3_CK 0xffffffff
#undef GPIO_USART3_CTS
#define GPIO_USART3_CTS 0xffffffff
#undef GPIO_USART3_RTS
#define GPIO_USART3_RTS 0xffffffff
/*
@ -156,6 +163,10 @@ extern "C" {
************************************************************************************/
EXTERN void stm32_boardinitialize(void);
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_BOARD_BOARD_H */

View File

@ -30,11 +30,3 @@
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
CONFIGURED_APPS += drivers/boards/px4io
CONFIGURED_APPS += drivers/stm32
CONFIGURED_APPS += px4io
# Mixer library from systemlib
CONFIGURED_APPS += systemlib/mixer

View File

@ -86,9 +86,17 @@ __EXPORT void stm32_boardinitialize(void)
stm32_configgpio(GPIO_SERVO_PWR_EN);
stm32_configgpio(GPIO_RELAY1_EN);
stm32_configgpio(GPIO_RELAY2_EN);
/* turn off - all leds are active low */
stm32_gpiowrite(GPIO_LED1, true);
stm32_gpiowrite(GPIO_LED2, true);
stm32_gpiowrite(GPIO_LED3, true);
/* LED config */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_ACC_OC_DETECT);
stm32_configgpio(GPIO_SERVO_OC_DETECT);
stm32_configgpio(GPIO_BTN_SAFETY);

View File

@ -32,7 +32,9 @@
****************************************************************************/
/**
* @file PX4IO hardware definitions.
* @file px4io_internal.h
*
* PX4IO hardware definitions.
*/
#pragma once

View File

@ -1,6 +1,6 @@
############################################################################
#
# Copyright (C) 2012 PX4 Development Team. All rights reserved.
# Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -32,7 +32,7 @@
############################################################################
#
# Makefile to build the LED driver.
# Build the LED driver.
#
include $(APPDIR)/mk/app.mk
SRCS = led.cpp

View File

@ -288,8 +288,8 @@ controls_tick() {
r_status_flags |= PX4IO_P_STATUS_FLAGS_OVERRIDE;
/* mix new RC input control values to servos */
if (dsm_updated || sbus_updated || ppm_updated)
mixer_tick();
//if (dsm_updated || sbus_updated || ppm_updated)
// mixer_tick();
} else {
r_status_flags &= ~PX4IO_P_STATUS_FLAGS_OVERRIDE;

View File

@ -8,11 +8,12 @@ SRCS = adc.c \
registers.c \
safety.c \
sbus.c \
mixer.cpp \
../systemlib/mixer/mixer.cpp \
../systemlib/mixer/mixer_group.cpp \
../systemlib/mixer/mixer_multirotor.cpp \
../systemlib/mixer/mixer_simple.cpp \
../systemlib/up_cxxinitialize.c \
../systemlib/hx_stream.c \
../systemlib/perf_counter.c
# mixer.cpp \
# ../systemlib/mixer/mixer.cpp \
# ../systemlib/mixer/mixer_group.cpp \
# ../systemlib/mixer/mixer_multirotor.cpp \
# ../systemlib/mixer/mixer_simple.cpp \

View File

@ -64,8 +64,10 @@ struct sys_state_s system_state;
static struct hrt_call serial_dma_call;
#ifdef CONFIG_STM32_I2C1
/* store i2c reset count XXX this should be a register, together with other error counters */
volatile uint32_t i2c_loop_resets = 0;
#endif
/*
* a set of debug buffers to allow us to send debug information from ISRs
@ -133,7 +135,9 @@ user_start(int argc, char *argv[])
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
#ifdef CONFIG_ARCH_DMA
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* print some startup info */
lowsyslog("\nPX4IO: starting\n");
@ -155,8 +159,10 @@ user_start(int argc, char *argv[])
/* initialise the control inputs */
controls_init();
#ifdef CONFIG_STM32_I2C1
/* start the i2c handler */
i2c_init();
#endif
/* add a performance counter for mixing */
perf_counter_t mixer_perf = perf_alloc(PC_ELAPSED, "mix");
@ -201,7 +207,7 @@ user_start(int argc, char *argv[])
/* kick the mixer */
perf_begin(mixer_perf);
mixer_tick();
// mixer_tick();
perf_end(mixer_perf);
/* kick the control inputs */

View File

@ -124,10 +124,18 @@ extern struct sys_state_s system_state;
#define LED_SAFETY(_s) stm32_gpiowrite(GPIO_LED3, !(_s))
#define POWER_SERVO(_s) stm32_gpiowrite(GPIO_SERVO_PWR_EN, (_s))
#define POWER_ACC1(_s) stm32_gpiowrite(GPIO_ACC1_PWR_EN, (_s))
#define POWER_ACC2(_s) stm32_gpiowrite(GPIO_ACC2_PWR_EN, (_s))
#define POWER_RELAY1(_s) stm32_gpiowrite(GPIO_RELAY1_EN, (_s))
#define POWER_RELAY2(_s) stm32_gpiowrite(GPIO_RELAY2_EN, (_s))
#ifdef GPIO_ACC1_PWR_EN
#define POWER_ACC1(_s) stm32_gpiowrite(GPIO_ACC1_PWR_EN, (_s))
#endif
#ifdef GPIO_ACC2_PWR_EN
#define POWER_ACC2(_s) stm32_gpiowrite(GPIO_ACC2_PWR_EN, (_s))
#endif
#ifdef GPIO_RELAY1_EN
#define POWER_RELAY1(_s) stm32_gpiowrite(GPIO_RELAY1_EN, (_s))
#endif
#ifdef GPIO_RELAY2_EN
#define POWER_RELAY2(_s) stm32_gpiowrite(GPIO_RELAY2_EN, (_s))
#endif
#define OVERCURRENT_ACC (!stm32_gpioread(GPIO_ACC_OC_DETECT))
#define OVERCURRENT_SERVO (!stm32_gpioread(GPIO_SERVO_OC_DETECT))
@ -140,18 +148,20 @@ extern struct sys_state_s system_state;
/*
* Mixer
*/
extern void mixer_tick(void);
extern void mixer_handle_text(const void *buffer, size_t length);
//extern void mixer_tick(void);
//extern void mixer_handle_text(const void *buffer, size_t length);
/**
* Safety switch/LED.
*/
extern void safety_init(void);
#ifdef CONFIG_STM32_I2C1
/**
* FMU communications
*/
extern void i2c_init(void);
#endif
/**
* Register space
@ -183,6 +193,7 @@ extern volatile uint8_t debug_level;
/* send a debug message to the console */
extern void isr_debug(uint8_t level, const char *fmt, ...);
#ifdef CONFIG_STM32_I2C1
void i2c_dump(void);
void i2c_reset(void);
#endif

View File

@ -245,7 +245,7 @@ registers_set(uint8_t page, uint8_t offset, const uint16_t *values, unsigned num
/* handle text going to the mixer parser */
case PX4IO_PAGE_MIXERLOAD:
mixer_handle_text(values, num_values * sizeof(*values));
//mixer_handle_text(values, num_values * sizeof(*values));
break;
default: