-
Notifications
You must be signed in to change notification settings - Fork 144
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
base: foxy
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../generic/client-colcon.meta |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../generic/client_uros_packages.repos |
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 use own sdk to config | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit:
Suggested change
|
||||||
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 |
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 |
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 |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,20 @@ | ||||||||
<?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="ingo.luetkebohle@de.bosch.com">Ingo Luetkebohle</maintainer> | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your review comments. I have addressed them at 4184ad9. |
||||||||
<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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
spresense |
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 |
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.
Nit: