Commits (2)
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
CWD=$(pwd) CWD=$(pwd)
[ -z "$ADA_PROJECT_PATH" ] && \
export ADA_PROJECT_PATH=$HOME/GitHub/Certyflie/Ada_Drivers_Library/boards
if [ -t 0 ] ; then if [ -t 0 ] ; then
COLORON="\e[1m\e[32m" COLORON="\e[1m\e[32m"
COLOROFF="\e[0m" COLOROFF="\e[0m"
...@@ -31,6 +28,8 @@ then ...@@ -31,6 +28,8 @@ then
source user_init_pre.sh source user_init_pre.sh
fi fi
# Use PolyORB-HI-C runtime
USE_POHIC=1
# Detect models from Ellidiss tools v2, and convert them to 1.3 # Detect models from Ellidiss tools v2, and convert them to 1.3
INTERFACEVIEW=InterfaceView.aadl INTERFACEVIEW=InterfaceView.aadl
...@@ -71,6 +70,12 @@ then ...@@ -71,6 +70,12 @@ then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro " ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro "
fi 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" ] if [ ! -z "$USE_POHIC" ]
then then
OUTPUTDIR=binary.c OUTPUTDIR=binary.c
...@@ -82,14 +87,9 @@ else ...@@ -82,14 +87,9 @@ else
OUTPUTDIR=binary OUTPUTDIR=binary
fi 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 \ cd "$CWD" && assert-builder-ocarina.py \
--fast \ --fast \
--debug \
--aadlv2 \ --aadlv2 \
--keep-case \ --keep-case \
--interfaceView "$INTERFACEVIEW" \ --interfaceView "$INTERFACEVIEW" \
...@@ -97,10 +97,11 @@ cd "$CWD" && assert-builder-ocarina.py \ ...@@ -97,10 +97,11 @@ cd "$CWD" && assert-builder-ocarina.py \
-o "$OUTPUTDIR" \ -o "$OUTPUTDIR" \
--subAda function1:"$SKELS"/function1.zip \ --subAda function1:"$SKELS"/function1.zip \
--subAda function2:"$SKELS"/function2.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 @@ ...@@ -4,37 +4,48 @@
pragma style_checks (off); pragma style_checks (off);
pragma warnings (off); pragma warnings (off);
with adaasn1rtl; with adaasn1rtl;
use adaasn1rtl; use adaasn1rtl;
with TASTE_Dataview; with TASTE_Dataview;
use TASTE_Dataview; use TASTE_Dataview;
with STM32.Board; with STM32.Board,
use STM32.Board; STM32.GPIO,
with STM32.GPIO; STM32.Device,
use STM32.GPIO; Crazyflie_System;
with STM32.Device;
use STM32.Device; use STM32.Board,
STM32.GPIO,
STM32.Device,
Crazyflie_System;
package body function2 is package body function2 is
Init_Done : Boolean := False;
--------------------------------------------------------- ---------------------------------------------------------
-- Provided interface "Blink" -- Provided interface "Blink"
--------------------------------------------------------- ---------------------------------------------------------
procedure Blink(EnableDisable: access asn1sccMyBool) is procedure Blink(EnableDisable: access asn1sccMyBool) is
pragma suppress (all_checks); pragma suppress (all_checks);
My_Led : User_LED renames PD5;
begin begin
if boolean(EnableDisable.all) then if not Init_Done then
All_LEDs_On; return;
else end if;
All_LEDs_Off; if boolean(EnableDisable.all) then
All_LEDs_On;
end if; else
All_LEDs_Off;
end if;
end Blink; end Blink;
begin begin
STM32.Board.Initialize_LEDs; System_Init;
if not System_Self_Test then
All_LEDs_On;
else
Init_Done := True;
end if;
end function2; 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 "