From 7e02642b013bc556c84dc499ba2304812a2ecf33 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Sun, 17 Mar 2013 16:53:57 +0200 Subject: [PATCH] Move 3rd party printf formatter functions from PiOS to Libraries folder They are not a PiOS, but 3rd party libraries. They even should not be placed to the same (PiOS) library directory due to the printf symbol clashes (if all *.c from the folder are built). So they are moved, and each target can include that one which is necessary/desired. --- .../Common => Libraries}/printf-stdarg.c | 24 +++++++++---------- flight/{PiOS/Common => Libraries}/printf2.c | 0 make/apps-defs.mk | 1 - make/boot-defs.mk | 4 +++- 4 files changed, 15 insertions(+), 14 deletions(-) rename flight/{PiOS/Common => Libraries}/printf-stdarg.c (97%) rename flight/{PiOS/Common => Libraries}/printf2.c (100%) diff --git a/flight/PiOS/Common/printf-stdarg.c b/flight/Libraries/printf-stdarg.c similarity index 97% rename from flight/PiOS/Common/printf-stdarg.c rename to flight/Libraries/printf-stdarg.c index 5f057ee89..b579b9d53 100644 --- a/flight/PiOS/Common/printf-stdarg.c +++ b/flight/Libraries/printf-stdarg.c @@ -3,26 +3,26 @@ * @addtogroup PIOS PIOS Core hardware abstraction layer * @{ * - * @file printf-stdarg.c + * @file printf-stdarg.c * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * Parts by Thorsten Klose (tk@midibox.org) * @brief Formatted print functions * @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 +/* + * 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 + * + * 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., + * + * 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 */ diff --git a/flight/PiOS/Common/printf2.c b/flight/Libraries/printf2.c similarity index 100% rename from flight/PiOS/Common/printf2.c rename to flight/Libraries/printf2.c diff --git a/make/apps-defs.mk b/make/apps-defs.mk index c205ea297..a73d60716 100644 --- a/make/apps-defs.mk +++ b/make/apps-defs.mk @@ -102,7 +102,6 @@ SRC += $(PIOSCOMMON)/pios_rfm22b.c SRC += $(PIOSCOMMON)/pios_rfm22b_com.c SRC += $(PIOSCOMMON)/pios_sbus.c SRC += $(PIOSCOMMON)/pios_sdcard.c -SRC += $(PIOSCOMMON)/printf-stdarg.c # PIOS USB related files SRC += $(PIOSCOMMON)/pios_usb_desc_hid_cdc.c diff --git a/make/boot-defs.mk b/make/boot-defs.mk index f7b5d43dd..410a6401e 100644 --- a/make/boot-defs.mk +++ b/make/boot-defs.mk @@ -60,10 +60,12 @@ SRC += $(OPSYSTEM)/op_dfu.c ## PIOS Hardware (Common) SRC += $(PIOSCOMMON)/pios_board_info.c SRC += $(PIOSCOMMON)/pios_com_msg.c -SRC += $(PIOSCOMMON)/printf-stdarg.c SRC += $(PIOSCOMMON)/pios_usb_desc_hid_only.c SRC += $(PIOSCOMMON)/pios_usb_util.c +## Misc library functions +SRC += $(FLIGHTLIB)/printf-stdarg.c + # List C source files here which must be compiled in ARM-Mode (no -mthumb). # Use file-extension c for "c-only"-files SRCARM +=