-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Spresense board support #323
Open
Barry-Xu-2018
wants to merge
2
commits into
micro-ROS:foxy
Choose a base branch
from
Barry-Xu-2018:topic-add-spresense-platform-support
base: foxy
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,12 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
set -o nounset | ||
set -o pipefail | ||
|
||
|
||
NUTTX_DIR=$FW_TARGETDIR/spresense/sdk | ||
|
||
pushd $NUTTX_DIR >/dev/null | ||
make | ||
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 @@ | ||
../generic/client-colcon.meta |
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 @@ | ||
../generic/client_uros_packages.repos |
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,40 @@ | ||
#! /bin/bash | ||
# | ||
# | ||
|
||
set -e | ||
set -o nounset | ||
set -o pipefail | ||
|
||
|
||
# spresense uses own sdk to config | ||
NUTTX_DIR=$FW_TARGETDIR/spresense/sdk | ||
MCU_WS_DIR=$FW_TARGETDIR/mcu_ws | ||
|
||
# parse the platform from this script's path name | ||
PLATFORM=$(head -n2 $FW_TARGETDIR/PLATFORM | tail -n1) | ||
|
||
# for the "generic" platform, the user must supply both board and config | ||
# if [ "$PLATFORM" = "generic" ] | ||
# then | ||
# CONFIG=configs/$CONFIG_NAME | ||
# else | ||
# CONFIG="configs/$PLATFORM/$CONFIG_NAME" | ||
# fi | ||
|
||
# if [ ! -d "$NUTTX_DIR/$CONFIG" ] | ||
# then | ||
# echo "Configuration $CONFIG (expanded from $CONFIG_NAME) not found" | ||
# exit 1 | ||
# fi | ||
|
||
# source dev_ws for kconfig | ||
set +o nounset | ||
. $FW_TARGETDIR/dev_ws/install/setup.bash | ||
set -o nounset | ||
|
||
pushd $NUTTX_DIR >/dev/null | ||
make distclean | ||
#tools/configure.sh $CONFIG | ||
tools/config.py $CONFIG_NAME | ||
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 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
set -o nounset | ||
set -o pipefail | ||
|
||
|
||
[ -d $FW_TARGETDIR ] || mkdir $FW_TARGETDIR | ||
pushd $FW_TARGETDIR >/dev/null | ||
|
||
vcs import --input $PREFIX/config/$RTOS/$PLATFORM/uros_packages.repos --recursive | ||
|
||
# copy uros apps from nuttx_apps to spresense/sdk/apps | ||
cp -a apps/uros spresense/sdk/apps | ||
sed -i 's#default "../mcu_ws/"#default "../../../mcu_ws/"#' spresense/sdk/apps/uros/Kconfig | ||
sed -i "/\${NUTTX_TOPDIR}\/include\/uClibc++/a \${NUTTX_TOPDIR}\/..\/sdk\/include" spresense/sdk/apps/uros/arm_toolchain.cmake.in | ||
sed -i "/\${NUTTX_APPDIR}\/configs\/olimex-stm32-e407\/src/d" spresense/sdk/apps/uros/arm_toolchain.cmake.in | ||
sed -i '2 a \ "rcutils": {' spresense/sdk/apps/uros/rmw_config.meta.in | ||
sed -i '3 a \ "cmake-args": [' spresense/sdk/apps/uros/rmw_config.meta.in | ||
sed -i '4 a \ "-DRCUTILS_NO_64_ATOMIC=ON"' spresense/sdk/apps/uros/rmw_config.meta.in | ||
sed -i '5 a \ ]' spresense/sdk/apps/uros/rmw_config.meta.in | ||
sed -i '6 a \ },' spresense/sdk/apps/uros/rmw_config.meta.in | ||
|
||
# install uclibc | ||
if [ ! -d "spresense/nuttx/libs/libxx/uClibc++" ] | ||
then | ||
pushd uclibc >/dev/null | ||
./install.sh ../spresense/nuttx | ||
popd >/dev/null | ||
fi | ||
|
||
# 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/rcl_action/COLCON_IGNORE | ||
|
||
touch mcu_ws/ros2/rcl/COLCON_IGNORE | ||
touch mcu_ws/ros2/rosidl/rosidl_typesupport_introspection_c/COLCON_IGNORE | ||
touch mcu_ws/ros2/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE | ||
touch mcu_ws/ros2/rcpputils/COLCON_IGNORE | ||
touch mcu_ws/uros/rcl/rcl_yaml_param_parser/COLCON_IGNORE | ||
touch mcu_ws/uros/rclc/rclc_examples/COLCON_IGNORE | ||
|
||
rosdep install -y --from-paths mcu_ws -i mcu_ws --rosdistro foxy --skip-keys="$SKIP" | ||
|
||
popd >/dev/null | ||
|
||
cp $PREFIX/config/$RTOS/generic/package.xml $FW_TARGETDIR/apps/package.xml | ||
rosdep install -y --from-paths $FW_TARGETDIR/apps -i $FW_TARGETDIR/apps --rosdistro foxy |
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,22 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
set -o nounset | ||
set -o pipefail | ||
|
||
|
||
pushd $FW_TARGETDIR/spresense/sdk > /dev/null | ||
|
||
if [ "$PLATFORM" = "spresense" ]; then | ||
if [ -f nuttx.spk ]; then | ||
echo "Flashing firmware for $RTOS platform $PLATFORM" | ||
./tools/flash.sh -c $DEVICE_NAME nuttx.spk | ||
else | ||
echo "Nuttx/nuttx.spk not found: please compile before flashing." | ||
fi | ||
else | ||
echo "Unrecognized board: $PLATFORM" | ||
exit 1 | ||
fi | ||
|
||
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,22 @@ | ||
<?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.1</version> | ||
<description>This is a dummy package to supply firmware build dependencies for spresense.</description> | ||
<maintainer email="[email protected]">Ingo Luetkebohle</maintainer> | ||
<maintainer email="[email protected]">Barry Xu</maintainer> | ||
<maintainer email="[email protected]">Tomoya Fujita</maintainer> | ||
<license>APL2</license> | ||
|
||
<build_depend>gcc-arm-none-eabi</build_depend> | ||
<build_depend>clang-tidy</build_depend> | ||
<build_depend>clang-format</build_depend> | ||
<build_depend>gperf</build_depend> | ||
<build_depend>automake</build_depend> | ||
<build_depend>nuttx_kconfig_vendor</build_depend> | ||
<build_depend>git</build_depend> | ||
<build_depend>openocd</build_depend> | ||
<build_depend>ed</build_depend> | ||
|
||
</package> |
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 @@ | ||
spresense |
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,17 @@ | ||
repositories: | ||
spresense: | ||
type: git | ||
url: https://github.com/sonydevworld/spresense.git | ||
version: master | ||
apps: | ||
type: git | ||
url: https://github.com/micro-ROS/nuttx_apps.git | ||
version: foxy | ||
uclibc: | ||
type: git | ||
url: https://github.com/micro-ROS/uclibc.git | ||
version: master | ||
drive_base: | ||
type: git | ||
url: https://github.com/micro-ROS/drive_base.git | ||
version: master |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fujitatomoya
Thanks for your review comments. I have addressed them at 4184ad9.