From 9d183376479c9324ca0d6a88cf3e835fe6f8dd2e Mon Sep 17 00:00:00 2001 From: James Goppert Date: Tue, 8 Sep 2015 10:15:22 -0400 Subject: [PATCH] Fixed issues noted by voon, start of python script for bin to obj. --- cmake/bin_to_object.py | 21 +++++++++++++++++++ ...commands.c.cmake => builtin_commands.c.in} | 0 cmake/px4_base.cmake | 2 +- cmake/px4_impl_nuttx.cmake | 2 +- cmake/px4_impl_qurt.cmake | 2 +- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100755 cmake/bin_to_object.py rename cmake/{builtin_commands.c.cmake => builtin_commands.c.in} (100%) diff --git a/cmake/bin_to_object.py b/cmake/bin_to_object.py new file mode 100755 index 0000000000..053580d969 --- /dev/null +++ b/cmake/bin_to_object.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +""" +This converts a binary imagge to an object file +""" +from __future__ import print_function +import subprocess +import argparse +import os + +#pylint: disable=invalid-name +parser = argparse.ArgumentParser(description='Convert bin to obj.') +parser.add_argument('--c-flags', required=True) +parser.add_argument('--c-compiler', required=True) +parser.add_argument('--nm', required=True) +args = parser.parse_args() + +#TODO write function + +exit(0) + +# vim: set et ft=python fenc= ff=unix sts=4 sw=4 ts=4 : diff --git a/cmake/builtin_commands.c.cmake b/cmake/builtin_commands.c.in similarity index 100% rename from cmake/builtin_commands.c.cmake rename to cmake/builtin_commands.c.in diff --git a/cmake/px4_base.cmake b/cmake/px4_base.cmake index edc910b4cb..cf808a8152 100644 --- a/cmake/px4_base.cmake +++ b/cmake/px4_base.cmake @@ -389,7 +389,7 @@ endfunction() # function(px4_add_upload) px4_parse_function_args( - NAME px4_generate_messages + NAME px4_add_upload ONE_VALUE OS BOARD OUT BUNDLE REQUIRED OS BOARD OUT BUNDLE ARGN ${ARGN}) diff --git a/cmake/px4_impl_nuttx.cmake b/cmake/px4_impl_nuttx.cmake index d9a450b15f..8f36855bd9 100644 --- a/cmake/px4_impl_nuttx.cmake +++ b/cmake/px4_impl_nuttx.cmake @@ -143,7 +143,7 @@ function(px4_nuttx_generate_builtin_commands) math(EXPR command_count "${command_count}+1") endif() endforeach() - configure_file(${CMAKE_SOURCE_DIR}/cmake/builtin_commands.c.cmake + configure_file(${CMAKE_SOURCE_DIR}/cmake/builtin_commands.c.in ${OUT}) endfunction() diff --git a/cmake/px4_impl_qurt.cmake b/cmake/px4_impl_qurt.cmake index 7748ff2ecf..5337840727 100644 --- a/cmake/px4_impl_qurt.cmake +++ b/cmake/px4_impl_qurt.cmake @@ -104,7 +104,7 @@ function(px4_qurt_generate_builtin_commands) math(EXPR command_count "${command_count}+1") endif() endforeach() - configure_file(${CMAKE_SOURCE_DIR}/cmake/builtin_commands.c.cmake + configure_file(${CMAKE_SOURCE_DIR}/cmake/builtin_commands.c.in ${OUT}) endfunction()