Fix the examples.

This commit is contained in:
Jerome Lambourg 2017-04-19 09:59:20 +02:00 committed by Fabien Chouteau
parent 1ee78d543f
commit a63e6fc852
27 changed files with 65 additions and 69 deletions

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery_full.gpr";
project Demo_L3GD20_Dataready_Int extends "../../../../../examples/shared/common/common.gpr" is
@ -7,7 +7,7 @@ project Demo_L3GD20_Dataready_Int extends "../../../../../examples/shared/common
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery_Full'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery_full.gpr";
project Demo_L3GD20_FIFO_Int extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_L3GD20_FIFO_Int extends "../../../../../examples/shared/common/comm
for Main use ("demo_l3gd20.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery_Full'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery_full.gpr";
project Demo_L3GD20 extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_L3GD20 extends "../../../../../examples/shared/common/common.gpr" i
for Source_Dirs use ("src"); for Target use "arm-eabi";
for Main use ("demo_l3gd20.adb");
for Languages use ("Ada");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery_Full'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_LIS3DSH_PWM extends "../../../../../examples/shared/common/common.gpr" is
@ -6,10 +6,10 @@ project Demo_LIS3DSH_PWM extends "../../../../../examples/shared/common/common.g
for Languages use ("Ada");
for Main use ("demo_lis3dsh_pwm.adb");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_LIS3DSH_Tilt extends "../../../../../examples/shared/common/common.gpr" is
@ -6,10 +6,10 @@ project Demo_LIS3DSH_Tilt extends "../../../../../examples/shared/common/common.
for Languages use ("Ada");
for Main use ("demo_lis3dsh_tilt.adb");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_ADC_DMA extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_ADC_DMA extends "../../../../../examples/shared/common/common.gpr"
for Main use ("demo_adc_vbat_dma");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_ADC_Interrupts extends "../../../../../examples/shared/common/common.gpr" is
@ -7,7 +7,7 @@ project Demo_ADC_Interrupts extends "../../../../../examples/shared/common/commo
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_ADC_Polling extends "../../../../../examples/shared/common/common.gpr" is
@ -10,7 +10,7 @@ project Demo_ADC_Polling extends "../../../../../examples/shared/common/common.g
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_ADC_Timer_DMA extends "../../../../../examples/shared/common/common.gpr" is
@ -7,7 +7,7 @@ project Demo_ADC_Timer_DMA extends "../../../../../examples/shared/common/common
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_ADC_Timer_Triggered extends "../../../../../examples/shared/common/common.gpr" is
@ -7,7 +7,7 @@ project Demo_ADC_Timer_Triggered extends "../../../../../examples/shared/common/
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,3 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_CRC extends "../../../../../examples/shared/common/common.gpr" is
@ -16,4 +15,3 @@ project Demo_CRC extends "../../../../../examples/shared/common/common.gpr" is
for Main use ("demo_crc.adb");
end Demo_CRC;

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_DAC_Basic extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_DAC_Basic extends "../../../../../examples/shared/common/common.gpr
for Main use ("demo_dac_basic.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_DAC_DMA extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_DAC_DMA extends "../../../../../examples/shared/common/common.gpr"
for Main use ("demo_dac_dma");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_DMA_Mem_to_Mem extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_DMA_Mem_to_Mem extends "../../../../../examples/shared/common/commo
for Main use ("demo_dma_interrupts.adb", "demo_dma_polling.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_USART_DMA_Continuous extends "../../../../../examples/shared/common/common.gpr" is
@ -6,10 +6,10 @@ project Demo_USART_DMA_Continuous extends "../../../../../examples/shared/common
for Main use ("demo_usart_dma_continuous.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_IWDG extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_IWDG extends "../../../../../examples/shared/common/common.gpr" is
for Main use ("demo_iwdg.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
project Demo_RNG extends "../../../../../examples/shared/common/common.gpr" is
@ -6,10 +6,10 @@ project Demo_RNG extends "../../../../../examples/shared/common/common.gpr" is
for Main use ("demo_rng.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project demo_basic_timer_interrupts extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project demo_basic_timer_interrupts extends "../../../../../examples/shared/comm
for Languages use ("Ada");
for Main use ("demo.adb");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -4,7 +4,7 @@
-- fewer LEDs, change the number of interrupts generated to match only the
-- number of LEDs available.
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project demo_timer_interrupts_multichannel extends "../../../../../examples/shared/common/common.gpr" is
@ -12,7 +12,7 @@ project demo_timer_interrupts_multichannel extends "../../../../../examples/shar
for Languages use ("Ada");
for Main use ("demo.adb");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_Timer_PWM extends "../../../../../examples/shared/common/common.gpr" is
@ -6,7 +6,7 @@ project Demo_Timer_PWM extends "../../../../../examples/shared/common/common.gpr
for Languages use ("Ada");
for Main use ("demo_pwm_adt", "demo_timer_pwm");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_Timer_Quad_Encoder extends "../../../../../examples/shared/common/common.gpr" is
@ -6,10 +6,10 @@ project Demo_Timer_Quad_Encoder extends "../../../../../examples/shared/common/c
for Languages use ("Ada");
for Main use ("demo_encoder.adb");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_USART_Interrupts extends "../../../../../examples/shared/common/common.gpr" is
@ -6,12 +6,12 @@ project Demo_USART_Interrupts extends "../../../../../examples/shared/common/com
for Main use ("demo_usart_interrupts.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;
end Demo_USART_Interrupts;

View File

@ -1,4 +1,4 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/config.gpr";
with "../../../../../boards/stm32f407_discovery.gpr";
project Demo_USART_Polling extends "../../../../../examples/shared/common/common.gpr" is
@ -6,10 +6,10 @@ project Demo_USART_Polling extends "../../../../../examples/shared/common/common
for Main use ("demo_usart_polling.adb");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Object_Dir use "obj/" & Config.Build;
for Runtime ("Ada") use STM32F407_Discovery'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;

View File

@ -1,5 +1,4 @@
with "../../../../../boards/stm32f429_discovery.gpr";
with "../../../../../boards/common_config.gpr";
project Demo_WWDG extends "../../../../../examples/shared/common/common.gpr" is
@ -16,4 +15,3 @@ project Demo_WWDG extends "../../../../../examples/shared/common/common.gpr" is
for Main use ("demo_wwdg.adb");
end Demo_WWDG;

View File

@ -75,16 +75,16 @@ package body STM32.Eth is
-- Select RMII (before enabling the clocks)
STM32_SVD.SYSCFG.SYSCFG_Periph.PMC.MII_RMII_SEL := True;
Configure_Alternate_Function (PA1, GPIO_AF_11_ETH); -- RMII_REF_CLK
Configure_Alternate_Function (PA2, GPIO_AF_11_ETH); -- RMII_MDIO
Configure_Alternate_Function (PA7, GPIO_AF_11_ETH); -- RMII_CRS_DV
Configure_Alternate_Function (PC1, GPIO_AF_11_ETH); -- RMII_MDC
Configure_Alternate_Function (PC4, GPIO_AF_11_ETH); -- RMII_RXD0
Configure_Alternate_Function (PC5, GPIO_AF_11_ETH); -- RMII_RXD1
Configure_Alternate_Function (PG2, GPIO_AF_11_ETH); -- RMII_RXER
Configure_Alternate_Function (PG11, GPIO_AF_11_ETH); -- RMII_TX_EN
Configure_Alternate_Function (PG13, GPIO_AF_11_ETH); -- RMII_TXD0
Configure_Alternate_Function (PG14, GPIO_AF_11_ETH); -- RMII_TXD1
Configure_Alternate_Function (PA1, GPIO_AF_ETH_11); -- RMII_REF_CLK
Configure_Alternate_Function (PA2, GPIO_AF_ETH_11); -- RMII_MDIO
Configure_Alternate_Function (PA7, GPIO_AF_ETH_11); -- RMII_CRS_DV
Configure_Alternate_Function (PC1, GPIO_AF_ETH_11); -- RMII_MDC
Configure_Alternate_Function (PC4, GPIO_AF_ETH_11); -- RMII_RXD0
Configure_Alternate_Function (PC5, GPIO_AF_ETH_11); -- RMII_RXD1
Configure_Alternate_Function (PG2, GPIO_AF_ETH_11); -- RMII_RXER
Configure_Alternate_Function (PG11, GPIO_AF_ETH_11); -- RMII_TX_EN
Configure_Alternate_Function (PG13, GPIO_AF_ETH_11); -- RMII_TXD0
Configure_Alternate_Function (PG14, GPIO_AF_ETH_11); -- RMII_TXD1
Configure_IO (PA1, (Mode_AF, Push_Pull, Speed_100MHz, Floating));
Configure_IO (PA2, (Mode_AF, Push_Pull, Speed_100MHz, Floating));
Configure_IO (PA7, (Mode_AF, Push_Pull, Speed_100MHz, Floating));
@ -117,7 +117,7 @@ package body STM32.Eth is
-- Read_MMI --
--------------
procedure Read_MMI (Reg : UInt5; Val : out Unsigned_16)
procedure Read_MMI (Reg : UInt5; Val : out UInt16)
is
use Ada.Real_Time;
Pa : constant UInt5 := 0;

View File

@ -35,7 +35,7 @@ package STM32.Eth is
procedure Initialize_RMII;
-- Initialize the driver using RMII configuration.
procedure Read_MMI (Reg : UInt5; Val : out Unsigned_16);
procedure Read_MMI (Reg : UInt5; Val : out UInt16);
-- Read an MMI register.
procedure Init_Mac;

View File

@ -1,5 +1,5 @@
with "../../boards/microbit.gpr";
with "../../boards/MicroBit/config";
with "../../boards/config";
project MicroBit_Example is