mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
NuttX quiet build
cmake combine NuttX copy and export -NuttX wasn't recopying if it fails to compile
This commit is contained in:
@@ -298,7 +298,7 @@ px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags}" GLUE " ")
|
|||||||
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags}" GLUE " ")
|
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags}" GLUE " ")
|
||||||
|
|
||||||
include_directories(${include_dirs})
|
include_directories(${include_dirs})
|
||||||
message("INCLUDE_DIRS=${include_dirs}")
|
#message("INCLUDE_DIRS=${include_dirs}")
|
||||||
link_directories(${link_dirs})
|
link_directories(${link_dirs})
|
||||||
add_definitions(${definitions})
|
add_definitions(${definitions})
|
||||||
|
|
||||||
@@ -333,7 +333,7 @@ execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/include)
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
# DriverFramework Drivers
|
# DriverFramework Drivers
|
||||||
#
|
#
|
||||||
message("ADDING DRIVERS")
|
#message("ADDING DRIVERS")
|
||||||
set(df_driver_libs)
|
set(df_driver_libs)
|
||||||
foreach(driver ${config_df_driver_list})
|
foreach(driver ${config_df_driver_list})
|
||||||
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
|
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -111,7 +111,7 @@ define cmake-build
|
|||||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(PWD)/build_$@); fi
|
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(PWD)/build_$@); fi
|
||||||
+@Tools/check_submodules.sh
|
+@Tools/check_submodules.sh
|
||||||
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
|
+@(echo PX4 CONFIG: $@ && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# create empty targets to avoid msgs for targets passed to cmake
|
# create empty targets to avoid msgs for targets passed to cmake
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ def main():
|
|||||||
const="",
|
const="",
|
||||||
metavar="BOARD",
|
metavar="BOARD",
|
||||||
help="Board to create airframes xml for")
|
help="Board to create airframes xml for")
|
||||||
|
parser.add_argument("-v", "--verbose", help="verbose output")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Check for valid command
|
# Check for valid command
|
||||||
@@ -84,7 +85,7 @@ def main():
|
|||||||
parser = srcparser.SourceParser()
|
parser = srcparser.SourceParser()
|
||||||
|
|
||||||
# Scan directories, and parse the files
|
# Scan directories, and parse the files
|
||||||
print("Scanning source path " + args.airframes_path)
|
if args.verbose: print("Scanning source path " + args.airframes_path)
|
||||||
if not scanner.ScanDir(args.airframes_path, parser):
|
if not scanner.ScanDir(args.airframes_path, parser):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# We can't validate yet
|
# We can't validate yet
|
||||||
@@ -94,16 +95,16 @@ def main():
|
|||||||
|
|
||||||
# Output to XML file
|
# Output to XML file
|
||||||
if args.xml:
|
if args.xml:
|
||||||
print("Creating XML file " + args.xml)
|
if args.verbose: print("Creating XML file " + args.xml)
|
||||||
out = xmlout.XMLOutput(param_groups, args.board)
|
out = xmlout.XMLOutput(param_groups, args.board)
|
||||||
out.Save(args.xml)
|
out.Save(args.xml)
|
||||||
|
|
||||||
if args.start_script:
|
if args.start_script:
|
||||||
print("Creating start script " + args.start_script)
|
if args.verbose: print("Creating start script " + args.start_script)
|
||||||
out = rcout.RCOutput(param_groups, args.board)
|
out = rcout.RCOutput(param_groups, args.board)
|
||||||
out.Save(args.start_script)
|
out.Save(args.start_script)
|
||||||
|
|
||||||
print("All done!")
|
if (args.verbose): print("All done!")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ def main():
|
|||||||
metavar="SUMMARY",
|
metavar="SUMMARY",
|
||||||
default="Automagically updated parameter documentation from code.",
|
default="Automagically updated parameter documentation from code.",
|
||||||
help="DokuWiki page edit summary")
|
help="DokuWiki page edit summary")
|
||||||
|
parser.add_argument("-v", "--verbose", help="verbose output")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Check for valid command
|
# Check for valid command
|
||||||
@@ -120,7 +121,7 @@ def main():
|
|||||||
parser = srcparser.SourceParser()
|
parser = srcparser.SourceParser()
|
||||||
|
|
||||||
# Scan directories, and parse the files
|
# Scan directories, and parse the files
|
||||||
print("Scanning source path " + args.src_path)
|
if (args.verbose): print("Scanning source path " + args.src_path)
|
||||||
if not scanner.ScanDir(args.src_path, parser):
|
if not scanner.ScanDir(args.src_path, parser):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if not parser.Validate():
|
if not parser.Validate():
|
||||||
@@ -129,7 +130,7 @@ def main():
|
|||||||
|
|
||||||
# Output to XML file
|
# Output to XML file
|
||||||
if args.xml:
|
if args.xml:
|
||||||
print("Creating XML file " + args.xml)
|
if args.verbose: print("Creating XML file " + args.xml)
|
||||||
out = xmlout.XMLOutput(param_groups, args.board, os.path.join(args.src_path, args.inject_xml))
|
out = xmlout.XMLOutput(param_groups, args.board, os.path.join(args.src_path, args.inject_xml))
|
||||||
out.Save(args.xml)
|
out.Save(args.xml)
|
||||||
|
|
||||||
@@ -147,7 +148,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
print("Error: You need to specify DokuWiki XML-RPC username and password!")
|
print("Error: You need to specify DokuWiki XML-RPC username and password!")
|
||||||
|
|
||||||
print("All done!")
|
#print("All done!")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def main():
|
|||||||
help="ROMFS scratch folder.")
|
help="ROMFS scratch folder.")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
print("Pruning ROMFS files.")
|
#print("Pruning ROMFS files.")
|
||||||
|
|
||||||
# go through
|
# go through
|
||||||
for (root, dirs, files) in os.walk(args.folder):
|
for (root, dirs, files) in os.walk(args.folder):
|
||||||
|
|||||||
@@ -773,7 +773,7 @@ function(px4_create_git_hash_header)
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
message(STATUS "GIT_DESC = ${git_desc}")
|
#message(STATUS "GIT_DESC = ${git_desc}")
|
||||||
set(git_desc_short)
|
set(git_desc_short)
|
||||||
string(SUBSTRING ${git_desc} 1 16 git_desc_short)
|
string(SUBSTRING ${git_desc} 1 16 git_desc_short)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
|
||||||
|
|||||||
@@ -202,28 +202,22 @@ function(px4_nuttx_add_export)
|
|||||||
add_dependencies(nuttx_patch nuttx_patch_${patch_name})
|
add_dependencies(nuttx_patch nuttx_patch_${patch_name})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# copy
|
# copy and export
|
||||||
add_custom_command(OUTPUT nuttx_copy_${CONFIG}.stamp
|
file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
|
||||||
COMMAND ${MKDIR} -p ${CMAKE_BINARY_DIR}/${CONFIG}
|
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
||||||
COMMAND ${MKDIR} -p ${nuttx_src}
|
COMMAND ${MKDIR} -p ${nuttx_src}
|
||||||
COMMAND ${CP} -a ${CMAKE_SOURCE_DIR}/NuttX/. ${nuttx_src}/
|
COMMAND ${CP} -a ${CMAKE_SOURCE_DIR}/NuttX/. ${nuttx_src}/
|
||||||
COMMAND ${RM} -rf ${nuttx_src}/.git
|
COMMAND ${RM} -rf ${nuttx_src}/.git
|
||||||
COMMAND ${TOUCH} nuttx_copy_${CONFIG}.stamp
|
#COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
|
||||||
DEPENDS ${DEPENDS})
|
|
||||||
add_custom_target(__nuttx_copy_${CONFIG}
|
|
||||||
DEPENDS nuttx_copy_${CONFIG}.stamp __nuttx_patch_${CONFIG})
|
|
||||||
|
|
||||||
# export
|
|
||||||
file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
|
|
||||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
|
||||||
COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
|
|
||||||
COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
|
COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
|
||||||
|
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
|
||||||
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
|
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
|
||||||
COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh
|
COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh
|
||||||
COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
|
#COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
|
||||||
COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > /dev/null
|
COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > nuttx_build.log
|
||||||
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
||||||
DEPENDS ${config_files} ${DEPENDS} __nuttx_copy_${CONFIG})
|
DEPENDS ${config_files} ${DEPENDS}
|
||||||
|
COMMENT "Building NuttX for ${CONFIG}")
|
||||||
|
|
||||||
# extract
|
# extract
|
||||||
add_custom_command(OUTPUT nuttx_export_${CONFIG}.stamp
|
add_custom_command(OUTPUT nuttx_export_${CONFIG}.stamp
|
||||||
|
|||||||
72
nuttx-configs/PX4_Warnings.mk
Normal file
72
nuttx-configs/PX4_Warnings.mk
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/PX4_Warnings.mk
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
PX4_ARCHWARNINGS = -Wall \
|
||||||
|
-Wextra \
|
||||||
|
-Wdouble-promotion \
|
||||||
|
-Wframe-larger-than=1024 \
|
||||||
|
-Wlogical-op \
|
||||||
|
-Wpacked \
|
||||||
|
-Wpointer-arith \
|
||||||
|
-Wshadow \
|
||||||
|
-Wno-sign-compare \
|
||||||
|
-Wno-unused-parameter
|
||||||
|
|
||||||
|
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
||||||
|
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
||||||
|
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
||||||
|
|
||||||
|
PX4_ARCHCWARNINGS = $(ARCHWARNINGS) \
|
||||||
|
-Wbad-function-cast \
|
||||||
|
-Wmissing-parameter-type \
|
||||||
|
-Wnested-externs \
|
||||||
|
-Wstrict-prototypes \
|
||||||
|
-Wno-bad-function-cast \
|
||||||
|
-Wno-cpp \
|
||||||
|
-Wno-implicit-function-declaration \
|
||||||
|
-Wno-maybe-uninitialized \
|
||||||
|
-Wno-missing-field-initializers \
|
||||||
|
-Wno-nested-externs \
|
||||||
|
-Wno-old-style-declaration \
|
||||||
|
-Wno-pointer-sign \
|
||||||
|
-Wno-type-limits \
|
||||||
|
-Wno-unused-but-set-variable \
|
||||||
|
-Wno-unused-function \
|
||||||
|
-Wno-unused-label \
|
||||||
|
-Wno-unused-variable
|
||||||
|
|
||||||
|
PX4_ARCHWARNINGSXX = $(ARCHWARNINGS) \
|
||||||
|
-Wno-cpp \
|
||||||
|
-Wno-psabi
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -53,7 +55,7 @@ NM = $(CROSSDEV)nm
|
|||||||
OBJCOPY = $(CROSSDEV)objcopy
|
OBJCOPY = $(CROSSDEV)objcopy
|
||||||
OBJDUMP = $(CROSSDEV)objdump
|
OBJDUMP = $(CROSSDEV)objdump
|
||||||
|
|
||||||
MAXOPTIMIZATION = -O3
|
MAXOPTIMIZATION = -Os
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m4 \
|
ARCHCPUFLAGS = -mcpu=cortex-m4 \
|
||||||
-mthumb \
|
-mthumb \
|
||||||
-march=armv7e-m \
|
-march=armv7e-m \
|
||||||
@@ -91,7 +93,7 @@ else
|
|||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
@@ -108,10 +110,10 @@ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
|||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-fno-strength-reduce \
|
-fno-strength-reduce \
|
||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-funsafe-math-optimizations \
|
-funsafe-math-optimizations \
|
||||||
-fno-builtin-printf \
|
-fno-builtin-printf \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
|
|
||||||
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
ARCHOPTIMIZATION += -g
|
ARCHOPTIMIZATION += -g
|
||||||
@@ -119,32 +121,9 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wno-sign-compare \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wextra \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wdouble-promotion \
|
|
||||||
-Wshadow \
|
|
||||||
-Wfloat-equal \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wmissing-declarations \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wmissing-prototypes \
|
|
||||||
-Wnested-externs \
|
|
||||||
-Wunsuffixed-float-constants
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS) \
|
|
||||||
-Wno-psabi
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# configs/px4fmu-v2/nsh/Make.defs
|
# configs/mindpx-v2/nsh/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -91,7 +93,7 @@ else
|
|||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
@@ -108,10 +110,10 @@ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
|||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-fno-strength-reduce \
|
-fno-strength-reduce \
|
||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-funsafe-math-optimizations \
|
-funsafe-math-optimizations \
|
||||||
-fno-builtin-printf \
|
-fno-builtin-printf \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
|
|
||||||
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
ARCHOPTIMIZATION += -g
|
ARCHOPTIMIZATION += -g
|
||||||
@@ -119,28 +121,9 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wno-sign-compare \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wextra \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wdouble-promotion \
|
|
||||||
-Wshadow \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wnested-externs
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS) \
|
|
||||||
-Wno-psabi
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# configs/px4fmu-v2/nsh/Make.defs
|
# configs/px4-stm32f4discovery/nsh/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -53,7 +55,7 @@ NM = $(CROSSDEV)nm
|
|||||||
OBJCOPY = $(CROSSDEV)objcopy
|
OBJCOPY = $(CROSSDEV)objcopy
|
||||||
OBJDUMP = $(CROSSDEV)objdump
|
OBJDUMP = $(CROSSDEV)objdump
|
||||||
|
|
||||||
MAXOPTIMIZATION = -O3
|
MAXOPTIMIZATION = -Os
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m4 \
|
ARCHCPUFLAGS = -mcpu=cortex-m4 \
|
||||||
-mthumb \
|
-mthumb \
|
||||||
-march=armv7e-m \
|
-march=armv7e-m \
|
||||||
@@ -62,8 +64,9 @@ ARCHCPUFLAGS = -mcpu=cortex-m4 \
|
|||||||
|
|
||||||
|
|
||||||
# enable precise stack overflow tracking
|
# enable precise stack overflow tracking
|
||||||
INSTRUMENTATIONDEFINES = -finstrument-functions \
|
ifeq ($(CONFIG_ARMV7M_STACKCHECK),y)
|
||||||
-ffixed-r10
|
INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10
|
||||||
|
endif
|
||||||
|
|
||||||
# pull in *just* libm from the toolchain ... this is grody
|
# pull in *just* libm from the toolchain ... this is grody
|
||||||
LIBM = "${shell $(CC) $(ARCHCPUFLAGS) -print-file-name=libm.a}"
|
LIBM = "${shell $(CC) $(ARCHCPUFLAGS) -print-file-name=libm.a}"
|
||||||
@@ -90,7 +93,7 @@ else
|
|||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
@@ -107,10 +110,10 @@ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
|||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-fno-strength-reduce \
|
-fno-strength-reduce \
|
||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-funsafe-math-optimizations \
|
-funsafe-math-optimizations \
|
||||||
-fno-builtin-printf \
|
-fno-builtin-printf \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
|
|
||||||
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
ARCHOPTIMIZATION += -g
|
ARCHOPTIMIZATION += -g
|
||||||
@@ -118,31 +121,9 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wextra \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wdouble-promotion \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wshadow \
|
|
||||||
-Wfloat-equal \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wmissing-declarations \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wmissing-prototypes \
|
|
||||||
-Wnested-externs \
|
|
||||||
-Wunsuffixed-float-constants
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS) \
|
|
||||||
-Wno-psabi
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
|||||||
@@ -283,8 +283,7 @@ CONFIG_STM32_USART_SINGLEWIRE=y
|
|||||||
#
|
#
|
||||||
# CONFIG_STM32_I2C_DYNTIMEO is not set
|
# CONFIG_STM32_I2C_DYNTIMEO is not set
|
||||||
CONFIG_STM32_I2CTIMEOSEC=0
|
CONFIG_STM32_I2CTIMEOSEC=0
|
||||||
CONFIG_STM32_I2CTIMEOMS=500
|
CONFIG_STM32_I2CTIMEOMS=10
|
||||||
CONFIG_STM32_I2CTIMEOTICKS=500
|
|
||||||
# CONFIG_STM32_I2C_DUTY16_9 is not set
|
# CONFIG_STM32_I2C_DUTY16_9 is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -91,7 +93,7 @@ else
|
|||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
@@ -108,10 +110,10 @@ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
|||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-fno-strength-reduce \
|
-fno-strength-reduce \
|
||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-funsafe-math-optimizations \
|
-funsafe-math-optimizations \
|
||||||
-fno-builtin-printf \
|
-fno-builtin-printf \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
|
|
||||||
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
ARCHOPTIMIZATION += -g
|
ARCHOPTIMIZATION += -g
|
||||||
@@ -119,28 +121,9 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wno-sign-compare \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wextra \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wdouble-promotion \
|
|
||||||
-Wshadow \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wnested-externs
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS) \
|
|
||||||
-Wno-psabi
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -91,7 +93,7 @@ else
|
|||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
@@ -108,10 +110,10 @@ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
|||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-fno-strength-reduce \
|
-fno-strength-reduce \
|
||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-funsafe-math-optimizations \
|
-funsafe-math-optimizations \
|
||||||
-fno-builtin-printf \
|
-fno-builtin-printf \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
|
|
||||||
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
ARCHOPTIMIZATION += -g
|
ARCHOPTIMIZATION += -g
|
||||||
@@ -119,28 +121,9 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wno-sign-compare \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wextra \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wdouble-promotion \
|
|
||||||
-Wshadow \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wnested-externs
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS) \
|
|
||||||
-Wno-psabi
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# configs/px4fmu-v2/nsh/Make.defs
|
# configs/px4fmu-v4/nsh/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -119,28 +121,9 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wno-sign-compare \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wextra \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wdouble-promotion \
|
|
||||||
-Wshadow \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wnested-externs
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS) \
|
|
||||||
-Wno-psabi
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -84,7 +86,7 @@ else
|
|||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
@@ -101,10 +103,10 @@ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
|||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-fno-strength-reduce \
|
-fno-strength-reduce \
|
||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-funsafe-math-optimizations \
|
-funsafe-math-optimizations \
|
||||||
-fno-builtin-printf \
|
-fno-builtin-printf \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
|
|
||||||
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
ARCHOPTIMIZATION += -g
|
ARCHOPTIMIZATION += -g
|
||||||
@@ -112,28 +114,10 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wno-sign-compare \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wextra \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wdouble-promotion \
|
ARCHDEFINES =
|
||||||
-Wshadow \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wnested-externs
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS)
|
|
||||||
ARCHDEFINES =
|
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
# this seems to be the only way to add linker flags
|
# this seems to be the only way to add linker flags
|
||||||
@@ -155,6 +139,7 @@ OBJEXT = .o
|
|||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
|
|
||||||
# produce partially-linked $1 from files in $2
|
# produce partially-linked $1 from files in $2
|
||||||
define PRELINK
|
define PRELINK
|
||||||
@echo "PRELINK: $1"
|
@echo "PRELINK: $1"
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
include $(TOPDIR)/PX4_Warnings.mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# We only support building with the ARM bare-metal toolchain from
|
# We only support building with the ARM bare-metal toolchain from
|
||||||
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
|
||||||
@@ -84,7 +86,7 @@ else
|
|||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
@@ -101,10 +103,10 @@ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
|||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-fno-strength-reduce \
|
-fno-strength-reduce \
|
||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-funsafe-math-optimizations \
|
-funsafe-math-optimizations \
|
||||||
-fno-builtin-printf \
|
-fno-builtin-printf \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
|
|
||||||
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
ARCHOPTIMIZATION += -g
|
ARCHOPTIMIZATION += -g
|
||||||
@@ -112,28 +114,10 @@ endif
|
|||||||
|
|
||||||
ARCHCFLAGS = -std=gnu99
|
ARCHCFLAGS = -std=gnu99
|
||||||
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
|
||||||
ARCHWARNINGS = -Wall \
|
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
|
||||||
-Wno-sign-compare \
|
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
|
||||||
-Wextra \
|
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
|
||||||
-Wdouble-promotion \
|
ARCHDEFINES =
|
||||||
-Wshadow \
|
|
||||||
-Wframe-larger-than=1024 \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wpacked \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
|
||||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
|
||||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
|
||||||
|
|
||||||
ARCHCWARNINGS = $(ARCHWARNINGS) \
|
|
||||||
-Wbad-function-cast \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wold-style-declaration \
|
|
||||||
-Wmissing-parameter-type \
|
|
||||||
-Wnested-externs
|
|
||||||
ARCHWARNINGSXX = $(ARCHWARNINGS)
|
|
||||||
ARCHDEFINES =
|
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
# this seems to be the only way to add linker flags
|
# this seems to be the only way to add linker flags
|
||||||
@@ -155,6 +139,7 @@ OBJEXT = .o
|
|||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
|
|
||||||
# produce partially-linked $1 from files in $2
|
# produce partially-linked $1 from files in $2
|
||||||
define PRELINK
|
define PRELINK
|
||||||
@echo "PRELINK: $1"
|
@echo "PRELINK: $1"
|
||||||
|
|||||||
Reference in New Issue
Block a user