-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2827 from hathach/ci-dwc2-dma
Ci dwc2 dma
- Loading branch information
Showing
9 changed files
with
123 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import argparse | ||
import json | ||
import os | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('config_file', help='Configuration JSON file') | ||
args = parser.parse_args() | ||
|
||
config_file = args.config_file | ||
|
||
# if config file is not found, try to find it in the same directory as this script | ||
if not os.path.exists(config_file): | ||
config_file = os.path.join(os.path.dirname(__file__), config_file) | ||
with open(config_file) as f: | ||
config = json.load(f) | ||
|
||
matrix = { | ||
'arm-gcc': [], | ||
'esp-idf': [] | ||
} | ||
for board in config['boards']: | ||
name = board['name'] | ||
if board['flasher'] == 'esptool': | ||
toolchain = 'esp-idf' | ||
else: | ||
toolchain = 'arm-gcc' | ||
|
||
if 'build' in board and 'flags_on' in board['build']: | ||
for f in board['build']['flags_on']: | ||
if f == '': | ||
matrix[toolchain].append(f'-b {name}') | ||
else: | ||
matrix[toolchain].append(f'-b {name} -f1 {f.replace(" ", " -f1 ")}') | ||
else: | ||
matrix[toolchain].append(f'-b {name}') | ||
|
||
print(json.dumps(matrix)) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters