From a0f3b64f2c82c387610bb52462822d86a12a9f7c Mon Sep 17 00:00:00 2001 From: Thanassis Tsiodras Date: Mon, 27 Jul 2020 12:13:18 +0200 Subject: [PATCH 1/2] Drop unused symbols during linking. --- .../c_pohi_rtems_with_ada_cgpr/partition.tmplt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/concurrency_view/c_pohi_rtems_with_ada_cgpr/partition.tmplt b/templates/concurrency_view/c_pohi_rtems_with_ada_cgpr/partition.tmplt index 53733c9c..4c138d83 100644 --- a/templates/concurrency_view/c_pohi_rtems_with_ada_cgpr/partition.tmplt +++ b/templates/concurrency_view/c_pohi_rtems_with_ada_cgpr/partition.tmplt @@ -49,6 +49,8 @@ configuration project RTEMS_WITH_ADA is Common_C_Switches := ("--pipe", + "-fdata-sections", + "-ffunction-sections", @@IF@@ @_CPU_Family_@ /= gr740 "-mcpu=cypress", "-DLEON3", @@ -107,6 +109,7 @@ configuration project RTEMS_WITH_ADA is Common_C_Linker_Switches := ("--pipe", "-g", + "-Wl,--gc-sections", @@IF@@ @_CPU_Family_@ = gr740 "-B/opt/rtems-5.1-2019.07.25/sparc-rtems5/gr740/lib", @@ELSIF@@ @_CPU_Family_@ = gr712rc -- GitLab From 18bc583319cf85db60450b4c3edaf7b2ceef3e33 Mon Sep 17 00:00:00 2001 From: Maxime Perrotin Date: Mon, 27 Jul 2020 13:05:40 +0100 Subject: [PATCH 2/2] Raise an error when wrong unit is used --- src/taste-aadl_parser.adb | 11 ++++++----- test/TrafficLight_stm32f407/Makefile | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/taste-aadl_parser.adb b/src/taste-aadl_parser.adb index c1fec87d..2cf88f20 100644 --- a/src/taste-aadl_parser.adb +++ b/src/taste-aadl_parser.adb @@ -1134,11 +1134,12 @@ package body TASTE.AADL_Parser is and then (Unit_Str /= "kbyte" and Unit_Str /= "bytes")) or else (Prop_Name = "Dispatch_Offset" and then Unit_Str /= "ms") then - Put_Error ("Unsupported unit '" - & To_String (Unit_Str) - & "' used in ConcurrencyView_Properties.aadl. " - & " Stack_Size shall be in " - & "'bytes' or 'kbyte' and Dispatch_Offset in 'ms'"); + raise AADL_Parser_Error + with "Unsupported unit '" + & To_String (Unit_Str) + & "' used in ConcurrencyView_Properties.aadl. " + & " Stack_Size shall be in " + & "'bytes' or 'kbyte' and Dispatch_Offset in 'ms'"; return; end if; diff --git a/test/TrafficLight_stm32f407/Makefile b/test/TrafficLight_stm32f407/Makefile index 3a66634a..8b4160b1 100644 --- a/test/TrafficLight_stm32f407/Makefile +++ b/test/TrafficLight_stm32f407/Makefile @@ -9,7 +9,7 @@ skeletons: InterfaceView.aadl DataView.aadl $(KAZOO) --gw -o work $(MAKE) -C work dataview -work/glue_built: InterfaceView.aadl DeploymentView.aadl DataView.aadl +work/glue_built: InterfaceView.aadl DeploymentView.aadl DataView.aadl ConcurrencyView_Properties.aadl $(KAZOO) --glue --gw -o work touch work/glue_built -- GitLab