Skip to content
Snippets Groups Projects
  1. Jan 31, 2018
  2. Jan 05, 2018
  3. Oct 11, 2017
  4. Sep 16, 2017
  5. Jun 19, 2017
  6. Jun 12, 2017
  7. Mar 29, 2017
  8. Dec 21, 2016
  9. Oct 22, 2016
    • Carlo Wood's avatar
      Clean up of app.h · 6fc30c76
      Carlo Wood authored
      app.h, generated from app.h_in, has unnecessary code duplication
      and isn't a header file (it defines globals, static functions
      and doesn't have a header guard, moreover, it has a 'using namespace
      std;'). Because of this, a real headerfile that declares the stuff
      defined in apps.h was missing leading to even more code duplication:
      scattered forward declarations in .cpp files and an often repeated
      type of std::map<std::string, px4_main_t>.
      
      This patch moves cmake/qurt/apps.h_in to src/platforms/apps.cpp.in
      (with some changes) and removes cmake/posix/apps.h_in.
      Then src/platforms/apps.cpp.in is split into src/platforms/apps.cpp.in
      and src/platforms/apps.h.in, splitting declarations from definitions.
      
      A typedef is defined for the map (apps_map_type).
      
      The main difference between cmake/posix/apps.h_in and
      cmake/qurt/apps.h_in was that the first defined a global 'apps',
      while qurt stores the apps in QShell. I opted to get rid of
      the global variable (which are in general evil for various reasons)
      and used the API of cmake/qurt/apps.h_in where a provided 'apps'
      map is initialized with a call to init_app_map. Thus removing
      the existing code duplication.
      6fc30c76
  10. Oct 18, 2016
  11. Sep 26, 2016
    • Carlo Wood's avatar
      Fix some pthread related linker stuff. (#5504) · c6a26415
      Carlo Wood authored
      The px4_os_add_flags defined in cmake/posix/px4_impl_posix.cmake did
      add (threading) libraries to added_exe_linker_flags, which subsequently
      end up in CMAKE_EXE_LINKER_FLAGS and then have no effect because those
      flags are passed to the linker before any of the object files and static
      libraries.
      
      Those libraries are already added correctly in the corresponding
      src/firmware/*/CMakeLists.txt files (for qurt, nuttx AND posix).
      
      I left in the non-library linker flag '-pthread' for the bebop board,
      although it seems very weird to me that this is needed (is it?).
      If that is needed then it seems weird to link manually (that is,
      src/firmware/*/CMakeLists.txt) with -lpthread.
      
      For linux/g++ -pthread is added to the CXXFLAGS as it should be:
      this causes the compiler to define _REENTRANT which is needed
      for (the interface of) certain libraries to become thread-safe.
      Offically one also can just pass -pthread to the linker, which then
      causes the right libraries to be linked, but just linking with
      -lpthread -lm -lrt works too.
      
      I ran into this while adding support for libcwd, which explicitly
      complains that _REENTRANT isn't defined when trying to link with
      the thread-safe version of libcwd (-lcwd_r) and then tells you
      to use -pthread.
      c6a26415
  12. Sep 13, 2016
    • Carlo Wood's avatar
      Target specific optimization control. · 77d356d2
      Carlo Wood authored
      This allows one to set a semi-colon separated list of regular
      expressions in the environment variable PX4_NO_OPTIMIZATION
      to control which (cmake generated) targets should be compiled
      without optimization.
      
      Suppressing optimization can be necessary for debugging in
      a debugger, especially when trying to step through the code
      or needing to print variables that otherwise are optimized out.
      
      EXAMPLE
      
      export PX4_NO_OPTIMIZATION="px4;^modules__uORB;^modules__systemlib$"
      
      will result in the following messages during cmake configuration:
      
      [...]
      -- Disabling optimization for target 'platforms__posix__px4_layer'
      because it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
      -- Disabling optimization for target 'modules__systemlib' because it
      matches the regexp '^modules__systemlib$' in env var PX4_NO_OPTIMIZATION
      -- Disabling optimization for target 'modules__uORB' because it matches
      the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
      -- Disabling optimization for target 'examples__px4_simple_app' because
      it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
      -- Disabling optimization for target 'modules__uORB__uORB_tests' because
      it matches the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
      -- Disabling optimization for target 'px4' because it matches the regexp
      'px4' in env var PX4_NO_OPTIMIZATION
      
      Note that a list of all (currently used) target names can be printed
      with the following command line from within the required build directory:
      
      find . -wholename '*/CMakeFiles/*.dir/flags.make' | xargs dirname | xargs basename -a | sort -u | sed -e 's/.dir$//'
      77d356d2
    • Carlo Wood's avatar
      Bug fixes, typos, indentation. · 03d176d0
      Carlo Wood authored
      Over time I made a few changes unrelated to what I'm really working on.
      These changes are hereby committed first. The bug fixes are related to
      what I'm doing in that I need them to be fixed for future commits.
      
      Tools/sitl_run.sh: rename label to rcS_dir and fix usage help.
      cmake/common/px4_base.cmake: Remove the check on OUT_UNPARSED_ARGUMENTS,
        and a few typos and indentation issues.
      cmake/configs/posix_sitl_replay.cmake: Set the correct variable
        (config_sitl_rcS_dir) to the correct directory.
      cmake/nuttx/px4_impl_nuttx.cmake: typos and indentation issues,
        and removal of a redundant FORCE (INTERNAL implies FORCE).
      cmake/posix/px4_impl_posix.cmake: typos and indentation issues.
      cmake/qurt/px4_impl_qurt.cmake: typos and indentation issues.
      src/modules/mavlink/mavlink_ftp.cpp : possible strict-aliasing breakage.
      
      NOTES
      
      The second argument passed to sitl_run.sh is the value of
      config_sitl_rcS_dir. This fact is missing from the usage help.
      I renamed 'label' to 'rcS_dir' to better reflect this.
      Also, for the 'replay' config the wrong variable was set causing
      the call to sitl_run.sh to skip an argument and fail (ie the
      debugger was passed as rcS_dir and so on).
      
      The check on OUT_UNPARSED_ARGUMENTS in px4_parse_function_args
      basically causes every passed IN variable to be REQUIRED and is
      therefore a bug. The test for the presence of the REQUIRED arguments
      follows directly after and is sufficient for this job. This bug went
      unnoticed because currently every argument to OPTIONS, ONE_VALUE,
      and MULTI_VALUE is actually passed to the function(s) calling
      px4_parse_function_args (them being REQUIRED or not).
      
      The changes in mavlink_ftp.cpp are to avoid a possible aliasing bug
      and (mostly) to avoid the compiler warning/error: dereferencing type-
      punned pointer will break strict-aliasing rules [-Werror=strict-aliasing].
      03d176d0
  13. Aug 18, 2016
    • James Goppert's avatar
      Path cleanup, low impact changes (#5340) · 818840b5
      James Goppert authored
      * Low impact changes from path_cleanup branch.
      
      This is a step towards minimizing the diff with path_cleanup branch.
      
      * Update ecl.
      
      * Revert matrix update.
      
      * Revert ecl and matrix.
      
      * Update sitl gazebo.
      
      * Revert sitl_gazebo and matrix changes.
      818840b5
  14. Aug 05, 2016
  15. May 03, 2016
  16. Apr 14, 2016
  17. Feb 19, 2016
  18. Jan 10, 2016
  19. Nov 19, 2015
  20. Nov 18, 2015
  21. Oct 27, 2015
  22. Oct 20, 2015
  23. Oct 10, 2015
  24. Sep 28, 2015
    • Mark Charlebois's avatar
      qurt: Must use latest version of Eigen · c5e66e41
      Mark Charlebois authored
      
      The latest version of Eigen is required to build with the Hexagon
      7.4 toolchain. Only certain C++11 features are supported and the
      latest version if Eigen provides these tests. A patch is required
      to add support for the Hexagon compiler.
      
      These changes force the sync and then update of eigen and allow it
      to be patched for qurt.
      
      The eigen-3.2 submodule was removed as it is no longer needed by the
      qurt build with the updated toolchain.
      
      Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
      c5e66e41
  25. Sep 25, 2015
  26. Sep 10, 2015
  27. Sep 09, 2015
  28. Sep 08, 2015
Loading