--  This project file was generated by the Ada_Drivers_Library project wizard script
library project MicroBit_ZFP is

  type Build_Type is ("Debug", "Production");
   Build : Build_Type := external ("ADL_BUILD", "Debug");

   type Build_Checks_Type is ("Disabled", "Enabled");
   Build_Checks : Build_Checks_Type := external ("ADL_BUILD_CHECKS", "Disabled");

   --  Target architecture
   Target := Project'Target;

   --  Callgraph info is not available on all architectures
   Callgraph_Switch := ();
   case Target is
      when "riscv32-unknown-elf" => null;
      when others => Callgraph_Switch := ("-fcallgraph-info=su");
   end case;

   Build_Checks_Switches := ();
   case Build_Checks is
      when "Disabled" => null;
      when others =>
         Build_Checks_Switches :=
           ("-gnaty", "-gnatyM120", "-gnatyO", --  Style checks
            "-gnatwe"); --  Warnings as errors
   end case;

   package Compiler is
      case Build is
         when "Production" =>
            for Default_Switches ("Ada") use
              ("-O3",     -- Optimization
               "-gnatp",  -- Supress checks
               "-gnatn"); -- Enable inlining
         when "Debug" =>
            for Default_Switches ("Ada") use
              ("-O0",    -- No optimization
               "-gnata") -- Enable assertions
              & Callgraph_Switch;
      end case;

      for Default_Switches ("ada") use Compiler'Default_Switches ("Ada") &
        Callgraph_Switch &
        Build_Checks_Switches &
        ("-g",       -- Debug info
         "-gnatwa",  -- All warnings
         "-gnatw_A", -- Turn off warnings for anonymous allocators
         "-gnatQ",   -- Don't quit. Generate ALI and tree files even if illegalities
         "-gnatw.X", -- Disable warnings for No_Exception_Propagation
         "-ffunction-sections", -- Create a linker section for each function
         "-fdata-sections");  -- Create a linker section for each data
   end Compiler;


   for Languages use ("Ada", "Asm_CPP");
   for Create_Missing_Dirs use "True";
   for Object_Dir use "obj/zfp_" & Build;
   for Library_Dir use "obj/zfp_lib_" & Build;
   for Library_Kind use "static";
   for Library_Name use "ada_drivers_library";

   Linker_Switches := ("-T", Project'Project_dir & "/src/zfp/link.ld");
   for Target use "arm-eabi";
   for Runtime ("Ada") use "zfp-cortex-m4f";

   package Device_Configuration is
      for CPU_Name use "ARM Cortex-M4F";
      for Number_Of_Interrupts use "128";
      for Interrupt ("0") use "adl_irq";
      for Interrupt ("1") use "adl_irq";
      for Interrupt ("2") use "adl_irq";
      for Interrupt ("3") use "adl_irq";
      for Interrupt ("4") use "adl_irq";
      for Interrupt ("5") use "adl_irq";
      for Interrupt ("6") use "adl_irq";
      for Interrupt ("7") use "adl_irq";
      for Interrupt ("8") use "adl_irq";
      for Interrupt ("9") use "adl_irq";
      for Interrupt ("10") use "adl_irq";
      for Interrupt ("11") use "adl_irq";
      for Interrupt ("12") use "adl_irq";
      for Interrupt ("13") use "adl_irq";
      for Interrupt ("14") use "adl_irq";
      for Interrupt ("15") use "adl_irq";
      for Interrupt ("16") use "adl_irq";
      for Interrupt ("17") use "adl_irq";
      for Interrupt ("18") use "adl_irq";
      for Interrupt ("19") use "adl_irq";
      for Interrupt ("20") use "adl_irq";
      for Interrupt ("21") use "adl_irq";
      for Interrupt ("22") use "adl_irq";
      for Interrupt ("23") use "adl_irq";
      for Interrupt ("24") use "adl_irq";
      for Interrupt ("25") use "adl_irq";
      for Interrupt ("26") use "adl_irq";
      for Interrupt ("27") use "adl_irq";
      for Interrupt ("28") use "adl_irq";
      for Interrupt ("29") use "adl_irq";
      for Interrupt ("30") use "adl_irq";
      for Interrupt ("31") use "adl_irq";
      for Interrupt ("32") use "adl_irq";
      for Interrupt ("33") use "adl_irq";
      for Interrupt ("34") use "adl_irq";
      for Interrupt ("35") use "adl_irq";
      for Interrupt ("36") use "adl_irq";
      for Interrupt ("37") use "adl_irq";
      for Interrupt ("38") use "adl_irq";
      for Interrupt ("39") use "adl_irq";
      for Interrupt ("40") use "adl_irq";
      for Interrupt ("41") use "adl_irq";
      for Interrupt ("42") use "adl_irq";
      for Interrupt ("43") use "adl_irq";
      for Interrupt ("44") use "adl_irq";
      for Interrupt ("45") use "adl_irq";
      for Interrupt ("46") use "adl_irq";
      for Interrupt ("47") use "adl_irq";
      for Interrupt ("48") use "adl_irq";
      for Interrupt ("49") use "adl_irq";
      for Interrupt ("50") use "adl_irq";
      for Interrupt ("51") use "adl_irq";
      for Interrupt ("52") use "adl_irq";
      for Interrupt ("53") use "adl_irq";
      for Interrupt ("54") use "adl_irq";
      for Interrupt ("55") use "adl_irq";
      for Interrupt ("56") use "adl_irq";
      for Interrupt ("57") use "adl_irq";
      for Interrupt ("58") use "adl_irq";
      for Interrupt ("59") use "adl_irq";
      for Interrupt ("60") use "adl_irq";
      for Interrupt ("61") use "adl_irq";
      for Interrupt ("62") use "adl_irq";
      for Interrupt ("63") use "adl_irq";
      for Interrupt ("64") use "adl_irq";
      for Interrupt ("65") use "adl_irq";
      for Interrupt ("66") use "adl_irq";
      for Interrupt ("67") use "adl_irq";
      for Interrupt ("68") use "adl_irq";
      for Interrupt ("69") use "adl_irq";
      for Interrupt ("70") use "adl_irq";
      for Interrupt ("71") use "adl_irq";
      for Interrupt ("72") use "adl_irq";
      for Interrupt ("73") use "adl_irq";
      for Interrupt ("74") use "adl_irq";
      for Interrupt ("75") use "adl_irq";
      for Interrupt ("76") use "adl_irq";
      for Interrupt ("77") use "adl_irq";
      for Interrupt ("78") use "adl_irq";
      for Interrupt ("79") use "adl_irq";
      for Interrupt ("80") use "adl_irq";
      for Interrupt ("81") use "adl_irq";
      for Interrupt ("82") use "adl_irq";
      for Interrupt ("83") use "adl_irq";
      for Interrupt ("84") use "adl_irq";
      for Interrupt ("85") use "adl_irq";
      for Interrupt ("86") use "adl_irq";
      for Interrupt ("87") use "adl_irq";
      for Interrupt ("88") use "adl_irq";
      for Interrupt ("89") use "adl_irq";
      for Interrupt ("90") use "adl_irq";
      for Interrupt ("91") use "adl_irq";
      for Interrupt ("92") use "adl_irq";
      for Interrupt ("93") use "adl_irq";
      for Interrupt ("94") use "adl_irq";
      for Interrupt ("95") use "adl_irq";
      for Interrupt ("96") use "adl_irq";
      for Interrupt ("97") use "adl_irq";
      for Interrupt ("98") use "adl_irq";
      for Interrupt ("99") use "adl_irq";
      for Interrupt ("100") use "adl_irq";
      for Interrupt ("101") use "adl_irq";
      for Interrupt ("102") use "adl_irq";
      for Interrupt ("103") use "adl_irq";
      for Interrupt ("104") use "adl_irq";
      for Interrupt ("105") use "adl_irq";
      for Interrupt ("106") use "adl_irq";
      for Interrupt ("107") use "adl_irq";
      for Interrupt ("108") use "adl_irq";
      for Interrupt ("109") use "adl_irq";
      for Interrupt ("110") use "adl_irq";
      for Interrupt ("111") use "adl_irq";
      for Interrupt ("112") use "adl_irq";
      for Interrupt ("113") use "adl_irq";
      for Interrupt ("114") use "adl_irq";
      for Interrupt ("115") use "adl_irq";
      for Interrupt ("116") use "adl_irq";
      for Interrupt ("117") use "adl_irq";
      for Interrupt ("118") use "adl_irq";
      for Interrupt ("119") use "adl_irq";
      for Interrupt ("120") use "adl_irq";
      for Interrupt ("121") use "adl_irq";
      for Interrupt ("122") use "adl_irq";
      for Interrupt ("123") use "adl_irq";
      for Interrupt ("124") use "adl_irq";
      for Interrupt ("125") use "adl_irq";
      for Interrupt ("126") use "adl_irq";
      for Interrupt ("127") use "adl_irq";

      for Memories use ("flash", "ram");

      for Mem_Kind ("flash") use "rom";
      for Address  ("flash") use "0x00000000";
      for Size     ("flash") use "512K";

      for Mem_Kind ("ram") use "ram";
      for Address  ("ram") use "0x20000000";
      for Size     ("ram") use "64K";

      for Boot_Memory use "flash";
   end Device_Configuration;

   Vendor                         := "Nordic";            -- From board definition
   Max_Mount_Points               := "2";                 -- From default value
   Boot_Memory                    := "flash";             -- From default value
   Max_Mount_Name_Length          := "128";               -- From default value
   Runtime_Profile                := "zfp";               -- From command line
   Device_Name                    := "nRF52832xxAA";      -- From board definition
   Device_Family                  := "nRF52";             -- From board definition
   Has_Ravenscar_SFP_Runtime      := "False";             -- From board definition
   Runtime_Name                   := "zfp-cortex-m4f";    -- From default value
   Has_Ravenscar_Full_Runtime     := "False";             -- From board definition
   CPU_Core                       := "ARM Cortex-M4F";    -- From mcu definition
   Board                          := "NRF52_DK";          -- From command line
   Has_ZFP_Runtime                := "True";              -- From board definition
   Number_Of_Interrupts           := "128";               -- From MCU definition
   Has_Custom_Memory_Area_1       := "False";             -- From default value
   Use_Startup_Gen                := "True";              -- From command line
   Max_Path_Length                := "1024";              -- From default value
   Runtime_Name_Suffix            := "cortex-m4f";        -- From board definition
   Architecture                   := "ARM";               -- From board definition

   --  Project source directories
   Src_Dirs_Root := "../..";
   for Source_Dirs use (
    Src_Dirs_Root & "/hal/src/", -- From HAL config
    Src_Dirs_Root & "/boards/microbit/src/", -- From board definition
    Src_Dirs_Root & "/arch/ARM/cortex_m/src", -- From arch definition
    Src_Dirs_Root & "/arch/ARM/cortex_m/src/cm4f", -- From arch definition
    Src_Dirs_Root & "/arch/ARM/cortex_m/src/fpu", -- From arch definition
    Src_Dirs_Root & "/arch/ARM/cortex_m/src/nocache", -- From arch definition
    Src_Dirs_Root & "/arch/ARM/cortex_m/src/nvic_cm4_cm7", -- From arch definition
    Src_Dirs_Root & "/arch/ARM/Nordic/devices/nrf52", -- From MCU definition
    Src_Dirs_Root & "/arch/ARM/Nordic/drivers/nrf_common", -- From MCU definition
    Src_Dirs_Root & "/arch/ARM/Nordic/drivers/nrf52", -- From MCU definition
    Src_Dirs_Root & "/arch/ARM/Nordic/svd/nrf52/", -- From MCU definition
    Src_Dirs_Root & "/middleware/src/filesystem", -- From middleware config
    Src_Dirs_Root & "/middleware/src/BLE", -- From middleware config
    Src_Dirs_Root & "/middleware/src/utils", -- From middleware config
    Src_Dirs_Root & "/middleware/src/audio", -- From middleware config
    Src_Dirs_Root & "/middleware/src/monitor", -- From middleware config
    Src_Dirs_Root & "/middleware/src/bitmap", -- From middleware config
    Src_Dirs_Root & "/middleware/src/command_line", -- From middleware config
    Src_Dirs_Root & "/middleware/src/sdmmc", -- From middleware config
    Src_Dirs_Root & "/middleware/src/neopixel", -- From middleware config
    Src_Dirs_Root & "/components/src/**", -- From components config
     "src/zfp/");
end MicroBit_ZFP;
