Skip to content

Commit 41460c8

Browse files
committed
Fix pycodestyle errors
1 parent 2557213 commit 41460c8

9 files changed

Lines changed: 257 additions & 227 deletions

File tree

boards/board_projects_generator.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44

55

66
BOARDS = {
7-
'Crazyflie': { 'rts_profiles': ['light-tasking', 'embedded']},
8-
'HiFive1': { 'rts_profiles': ['light']},
9-
'HiFive1_rev_B': { 'rts_profiles': ['light']},
10-
'Unleashed': { 'rts_profiles': ['light', 'light-tasking', 'embedded']},
11-
'MicroBit': { 'rts_profiles': ['light']},
12-
'NRF52_DK': { 'rts_profiles': ['light']},
13-
'Native': { 'rts_profiles': ['none']},
14-
'OpenMV2': { 'rts_profiles': ['light-tasking', 'embedded']},
15-
'STM32F407_Discovery': { 'rts_profiles': ['light-tasking', 'embedded']},
16-
'STM32F429_Discovery': { 'rts_profiles': ['light-tasking', 'embedded']},
17-
'STM32F469_Discovery': { 'rts_profiles': ['light-tasking', 'embedded']},
18-
'STM32F746_Discovery': { 'rts_profiles': ['light-tasking', 'embedded']},
19-
'STM32F769_Discovery': { 'rts_profiles': ['light-tasking', 'embedded']},
20-
'NUCLEO_F446ZE': { 'rts_profiles': ['light-tasking', 'embedded']},
21-
'Feather_STM32F405': { 'rts_profiles': ['light-tasking', 'embedded']},
22-
'STM32_H405': { 'rts_profiles': ['light-tasking', 'embedded']},
7+
'Crazyflie': {'rts_profiles': ['light-tasking', 'embedded']},
8+
'HiFive1': {'rts_profiles': ['light']},
9+
'HiFive1_rev_B': {'rts_profiles': ['light']},
10+
'Unleashed': {'rts_profiles': ['light',
11+
'light-tasking', 'embedded']},
12+
'MicroBit': {'rts_profiles': ['light']},
13+
'NRF52_DK': {'rts_profiles': ['light']},
14+
'Native': {'rts_profiles': ['none']},
15+
'OpenMV2': {'rts_profiles': ['light-tasking', 'embedded']},
16+
'STM32F407_Discovery': {'rts_profiles': ['light-tasking', 'embedded']},
17+
'STM32F429_Discovery': {'rts_profiles': ['light-tasking', 'embedded']},
18+
'STM32F469_Discovery': {'rts_profiles': ['light-tasking', 'embedded']},
19+
'STM32F746_Discovery': {'rts_profiles': ['light-tasking', 'embedded']},
20+
'STM32F769_Discovery': {'rts_profiles': ['light-tasking', 'embedded']},
21+
'NUCLEO_F446ZE': {'rts_profiles': ['light-tasking', 'embedded']},
22+
'Feather_STM32F405': {'rts_profiles': ['light-tasking', 'embedded']},
23+
'STM32_H405': {'rts_profiles': ['light-tasking', 'embedded']},
2324
}
2425

2526

@@ -28,7 +29,7 @@
2829
'HiFive1_rev_B': 'HiFive1_rev_B',
2930
'Unleashed': 'Unleashed',
3031
'MicroBit': 'MicroBit',
31-
'NRF52_DK': 'NRF52_DK',
32+
'NRF52_DK': 'NRF52_DK',
3233
'Native': 'native',
3334
'OpenMV2': 'OpenMV2',
3435
'STM32F407_Discovery': 'stm32f407_discovery',
@@ -42,6 +43,7 @@
4243

4344
USE_STARTUP_GEN = ['HiFive1', 'HiFive1_rev_B', 'MicroBit', 'NRF52_DK']
4445

