Commit c38276af authored by Maxime Perrotin's avatar Maxime Perrotin

Update Demo_Crazyflie

Use pre/post/last user scripts to avoid modifying autogeneated buildscript
parent 63daa2da
......@@ -13,9 +13,6 @@
CWD=$(pwd)
[ -z "$ADA_PROJECT_PATH" ] && \
export ADA_PROJECT_PATH=$HOME/GitHub/Certyflie/Ada_Drivers_Library/boards
if [ -t 0 ] ; then
COLORON="\e[1m\e[32m"
COLOROFF="\e[0m"
......@@ -31,6 +28,8 @@ then
source user_init_pre.sh
fi
# Use PolyORB-HI-C runtime
USE_POHIC=1
# Detect models from Ellidiss tools v2, and convert them to 1.3
INTERFACEVIEW=InterfaceView.aadl
......@@ -71,6 +70,12 @@ then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro "
fi
if [ -f user_init_post.sh ]
then
echo -e "${INFO} Executing user-defined post-init script"
source user_init_post.sh
fi
if [ ! -z "$USE_POHIC" ]
then
OUTPUTDIR=binary.c
......@@ -82,14 +87,9 @@ else
OUTPUTDIR=binary
fi
if [ -f user_init_post.sh ]
then
echo -e "${INFO} Executing user-defined init script"
source user_init_post.sh
fi
cd "$CWD" && assert-builder-ocarina.py \
--fast \
--debug \
--aadlv2 \
--keep-case \
--interfaceView "$INTERFACEVIEW" \
......@@ -97,10 +97,11 @@ cd "$CWD" && assert-builder-ocarina.py \
-o "$OUTPUTDIR" \
--subAda function1:"$SKELS"/function1.zip \
--subAda function2:"$SKELS"/function2.zip \
$ORCHESTRATOR_OPTIONS || exit 1
$ORCHESTRATOR_OPTIONS
arm-eabi-objcopy -O binary binary/binaries/cortex_m_partition binary/binaries/cortex_m_partition.flash_image
if [ -f user_init_last.sh ]
then
echo -e "${INFO} Executing user-defined post-build script"
source user_init_last.sh
fi
echo -e "\nNow burn the new image with:\n"
echo " sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 \\"
echo " -D binary/binaries/cortex_m_partition.flash_image"
#!/bin/bash -e
arm-eabi-objcopy -O binary binary/binaries/cortex_m_partition binary/binaries/cortex_m_partition.flash_image
echo -e "\nNow burn the new image with:\n"
echo " sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 \\"
echo " -D binary/binaries/cortex_m_partition.flash_image"
#!/bin/bash -e
unset USE_POHIC
......@@ -4,8 +4,6 @@
[ -z "$ADA_PROJECT_PATH" ] && \
export ADA_PROJECT_PATH=$HOME/GitHub/Certyflie/Ada_Drivers_Library/boards
unset USE_POHIC
ORCHESTRATOR_OPTIONS+="\
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/types \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/modules \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment