Skip to content
Snippets Groups Projects
Commit 8369e332 authored by Mark Charlebois's avatar Mark Charlebois
Browse files

cmake: Fixes for qurt and nuttx


Added px4_parameters.c to nuttx executable src list.
Minor syntax fix in Tools/px_generate_params.py for semicolon.
Added handling of PX4_MAIN which was not yet supoprted in the
cmake build.
Fixed include quotes in muorb_test_example.cpp

Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
parent 1bba87c2
No related branches found
No related tags found
No related merge requests found
......@@ -82,12 +82,12 @@ src += """
};
#ifdef __PX4_DARWIN
#define ___param__attributes ;
#define ___param__attributes
#else
#define ___param__attributes __attribute__((alias("px4_parameters_impl")));
#define ___param__attributes __attribute__((alias("px4_parameters_impl")))
#endif
extern const struct px4_parameters_t px4_parameters ___param__attributes
extern const struct px4_parameters_t px4_parameters ___param__attributes;
""" % i
fp_header.write(header)
......
......@@ -273,6 +273,9 @@ function(px4_add_module)
endif()
endforeach()
foreach (prop STACK MAIN COMPILE_FLAGS LINK_FLAGS PRIORITY)
if ("${prop}" STREQUAL "MAIN")
add_definitions(-DPX4_MAIN=${${prop}}_app_main)
endif()
if (${prop})
set_target_properties(${MODULE} PROPERTIES "${prop}" "${${prop}}")
endif()
......
......@@ -24,10 +24,4 @@ set(config_module_list
platforms/posix/work_queue
platforms/qurt/tests/hello
)
set(${out_module_list} ${config_module_list} PARENT_SCOPE)
# output
set(${OUT_MODULES} ${config_module_list} PARENT_SCOPE)
endfunction()
......@@ -14,7 +14,7 @@ set(config_module_list
# Library modules
#
modules/systemlib
modules/mixer
modules/systemlib/mixer
modules/uORB
#
......@@ -31,8 +31,8 @@ set(config_module_list
platforms/qurt/px4_layer
platforms/posix/work_queue
platforms/qurt/tests/hello
platforms/qurt/tests/vcdev_test
platforms/qurt/tests/hrt_test
platforms/qurt/tests/wqueue
platforms/posix/tests/vcdev_test
platforms/posix/tests/hrt_test
platforms/posix/tests/wqueue
)
include(qurt/px4_impl_qurt)
# Run a full link with build stubs to make sure qurt target isn't broken
set(QURT_ENABLE_STUBS 1)
set(QURT_ENABLE_STUBS "1")
set(CMAKE_TOOLCHAIN_FILE cmake/toolchains/Toolchain-hexagon.cmake)
......
......@@ -11,7 +11,7 @@ px4_nuttx_generate_romfs(OUT romfs.o
px4_generate_parameters()
# add executable
add_executable(firmware_nuttx builtin_commands.c romfs.o)
add_executable(firmware_nuttx builtin_commands.c ${CMAKE_BINARY_DIR}/px4_parameters.c romfs.o)
set(nuttx_export_dir ${CMAKE_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
set(main_link_flags
"-T${nuttx_export_dir}/build/ld.script"
......
......@@ -20,10 +20,12 @@ px4_generate_parameters()
if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
add_executable(mainapp
${CMAKE_SOURCE_DIR}/src/platforms/qurt/dspal/dspal_stub.c
${CMAKE_BINARY_DIR}/px4_parameters.c
${CMAKE_BINARY_DIR}/apps.h)
else("${QURT_ENABLE_STUBS}" STREQUAL "1")
add_library(mainapp
${CMAKE_SOURCE_DIR}/src/platforms/qurt/dspal/dspal_stub.c
${CMAKE_BINARY_DIR}/px4_parameters.c
${CMAKE_BINARY_DIR}/apps.h)
endif()
......
......@@ -45,7 +45,7 @@
#include <string.h>
#include "uORB/topics/sensor_combined.h"
#include "uORB/topics/pwm_input.h"
#include "uORB.h"
#include "modules/uORB/uORB.h"
#include "px4_middleware.h"
#include "px4_defines.h"
#include <stdlib.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment