mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
8f977a4411
This is the first cleanup pass through makefiles and pios. Probably it is difficult to track changes due to the nature of them. I would recommend to look at resulting files and compiled code instead. NOTE: original branch was rebased and lot of conflicts were fixed on the way. So do not expect that every commit in this series will be buildable (unlike original branch). Only final result was tested. The main goal was to remove as much duplication of code (and copy/paste errors) as possible, moving common parts out of Makefiles. It still is not perfect, and mostly no code changes made - Makefiles and #ifdefs only. But please while testing make sure that all code works as before, and no modules/options are missed by accident. Brief list of changes: - Moved common parts of Makefiles into the set of *.mk files. - Changed method of passing common vars from top Makefile to lower ones. - Some pios cleanup, mostly #ifdefs, and all pios_config.h files. - Many obsolete files removed (for instance, AHRS files, op_config.h). - Many obsolete or unused macros removed or fixed/renamed (ALL_DIGNOSTICS). - Unified pios_config.h template. Please don't remove lines for board configs, only comment/uncomment them. Adding new PIOS options, please propagate them to all board files keeping the same order. - Some formatting, spacing, indentation (no line endings change yet). - Some cosmetic fixes (no more C:\X\Y\filename.c printings on Windows). - Added some library.mk files to move libs into AR achives later. - EntireFlash target now uses cross-platform python script to generate bin files. So it works on all supported platforms: Linux, OSX, Windows. - Top level packaging is completely rewritten. Now it is a part of top Makefile. As such, all dependencies are checked and accounted, no more 'make -j' problems should occur. - Default GCS_BUILD_CONF is release now, may be changed if necessary using 'make GCS_BUILD_CONF=debug gcs'. - GCS build paths are separated into debug and release, so no more obj file clashes. Packaging system supports only release builds. - New target is introduced: 'clean_package'. Now 'make package' does not clean build directory. Use clean_package instead for distributable builds. - Targets like 'all', 'opfw_resource', etc now will print extra contex in parallel builds too. - If any of 'package', 'clean_package', 'opfw_resource' targets are given on command line, GCS build will depend on the resource, so all fw_*.opfw targets will be built and embedded into GCS. By default GCS does not depend on resource, and will be built w/o firmware (unless the resource files already exist and the Qt resource file is generated). - fw_simposix (ELF executable) is now packaged for linux. Run'n'play! - Make help is refined and is now up to date. Still broken: - UnitTests, should be fixed - SimPosix: buildable, but should be reworked. Next planned passes to do: - toolchain bootstrapping and packaging (including windows - WIP) - CMSIS/StdPeriph lib cleanup - more PIOS cleanup - move libs into AR archives to save build time - sim targets refactir and cleanup - move android-related directories under <top>/android - unit test targets fix - source code line ending changes (there are many different, were not changed) - coding style Merging this, please use --no-ff git option to make it the real commit point Conflicts: A lot of... :-)
168 lines
5.2 KiB
C
Executable File
168 lines
5.2 KiB
C
Executable File
/**
|
|
******************************************************************************
|
|
* @addtogroup OpenPilotSystem OpenPilot System
|
|
* @{
|
|
* @addtogroup OpenPilotCore OpenPilot Core
|
|
* @{
|
|
* @file pios_config.h
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010-2013.
|
|
* @brief PiOS configuration header, the compile time config file for the PIOS.
|
|
* Defines which PiOS libraries and features are included in the firmware.
|
|
* @see The GNU Public License (GPL) Version 3
|
|
*****************************************************************************/
|
|
/*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#ifndef PIOS_CONFIG_H
|
|
#define PIOS_CONFIG_H
|
|
|
|
/*
|
|
* Below is a complete list of PIOS configurable options.
|
|
* Please do not remove or rearrange them. Only comment out
|
|
* unused options in the list. See main pios.h header for more
|
|
* details.
|
|
*/
|
|
|
|
/* #define PIOS_INCLUDE_DEBUG_CONSOLE */
|
|
/* #define DEBUG_LEVEL 0 */
|
|
|
|
/* PIOS FreeRTOS support */
|
|
#define PIOS_INCLUDE_FREERTOS
|
|
|
|
/* PIOS bootloader helper */
|
|
#define PIOS_INCLUDE_BL_HELPER
|
|
/* #define PIOS_INCLUDE_BL_HELPER_WRITE_SUPPORT */
|
|
|
|
/* PIOS system functions */
|
|
#define PIOS_INCLUDE_DELAY
|
|
#define PIOS_INCLUDE_INITCALL
|
|
#define PIOS_INCLUDE_SYS
|
|
|
|
/* PIOS hardware peripherals */
|
|
#define PIOS_INCLUDE_IRQ
|
|
#define PIOS_INCLUDE_RTC
|
|
#define PIOS_INCLUDE_TIM
|
|
#define PIOS_INCLUDE_USART
|
|
/* #define PIOS_INCLUDE_ADC */
|
|
/* #define PIOS_INCLUDE_I2C */
|
|
#define PIOS_INCLUDE_SPI
|
|
#define PIOS_INCLUDE_GPIO
|
|
#define PIOS_INCLUDE_EXTI
|
|
#define PIOS_INCLUDE_WDG
|
|
|
|
/* PIOS USB functions */
|
|
#define PIOS_INCLUDE_USB
|
|
#define PIOS_INCLUDE_USB_HID
|
|
#define PIOS_INCLUDE_USB_CDC
|
|
/* #define PIOS_INCLUDE_USB_RCTX */
|
|
|
|
/* PIOS sensor interfaces */
|
|
/* #define PIOS_INCLUDE_ADXL345 */
|
|
/* #define PIOS_INCLUDE_BMA180 */
|
|
/* #define PIOS_INCLUDE_L3GD20 */
|
|
/* #define PIOS_INCLUDE_MPU6000 */
|
|
/* #define PIOS_MPU6000_ACCEL */
|
|
/* #define PIOS_INCLUDE_HMC5843 */
|
|
/* #define PIOS_INCLUDE_HMC5883 */
|
|
/* #define PIOS_HMC5883_HAS_GPIOS */
|
|
/* #define PIOS_INCLUDE_BMP085 */
|
|
/* #define PIOS_INCLUDE_MS5611 */
|
|
/* #define PIOS_INCLUDE_MPXV */
|
|
/* #define PIOS_INCLUDE_ETASV3 */
|
|
/* #define PIOS_INCLUDE_HCSR04 */
|
|
|
|
/* PIOS receiver drivers */
|
|
/* #define PIOS_INCLUDE_PWM */
|
|
#define PIOS_INCLUDE_PPM
|
|
/* #define PIOS_INCLUDE_PPM_FLEXI */
|
|
/* #define PIOS_INCLUDE_DSM */
|
|
/* #define PIOS_INCLUDE_SBUS */
|
|
/* #define PIOS_INCLUDE_GCSRCVR */
|
|
|
|
/* PIOS abstract receiver interface */
|
|
#define PIOS_INCLUDE_RCVR
|
|
|
|
/* PIOS common peripherals */
|
|
#define PIOS_INCLUDE_LED
|
|
#define PIOS_INCLUDE_IAP
|
|
/* #define PIOS_INCLUDE_SERVO */
|
|
/* #define PIOS_INCLUDE_I2C_ESC */
|
|
/* #define PIOS_INCLUDE_OVERO */
|
|
/* #define PIOS_OVERO_SPI */
|
|
/* #define PIOS_INCLUDE_SDCARD */
|
|
/* #define LOG_FILENAME "startup.log" */
|
|
/* #define PIOS_INCLUDE_FLASH */
|
|
/* #define PIOS_INCLUDE_FLASH_SECTOR_SETTINGS */
|
|
/* #define FLASH_FREERTOS */
|
|
#define PIOS_INCLUDE_FLASH_EEPROM
|
|
|
|
/* PIOS radio modules */
|
|
#define PIOS_INCLUDE_RFM22B
|
|
#define PIOS_INCLUDE_RFM22B_COM
|
|
/* #define PIOS_INCLUDE_RFM22B_RCVR */
|
|
#define PIOS_INCLUDE_PPM_OUT
|
|
/* #define PIOS_RFM22B_DEBUG_ON_TELEM */
|
|
|
|
/* PIOS misc peripherals */
|
|
/* #define PIOS_INCLUDE_VIDEO */
|
|
/* #define PIOS_INCLUDE_WAVE */
|
|
/* #define PIOS_INCLUDE_UDP */
|
|
|
|
/* PIOS abstract comms interface with options */
|
|
#define PIOS_INCLUDE_COM
|
|
/* #define PIOS_INCLUDE_COM_MSG */
|
|
/* #define PIOS_INCLUDE_TELEMETRY_RF */
|
|
/* #define PIOS_INCLUDE_COM_TELEM */
|
|
/* #define PIOS_INCLUDE_COM_FLEXI */
|
|
/* #define PIOS_INCLUDE_COM_AUX */
|
|
/* #define PIOS_TELEM_PRIORITY_QUEUE */
|
|
/* #define PIOS_INCLUDE_GPS */
|
|
/* #define PIOS_GPS_MINIMAL */
|
|
/* #define PIOS_INCLUDE_GPS_NMEA_PARSER */
|
|
/* #define PIOS_INCLUDE_GPS_UBX_PARSER */
|
|
/* #define PIOS_GPS_SETS_HOMELOCATION */
|
|
|
|
/* Stabilization options */
|
|
/* #define PIOS_QUATERNION_STABILIZATION */
|
|
|
|
/* Performance counters */
|
|
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 1995998
|
|
|
|
/* Alarm Thresholds */
|
|
#define HEAP_LIMIT_WARNING 220
|
|
#define HEAP_LIMIT_CRITICAL 40
|
|
#define IRQSTACK_LIMIT_WARNING 100
|
|
#define IRQSTACK_LIMIT_CRITICAL 60
|
|
#define CPULOAD_LIMIT_WARNING 85
|
|
#define CPULOAD_LIMIT_CRITICAL 95
|
|
|
|
/* Task stack sizes */
|
|
#define PIOS_ACTUATOR_STACK_SIZE 1020
|
|
#define PIOS_MANUAL_STACK_SIZE 724
|
|
#define PIOS_SYSTEM_STACK_SIZE 460
|
|
#define PIOS_STABILIZATION_STACK_SIZE 524
|
|
#define PIOS_TELEM_STACK_SIZE 500
|
|
#define PIOS_EVENTDISPATCHER_STACK_SIZE 130
|
|
|
|
/* This can't be too high to stop eventdispatcher thread overflowing */
|
|
#define PIOS_EVENTDISAPTCHER_QUEUE 10
|
|
|
|
#endif /* PIOS_CONFIG_H */
|
|
/**
|
|
* @}
|
|
* @}
|
|
*/
|