Commits (2)
......@@ -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"
......@@ -4,37 +4,48 @@
pragma style_checks (off);
pragma warnings (off);
with adaasn1rtl;
use adaasn1rtl;
use adaasn1rtl;
with TASTE_Dataview;
use TASTE_Dataview;
with STM32.Board;
use STM32.Board;
with STM32.GPIO;
use STM32.GPIO;
with STM32.Device;
use STM32.Device;
with STM32.Board,
STM32.GPIO,
STM32.Device,
Crazyflie_System;
use STM32.Board,
STM32.GPIO,
STM32.Device,
Crazyflie_System;
package body function2 is
Init_Done : Boolean := False;
---------------------------------------------------------
-- Provided interface "Blink"
---------------------------------------------------------
procedure Blink(EnableDisable: access asn1sccMyBool) is
pragma suppress (all_checks);
My_Led : User_LED renames PD5;
begin
if boolean(EnableDisable.all) then
All_LEDs_On;
else
All_LEDs_Off;
end if;
if not Init_Done then
return;
end if;
if boolean(EnableDisable.all) then
All_LEDs_On;
else
All_LEDs_Off;
end if;
end Blink;
begin
STM32.Board.Initialize_LEDs;
begin
System_Init;
if not System_Self_Test then
All_LEDs_On;
else
Init_Done := True;
end if;
end function2;
#!/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
#!/bin/bash -e
[ -z "$ADA_PROJECT_PATH" ] && \
export ADA_PROJECT_PATH=$HOME/GitHub/Certyflie/Ada_Drivers_Library/boards
ORCHESTRATOR_OPTIONS+="\
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/types \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/modules \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/utils \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/lib \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/hal \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/drivers \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/modules/mahony \
--with-extra-Ada-code cortex_m_partition:$HOME/GitHub/Certyflie/config "