46+
4547
def gen_project(board_name, rts):
4648
assert board_name is not None, "board is undefined"
4749
assert board_name in BOARDS, "%s is undefined" % board_name
@@ -75,7 +77,8 @@ def gen_project(board_name, rts):
7577
"-o", object_dir_name,
7678
"Board=%s" % board_name,
7779
"Runtime_Profile=%s" % rts,
78-
"Use_Startup_Gen=" + ("True" if board_name in USE_STARTUP_GEN else "False")]
80+
"Use_Startup_Gen=" + (
81+
"True" if board_name in USE_STARTUP_GEN else "False")]
7982
check_call(args)
8083

8184

scripts/build_all_examples.py

Lines changed: 126 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -45,140 +45,143 @@ def gprbuild(project_file, debug=False):
4545

4646
return returncode
4747

48+
4849
STM_DRIVERS = "/arch/ARM/STM32/driver_demos/"
4950

5051
# List of project to compile
5152
projects = [
52-
# STM32F429 Discovery
53-
"/boards/stm32f429_discovery/stm32f429_discovery_full.gpr",
54-
"/boards/stm32f429_discovery/stm32f429_discovery_sfp.gpr",
55-
"/examples/STM32F429_Discovery/draw_stm32f429disco.gpr",
56-
"/examples/STM32F429_Discovery/blinky_f429disco.gpr",
57-
"/examples/STM32F429_Discovery/dma2d_stm32f429disco.gpr",
58-
"/examples/STM32F429_Discovery/serial_ports_f429disco.gpr",
59-
60-
61-
# STM32F4 DISCO
62-
"/boards/stm32f407_discovery/stm32f407_discovery_full.gpr",
63-
"/boards/stm32f407_discovery/stm32f407_discovery_sfp.gpr",
64-
"/examples/STM32F4_DISCO/accelerometer/accelerometer.gpr",
65-
"/examples/STM32F4_DISCO/simple_audio/simple_audio.gpr",
66-
"/examples/STM32F4_DISCO/filesystem/filesystem.gpr",
67-
"/examples/STM32F4_DISCO/blinky_f4disco.gpr",
68-
"/examples/STM32F4_DISCO/serial_ports_f4disco.gpr",
69-
70-
# STM32 F4VE
71-
"/boards/stm32_f4ve/stm32_f4ve_full.gpr",
72-
"/boards/stm32_f4ve/stm32_f4ve_sfp.gpr",
73-
"/examples/stm32_f4ve/blinky_stm32_f4ve.gpr",
74-
"/examples/stm32_f4ve/draw/draw.gpr",
75-
"/examples/stm32_f4ve/lcd/lcd.gpr",
76-
"/examples/stm32_f4ve/lcd_spi/lcd_spi.gpr",
77-
78-
# STM32F4XX M
79-
"/boards/stm32f4xx_m/stm32f4xx_m_full.gpr",
80-
"/boards/stm32f4xx_m/stm32f4xx_m_sfp.gpr",
81-
"/examples/stm32f4xx_m/blinky/blinky.gpr",
82-
"/examples/stm32f4xx_m/flash/flash.gpr",
83-
"/examples/stm32f4xx_m/sdcard_fs/sdcard_fs.gpr",
84-
"/examples/stm32f4xx_m/sdcard_raw_io/sdcard_raw_io.gpr",
85-
86-
# Feather STM32F405
87-
"/examples/feather_stm32f405/blinky/blinky.gpr",
88-
"/examples/feather_stm32f405/charlie_wing/charlie_wing.gpr",
89-
90-
# Olimex STM32-H405
91-
"/examples/stm32_h405/blinky/blinky.gpr",
92-
"/examples/stm32_h405/lcd_test/lcd_test.gpr",
93-
94-
# STM32F469 Discovery
95-
"/boards/stm32f469_discovery/stm32f469_discovery_full.gpr",
96-
"/boards/stm32f469_discovery/stm32f469_discovery_sfp.gpr",
97-
"/examples/STM32F469_Discovery/dma2d_stm32f469disco.gpr",
98-
"/examples/STM32F469_Discovery/draw_stm32f469disco.gpr",
99-
"/examples/STM32F469_Discovery/hello_world_tasking_f469disco.gpr",
100-
101-
102-
# STM32F746 Discovery
103-
"/boards/stm32f746_discovery/stm32f746_discovery_full.gpr",
104-
"/boards/stm32f746_discovery/stm32f746_discovery_sfp.gpr",
105-
"/examples/STM32F746_Discovery/dma2d_stm32f746disco.gpr",
106-
"/examples/STM32F746_Discovery/draw_stm32f746disco.gpr",
107-
"/examples/STM32F746_Discovery/blinky_f7disco.gpr",
108-
109-
# STM32F769 Discovery
110-
"/boards/stm32f769_discovery/stm32f769_discovery_full.gpr",
111-
"/boards/stm32f769_discovery/stm32f769_discovery_sfp.gpr",
112-
"/examples/STM32F769_Discovery/dma2d_stm32f769disco.gpr",
113-
"/examples/STM32F769_Discovery/draw_stm32f769disco.gpr",
114-
115-
# NUCLEO-F446ZE
116-
"/boards/nucleo_f446ze/nucleo_f446ze_full.gpr",
117-
"/boards/nucleo_f446ze/nucleo_f446ze_sfp.gpr",
118-
"/examples/nucleo_f446ze/blinky_f446ze.gpr",
119-
120-
# OpenMV2
121-
"/boards/OpenMV2/openmv2_full.gpr",
122-
"/boards/OpenMV2/openmv2_sfp.gpr",
123-
"/examples/OpenMV2/openmv2_example.gpr",
124-
"/examples/OpenMV2/openmv2_example.gpr",
125-
"/examples/OpenMV2/openmv2_example.gpr",
126-
127-
# MicroBit
128-
"/boards/MicroBit/microbit_zfp.gpr",
129-
"/examples/MicroBit/text_scrolling/text_scrolling.gpr",
130-
"/examples/MicroBit/buttons/buttons.gpr",
131-
"/examples/MicroBit/digital_in/digital_in.gpr",
132-
"/examples/MicroBit/music/music.gpr",
133-
"/examples/MicroBit/analog_in/analog_in.gpr",
134-
"/examples/MicroBit/analog_out/analog_out.gpr",
135-
"/examples/MicroBit/digital_out/digital_out.gpr",
136-
"/examples/MicroBit/BLE_beacon/BLE_beacon.gpr",
137-
"/examples/MicroBit/servos/servos.gpr",
138-
"/examples/MicroBit/neopixel/neopixel.gpr",
139-
"/examples/MicroBit/follower/follower.gpr",
140-
"/examples/MicroBit/accelerometer/accelerometer.gpr",
141-
142-
# NRF52_SDK
143-
"/boards/NRF52_DK/nrf52_dk_zfp.gpr",
144-
"/examples/NRF52_DK/buttons/buttons.gpr",
145-
"/examples/NRF52_DK/BLE_beacon/BLE_beacon.gpr",
146-
"/examples/NRF52_DK/digital_out/digital_out.gpr",
147-
148-
# STM32 driver examples
149-
STM_DRIVERS + "/demo_adc_dma/demo_adc_dma.gpr",
150-
STM_DRIVERS + "/demo_adc_interrupts/demo_adc_interrupts.gpr",
151-
STM_DRIVERS + "/demo_adc_polling/demo_adc_polling.gpr",
152-
STM_DRIVERS + "/demo_adc_timer_dma/demo_adc_timer_dma.gpr",
153-
STM_DRIVERS + "/demo_adc_timer_triggered/demo_adc_timer_triggered.gpr",
154-
STM_DRIVERS + "/demo_crc/demo_crc.gpr",
155-
STM_DRIVERS + "/demo_dac_basic/demo_dac_basic.gpr",
156-
STM_DRIVERS + "/demo_dac_dma/demo_dac_dma.gpr",
157-
STM_DRIVERS + "/demo_dma_mem_to_mem/demo_dma_mem_to_mem.gpr",
158-
STM_DRIVERS + "/demo_dma_mem_to_peripheral/demo_usart_dma_continuous.gpr",
159-
STM_DRIVERS + "/demo_gpio_direct_leds/demo_gpio.gpr",
160-
STM_DRIVERS + "/demo_independent_watchdog/demo_iwdg.gpr",
161-
STM_DRIVERS + "/demo_L3GD20_dataready_int/demo_l3gd20_dataready_int.gpr",
162-
STM_DRIVERS + "/demo_L3GD20_fifo_int/demo_l3gd20_fifo_int.gpr",
163-
STM_DRIVERS + "/demo_L3GD20_polling/demo_l3gd20.gpr",
164-
STM_DRIVERS + "/demo_LIS3DSH_pwm/demo_lis3dsh_pwm.gpr",
165-
STM_DRIVERS + "/demo_LIS3DSH_tilt/demo_lis3dsh_tilt.gpr",
166-
STM_DRIVERS + "/demo_rng/demo_rng.gpr",
167-
STM_DRIVERS + "/demo_timer_interrupts_basic/demo_basic_timer_interrupts.gpr",
168-
STM_DRIVERS + "/demo_timer_interrupts_multichannel/demo_timer_interrupts_multichannel.gpr",
169-
STM_DRIVERS + "/demo_timer_pwm/demo_timer_pwm.gpr",
170-
STM_DRIVERS + "/demo_timer_quad_encoder/demo_timer_quad_encoder.gpr",
171-
STM_DRIVERS + "/demo_usart_interrupts/demo_usart_interrupts.gpr",
172-
STM_DRIVERS + "/demo_usart_polling/demo_usart_polling.gpr",
173-
]
53+
# STM32F429 Discovery
54+
"/boards/stm32f429_discovery/stm32f429_discovery_full.gpr",
55+
"/boards/stm32f429_discovery/stm32f429_discovery_sfp.gpr",
56+
"/examples/STM32F429_Discovery/draw_stm32f429disco.gpr",
57+
"/examples/STM32F429_Discovery/blinky_f429disco.gpr",
58+
"/examples/STM32F429_Discovery/dma2d_stm32f429disco.gpr",
59+
"/examples/STM32F429_Discovery/serial_ports_f429disco.gpr",
60+
61+
62+
# STM32F4 DISCO
63+
"/boards/stm32f407_discovery/stm32f407_discovery_full.gpr",
64+
"/boards/stm32f407_discovery/stm32f407_discovery_sfp.gpr",
65+
"/examples/STM32F4_DISCO/accelerometer/accelerometer.gpr",
66+
"/examples/STM32F4_DISCO/simple_audio/simple_audio.gpr",
67+
"/examples/STM32F4_DISCO/filesystem/filesystem.gpr",
68+
"/examples/STM32F4_DISCO/blinky_f4disco.gpr",
69+
"/examples/STM32F4_DISCO/serial_ports_f4disco.gpr",
70+
71+
# STM32 F4VE
72+
"/boards/stm32_f4ve/stm32_f4ve_full.gpr",
73+
"/boards/stm32_f4ve/stm32_f4ve_sfp.gpr",
74+
"/examples/stm32_f4ve/blinky_stm32_f4ve.gpr",
75+
"/examples/stm32_f4ve/draw/draw.gpr",
76+
"/examples/stm32_f4ve/lcd/lcd.gpr",
77+
"/examples/stm32_f4ve/lcd_spi/lcd_spi.gpr",
78+
79+
# STM32F4XX M
80+
"/boards/stm32f4xx_m/stm32f4xx_m_full.gpr",
81+
"/boards/stm32f4xx_m/stm32f4xx_m_sfp.gpr",
82+
"/examples/stm32f4xx_m/blinky/blinky.gpr",
83+
"/examples/stm32f4xx_m/flash/flash.gpr",
84+
"/examples/stm32f4xx_m/sdcard_fs/sdcard_fs.gpr",
85+
"/examples/stm32f4xx_m/sdcard_raw_io/sdcard_raw_io.gpr",
86+
87+
# Feather STM32F405
88+
"/examples/feather_stm32f405/blinky/blinky.gpr",
89+
"/examples/feather_stm32f405/charlie_wing/charlie_wing.gpr",
90+
91+
# Olimex STM32-H405
92+
"/examples/stm32_h405/blinky/blinky.gpr",
93+
"/examples/stm32_h405/lcd_test/lcd_test.gpr",
94+
95+
# STM32F469 Discovery
96+
"/boards/stm32f469_discovery/stm32f469_discovery_full.gpr",
97+
"/boards/stm32f469_discovery/stm32f469_discovery_sfp.gpr",
98+
"/examples/STM32F469_Discovery/dma2d_stm32f469disco.gpr",
99+
"/examples/STM32F469_Discovery/draw_stm32f469disco.gpr",
100+
"/examples/STM32F469_Discovery/hello_world_tasking_f469disco.gpr",
101+
102+
103+
# STM32F746 Discovery
104+
"/boards/stm32f746_discovery/stm32f746_discovery_full.gpr",
105+
"/boards/stm32f746_discovery/stm32f746_discovery_sfp.gpr",
106+
"/examples/STM32F746_Discovery/dma2d_stm32f746disco.gpr",
107+
"/examples/STM32F746_Discovery/draw_stm32f746disco.gpr",
108+
"/examples/STM32F746_Discovery/blinky_f7disco.gpr",
109+
110+
# STM32F769 Discovery
111+
"/boards/stm32f769_discovery/stm32f769_discovery_full.gpr",
112+
"/boards/stm32f769_discovery/stm32f769_discovery_sfp.gpr",
113+
"/examples/STM32F769_Discovery/dma2d_stm32f769disco.gpr",
114+
"/examples/STM32F769_Discovery/draw_stm32f769disco.gpr",
115+
116+
# NUCLEO-F446ZE
117+
"/boards/nucleo_f446ze/nucleo_f446ze_full.gpr",
118+
"/boards/nucleo_f446ze/nucleo_f446ze_sfp.gpr",
119+
"/examples/nucleo_f446ze/blinky_f446ze.gpr",
120+
121+
# OpenMV2
122+
"/boards/OpenMV2/openmv2_full.gpr",
123+
"/boards/OpenMV2/openmv2_sfp.gpr",
124+
"/examples/OpenMV2/openmv2_example.gpr",
125+
"/examples/OpenMV2/openmv2_example.gpr",
126+
"/examples/OpenMV2/openmv2_example.gpr",
127+
128+
# MicroBit
129+
"/boards/MicroBit/microbit_zfp.gpr",
130+
"/examples/MicroBit/text_scrolling/text_scrolling.gpr",
131+
"/examples/MicroBit/buttons/buttons.gpr",
132+
"/examples/MicroBit/digital_in/digital_in.gpr",
133+
"/examples/MicroBit/music/music.gpr",
134+
"/examples/MicroBit/analog_in/analog_in.gpr",
135+
"/examples/MicroBit/analog_out/analog_out.gpr",
136+
"/examples/MicroBit/digital_out/digital_out.gpr",
137+
"/examples/MicroBit/BLE_beacon/BLE_beacon.gpr",
138+
"/examples/MicroBit/servos/servos.gpr",
139+
"/examples/MicroBit/neopixel/neopixel.gpr",
140+
"/examples/MicroBit/follower/follower.gpr",
141+
"/examples/MicroBit/accelerometer/accelerometer.gpr",
142+
143+
# NRF52_SDK
144+
"/boards/NRF52_DK/nrf52_dk_zfp.gpr",
145+
"/examples/NRF52_DK/buttons/buttons.gpr",
146+
"/examples/NRF52_DK/BLE_beacon/BLE_beacon.gpr",
147+
"/examples/NRF52_DK/digital_out/digital_out.gpr",
148+
149+
# STM32 driver examples
150+
STM_DRIVERS + "/demo_adc_dma/demo_adc_dma.gpr",
151+
STM_DRIVERS + "/demo_adc_interrupts/demo_adc_interrupts.gpr",
152+
STM_DRIVERS + "/demo_adc_polling/demo_adc_polling.gpr",
153+
STM_DRIVERS + "/demo_adc_timer_dma/demo_adc_timer_dma.gpr",
154+
STM_DRIVERS + "/demo_adc_timer_triggered/demo_adc_timer_triggered.gpr",
155+
STM_DRIVERS + "/demo_crc/demo_crc.gpr",
156+
STM_DRIVERS + "/demo_dac_basic/demo_dac_basic.gpr",
157+
STM_DRIVERS + "/demo_dac_dma/demo_dac_dma.gpr",
158+
STM_DRIVERS + "/demo_dma_mem_to_mem/demo_dma_mem_to_mem.gpr",
159+
STM_DRIVERS + "/demo_dma_mem_to_peripheral/demo_usart_dma_continuous.gpr",
160+
STM_DRIVERS + "/demo_gpio_direct_leds/demo_gpio.gpr",
161+
STM_DRIVERS + "/demo_independent_watchdog/demo_iwdg.gpr",
162+
STM_DRIVERS + "/demo_L3GD20_dataready_int/demo_l3gd20_dataready_int.gpr",
163+
STM_DRIVERS + "/demo_L3GD20_fifo_int/demo_l3gd20_fifo_int.gpr",
164+
STM_DRIVERS + "/demo_L3GD20_polling/demo_l3gd20.gpr",
165+
STM_DRIVERS + "/demo_LIS3DSH_pwm/demo_lis3dsh_pwm.gpr",
166+
STM_DRIVERS + "/demo_LIS3DSH_tilt/demo_lis3dsh_tilt.gpr",
167+
STM_DRIVERS + "/demo_rng/demo_rng.gpr",
168+
STM_DRIVERS + ("/demo_timer_interrupts_basic/"
169+
"demo_basic_timer_interrupts.gpr"),
170+
STM_DRIVERS + ("/demo_timer_interrupts_multichannel/"
171+
"demo_timer_interrupts_multichannel.gpr"),
172+
STM_DRIVERS + "/demo_timer_pwm/demo_timer_pwm.gpr",
173+
STM_DRIVERS + "/demo_timer_quad_encoder/demo_timer_quad_encoder.gpr",
174+
STM_DRIVERS + "/demo_usart_interrupts/demo_usart_interrupts.gpr",
175+
STM_DRIVERS + "/demo_usart_polling/demo_usart_polling.gpr",
176+
]
174177

175178
# Check if RISC-V32 compiler is available
176179
if shutil.which("riscv64-elf-gnatls"):
177180

178181
# Add RISC-V32 projects
179182
projects += ["/examples/HiFive1/hifive1_example.gpr"]
180183

181-
parser = argparse.ArgumentParser('Compile all the Ada_Drivers_Library examples')
184+
parser = argparse.ArgumentParser('Compile all Ada_Drivers_Library examples')
182185

183186
parser.add_argument(
184187
'--prod-only', action='store_true',

scripts/check_readme.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
undocumented = []
1616

1717
error = \
18-
"""Next boards were not mentioned in the top README.md file!
19-
Please, append each of them to the table in the Board List section.
20-
"""
18+
"""Next boards were not mentioned in the top README.md file!
19+
Please, append each of them to the table in the Board List section.
20+
"""
2121

2222
with open(top_readme_file, 'r', encoding='utf-8') as file:
2323
lines = [line for line in file]

0 commit comments

Comments
 (0)