Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
8d07c647
Commit
8d07c647
authored
7 years ago
by
Daniel Agar
Committed by
David Sidrane
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
NuttX improve apps builtins dependencies
parent
ed9e798f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+0
-11
0 additions, 11 deletions
Makefile
platforms/nuttx/NuttX/CMakeLists.txt
+14
-10
14 additions, 10 deletions
platforms/nuttx/NuttX/CMakeLists.txt
src/firmware/nuttx/CMakeLists.txt
+1
-1
1 addition, 1 deletion
src/firmware/nuttx/CMakeLists.txt
with
15 additions
and
22 deletions
Makefile
+
0
−
11
View file @
8d07c647
...
...
@@ -107,17 +107,6 @@ else
BUILD_DIR_SUFFIX
:=
endif
# NuttX verbose output
ifdef
VN
export
PX4_NUTTX_BUILD_VERBOSE
=
1
export
V
=
1
endif
# NuttX verbose patches output
ifdef
VNP
export
PX4_NUTTX_PATCHES_VERBOSE
=
1
endif
# additional config parameters passed to cmake
CMAKE_ARGS
:=
-Wno-deprecated
...
...
This diff is collapsed.
Click to expand it.
platforms/nuttx/NuttX/CMakeLists.txt
+
14
−
10
View file @
8d07c647
...
...
@@ -53,7 +53,7 @@ add_custom_command(OUTPUT apps_copy.stamp
DEPENDS
${
copy_apps_files
}
COMMENT
"Copying NuttX/apps to
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
set
(
APPS_DIR
${
CMAKE_CURRENT
_BINARY_DIR
}
/apps
)
set
(
APPS_DIR
${
PX4
_BINARY_DIR
}
/
NuttX/
apps
)
# copy PX4 board config into nuttx
file
(
GLOB_RECURSE board_config_files
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
)
...
...
@@ -74,7 +74,8 @@ add_custom_command(OUTPUT
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
/
${
nuttx_config_type
}
/defconfig
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
/
${
nuttx_config_type
}
/Make.defs
${
board_config_files
}
nuttx_copy.stamp apps_copy.stamp
nuttx_copy.stamp
apps_copy.stamp
WORKING_DIRECTORY
${
NUTTX_DIR
}
/tools
COMMENT
"Copying NuttX config
${
BOARD
}
and configuring"
)
...
...
@@ -109,12 +110,11 @@ add_custom_target(nuttx_context DEPENDS ${NUTTX_DIR}/include/nuttx/version.h)
# library of NuttX libraries
add_library
(
nuttx_build INTERFACE
)
add_dependencies
(
nuttx_build nuttx_context
)
# builtins
set
(
nuttx_builtin_list
)
if
(
"
${
BOARD
}
"
MATCHES
"px4io"
)
# no apps for px4io
else
()
add_custom_target
(
nuttx_builtins
)
if
(
CONFIG_NSH_LIBRARY
)
# add additional commands to nuttx builtins
set
(
builtin_registry
${
APPS_DIR
}
/builtin/registry
)
foreach
(
module
${
module_libraries
}
)
...
...
@@ -125,26 +125,30 @@ else()
if
(
MAIN
)
add_custom_command
(
OUTPUT
${
builtin_registry
}
/
${
MAIN
}
_main.bdat
COMMAND echo
"{
\"
${
MAIN
}
\"
,
${
PRIORITY
}
,
${
STACK_MAIN
}
,
${
MAIN
}
_main },"
>
${
builtin_registry
}
/
${
MAIN
}
_main.bdat
DEPENDS nuttx_context
VERBATIM
)
list
(
APPEND nuttx_builtin_list
${
builtin_registry
}
/
${
MAIN
}
_main.bdat
)
add_custom_command
(
OUTPUT
${
builtin_registry
}
/
${
MAIN
}
_main.pdat
COMMAND echo
"int
${
MAIN
}
_main(int argc, char *argv[]);"
>
${
builtin_registry
}
/
${
MAIN
}
_main.pdat
DEPENDS nuttx_context
VERBATIM
)
list
(
APPEND nuttx_builtin_list
${
builtin_registry
}
/
${
MAIN
}
_main.pdat
)
add_custom_target
(
nuttx_builtins_
${
MAIN
}
DEPENDS
${
builtin_registry
}
/
${
MAIN
}
_main.bdat
${
builtin_registry
}
/
${
MAIN
}
_main.pdat
)
add_dependencies
(
nuttx_builtins nuttx_builtins_
${
MAIN
}
)
endif
()
endforeach
()
endif
()
add_dependencies
(
nuttx_build nuttx_builtins
)
# APPS
# libapps.a
add_custom_command
(
OUTPUT
${
APPS_DIR
}
/libapps.a
${
APPS_DIR
}
/platform/.built
COMMAND find
${
APPS_DIR
}
-name \*.o
-o -name \*.built
-delete
COMMAND find
${
APPS_DIR
}
-name \*.o -delete
COMMAND make
${
nuttx_build_options
}
--no-print-directory -C ../apps TOPDIR=
"
${
NUTTX_DIR
}
"
libapps.a
${
nuttx_build_output
}
DEPENDS nuttx_context
${
nuttx_builtin
_list
}
DEPENDS nuttx_context nuttx_builtin
s
WORKING_DIRECTORY
${
NUTTX_DIR
}
${
nuttx_build_uses_terminal
}
)
...
...
This diff is collapsed.
Click to expand it.
src/firmware/nuttx/CMakeLists.txt
+
1
−
1
View file @
8d07c647
...
...
@@ -3,7 +3,7 @@ include(common/px4_upload)
# add executable
set
(
fw_name
${
CONFIG
}
.elf
)
add_executable
(
${
fw_name
}
${
PX4_SOURCE_DIR
}
/src/platforms/empty.c
)
add_dependencies
(
${
fw_name
}
git_nuttx
)
add_dependencies
(
${
fw_name
}
git_nuttx
nuttx_build
)
get_property
(
module_libraries GLOBAL PROPERTY PX4_LIBRARIES
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment