1import collections 2import multiprocessing 3import os 4import platform 5 6# Make flavors, across the various kinds of Windows environments & POSIX... 7if 'MSYSTEM' in os.environ: # MSYS 8 MAKE_CMD = 'make' 9 MAKE_GENERATOR = 'MSYS Makefiles' 10elif os.name == 'nt': # other Windows 11 MAKE_CMD = 'mingw32-make' 12 MAKE_GENERATOR = 'MinGW Makefiles' 13elif platform.system() == 'FreeBSD': 14 MAKE_CMD = 'gmake' 15 MAKE_GENERATOR = 'Unix Makefiles' 16else: 17 MAKE_CMD = 'make' 18 MAKE_GENERATOR = 'Unix Makefiles' 19 20GENERATORS = collections.OrderedDict([ 21 # - command: build command line 22 # - version: version command line 23 # - dry_run: command to run in dry run mode 24 # - verbose_flag: verbose flag 25 ('Ninja', { 26 'command': ['ninja'], 27 'version': ['ninja', '--version'], 28 'dry_run': ['ninja', '-n'], 29 'verbose_flag': '-v' 30 }), 31 (MAKE_GENERATOR, { 32 'command': [MAKE_CMD, '-j', str(multiprocessing.cpu_count() + 2)], 33 'version': [MAKE_CMD, '--version'], 34 'dry_run': [MAKE_CMD, '-n'], 35 'verbose_flag': 'VERBOSE=1', 36 }) 37]) 38 39URL_TO_DOC = 'https://docs.espressif.com/projects/esp-idf' 40 41SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3'] 42PREVIEW_TARGETS = ['linux', 'esp32h2'] 43