-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joel Cao <joel.cao@oppo.com> Co-authored-by: Joel Cao <joel.cao@oppo.com>
- Loading branch information
Showing
9 changed files
with
206 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
keep: | ||
ament/ament_cmake | ||
ament/ament_index | ||
ament/ament_lint | ||
ament/ament_package | ||
ament/googletest | ||
ament/osrf_pycommon | ||
ament/uncrustify_vendor | ||
ros2/ament_cmake_ros |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
repositories: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
. $PREFIX/config/utils.sh | ||
|
||
if [ $# -ge 1 ]; then | ||
TOOLCHAIN=$1 | ||
else | ||
echo "Syntax: ros2 run micro_ros_setup build_firmware.sh <CMake toolchain file> [Colcon meta file]" | ||
exit 1 | ||
fi | ||
|
||
if [ $# -ge 2 ]; then | ||
COLCON_META=$2 | ||
echo "Using provided meta: $COLCON_META" | ||
|
||
else | ||
COLCON_META=$FW_TARGETDIR/mcu_ws/colcon.meta | ||
echo "Using default meta: $COLCON_META" | ||
fi | ||
|
||
|
||
BUILD_DIR=$FW_TARGETDIR/build | ||
|
||
pushd $FW_TARGETDIR/mcu_ws >/dev/null | ||
|
||
# Set these variables according to your own environment. | ||
if [ -z ${ANDROID_ABI+x} ]; then | ||
ANDROID_ABI=arm64-v8a | ||
fi | ||
if [ -z ${ANDROID_NATIVE_API_LEVEL+x} ]; then | ||
ANDROID_NATIVE_API_LEVEL=android-30 | ||
fi | ||
if [ -z ${ANDROID_NDK+x} ]; then | ||
ANDROID_NDK=~/android-ndk-r23 | ||
fi | ||
|
||
# rm -rf build install log | ||
|
||
colcon build --packages-up-to micro_ros_demos_rclc \ | ||
--merge-install \ | ||
--packages-ignore-regex=.*_cpp \ | ||
--metas $COLCON_META \ | ||
--cmake-args \ | ||
"--no-warn-unused-cli" \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \ | ||
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \ | ||
-DANDROID_FUNCTION_LEVEL_LINKING=OFF \ | ||
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \ | ||
-DANDROID_STL=c++_shared \ | ||
-DANDROID_ABI=${ANDROID_ABI} \ | ||
-DANDROID_NDK=${ANDROID_NDK} \ | ||
-DANDROID=ON \ | ||
-DTHIRDPARTY=ON \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_MEMORY_TOOLS=OFF \ | ||
-DBUILD_MEMORY_TESTS=OFF \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | ||
|
||
popd >/dev/null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"names":{ | ||
"microxrcedds_client":{ | ||
"cmake-args":[ | ||
"-DBUILD_SHARED_LIBS=ON", | ||
"-DUCLIENT_PROFILE_MULTITHREAD=ON" | ||
] | ||
}, | ||
"microcdr":{ | ||
"cmake-args":[ | ||
"-DBUILD_SHARED_LIBS=ON" | ||
] | ||
}, | ||
"rosidl_typesupport_microxrcedds_c":{ | ||
"cmake-args":[ | ||
"-DBUILD_SHARED_LIBS=ON" | ||
] | ||
}, | ||
"rosidl_typesupport_microxrcedds_cpp":{ | ||
"cmake-args":[ | ||
"-DBUILD_SHARED_LIBS=ON" | ||
] | ||
}, | ||
"rclc_parameter":{ | ||
"cmake-args":[ | ||
"-DBUILD_SHARED_LIBS=ON" | ||
] | ||
}, | ||
"rcutils":{ | ||
"cmake-args":[ | ||
"-DENABLE_TESTING=OFF" | ||
] | ||
}, | ||
"rmw_microxrcedds":{ | ||
"cmake-args":[ | ||
"-DRMW_UXRCE_TRANSPORT=udp", | ||
"-DRMW_UXRCE_DEFAULT_UDP_IP=127.0.0.1", | ||
"-DRMW_UXRCE_DEFAULT_UDP_PORT=8888", | ||
"-DRMW_UXRCE_MAX_NODES=15", | ||
"-DRMW_UXRCE_MAX_PUBLISHERS=15", | ||
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=15", | ||
"-DRMW_UXRCE_MAX_SERVICES=15", | ||
"-DRMW_UXRCE_MAX_CLIENTS=15", | ||
"-DRMW_UXRCE_STREAM_HISTORY=32", | ||
"-DRMW_UXRCE_MAX_HISTORY=10" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
repositories: | ||
eProsima/Micro-CDR: | ||
type: git | ||
url: https://github.com/eProsima/Micro-CDR.git | ||
version: foxy | ||
eProsima/Micro-XRCE-DDS-Client: | ||
type: git | ||
url: https://github.com/eProsima/Micro-XRCE-DDS-Client.git | ||
version: foxy | ||
|
||
# MicroROS | ||
uros/rcl: | ||
type: git | ||
url: https://github.com/micro-ROS/rcl | ||
version: galactic | ||
uros/rclc: | ||
type: git | ||
url: https://github.com/ros2/rclc | ||
version: galactic | ||
uros/micro_ros_utilities: | ||
type: git | ||
url: https://github.com/micro-ROS/micro_ros_utilities | ||
version: main | ||
version: galactic | ||
uros/rcutils: | ||
type: git | ||
url: https://github.com/micro-ROS/rcutils | ||
version: galactic | ||
uros/micro_ros_msgs: | ||
type: git | ||
url: https://github.com/micro-ROS/micro_ros_msgs.git | ||
version: galactic | ||
uros/rmw_microxrcedds: | ||
type: git | ||
url: https://github.com/micro-ROS/rmw-microxrcedds.git | ||
version: galactic | ||
uros/rosidl_typesupport: | ||
type: git | ||
url: https://github.com/micro-ROS/rosidl_typesupport.git | ||
version: galactic | ||
uros/rosidl_typesupport_microxrcedds: | ||
type: git | ||
url: https://github.com/micro-ROS/rosidl_typesupport_microxrcedds.git | ||
version: galactic | ||
uros/tracetools: | ||
type: git | ||
url: https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git/ | ||
version: galactic | ||
uros/micro-ROS-demos: | ||
type: git | ||
url: https://github.com/micro-ROS/micro-ROS-demos.git | ||
version: galactic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pushd $FW_TARGETDIR >/dev/null | ||
|
||
# ignore broken packages | ||
touch mcu_ws/ros2/rcl_logging/rcl_logging_log4cxx/COLCON_IGNORE | ||
touch mcu_ws/ros2/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE | ||
touch mcu_ws/ros2/rcl/COLCON_IGNORE | ||
touch mcu_ws/ros2/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE | ||
touch mcu_ws/uros/rcl/rcl_yaml_param_parser/COLCON_IGNORE | ||
touch mcu_ws/uros/rclc/rclc_examples/COLCON_IGNORE | ||
|
||
popd >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo "No flash step" | ||
echo "Please find library and includes inside firmware/build folder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="2"> | ||
<name>firmware</name> | ||
<version>0.0.0</version> | ||
<description>Micro-ROS dependecies for Android</description> | ||
<maintainer email="joel.cao@oppo.com">Joel Cao</maintainer> | ||
<license>APL2</license> | ||
|
||
<build_depend>gperf</build_depend> | ||
<build_depend>wget</build_depend> | ||
</package> |