Skip to content
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

Update library_generation.sh #1858

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions extras/library_generation/library_generation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ $OPTIND -eq 1 ]; then
PLATFORMS+=("cortex_m0")
PLATFORMS+=("cortex_m3")
PLATFORMS+=("cortex_m4")
# PLATFORMS+=("portenta-m4")
PLATFORMS+=("portenta-m4")
PLATFORMS+=("portenta-m7")
PLATFORMS+=("kakutef7-m7")
PLATFORMS+=("esp32")
Expand Down Expand Up @@ -175,18 +175,18 @@ if [[ " ${PLATFORMS[@]} " =~ " teensy4 " ]]; then
fi

######## Build for Arduino Portenta M4 core ########
# if [[ " ${PLATFORMS[@]} " =~ " portenta-m4 " ]]; then
# rm -rf firmware/build
if [[ " ${PLATFORMS[@]} " =~ " portenta-m4 " ]]; then
rm -rf firmware/build

# export TOOLCHAIN_PREFIX=/uros_ws/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-
# ros2 run micro_ros_setup build_firmware.sh /project/extras/library_generation/portenta-m4_toolchain.cmake /project/extras/library_generation/colcon.meta
export TOOLCHAIN_PREFIX=/uros_ws/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-
ros2 run micro_ros_setup build_firmware.sh /project/extras/library_generation/portenta-m4_toolchain.cmake /project/extras/library_generation/colcon.meta

# find firmware/build/include/ -name "*.c" -delete
# cp -R firmware/build/include/* /project/src/
find firmware/build/include/ -name "*.c" -delete
cp -R firmware/build/include/* /project/src/

# mkdir -p /project/src/cortex-m4/fpv4-sp-d16-softfp
# cp -R firmware/build/libmicroros.a /project/src/cortex-m4/fpv4-sp-d16-softfp/libmicroros.a
# fi
mkdir -p /project/src/cortex-m4/fpv4-sp-d16-softfp
cp -R firmware/build/libmicroros.a /project/src/cortex-m4/fpv4-sp-d16-softfp/libmicroros.a
fi

######## Build for Arduino Portenta M7 core ########
if [[ " ${PLATFORMS[@]} " =~ " portenta-m7 " ]]; then
Expand Down Expand Up @@ -268,4 +268,4 @@ for f in $(find $(pwd) -name .git -type d); do pushd $f > /dev/null; echo $(git
sort -o /project/built_packages /project/built_packages

######## Fix permissions ########
sudo chmod -R 777 .
sudo chmod -R 777 .