/hal_espressif-3.5.0/tools/idf_py_actions/ |
D | create_ext.py | 3 import os 23 abspath = os.path.abspath(path) 24 if not os.path.exists(abspath): 25 os.makedirs(abspath) 26 elif not os.path.isdir(abspath): 27 print('Your target path is not a directory. Please remove the', os.path.abspath(abspath), 30 elif len(os.listdir(path)) > 0: 37 …copy_tree(os.path.join(os.environ['IDF_PATH'], 'examples', 'get-started', 'sample_project'), targe… 38 main_folder = os.path.join(target_path, 'main') 39 os.rename(os.path.join(main_folder, 'main.c'), os.path.join(main_folder, '.'.join((name, 'c')))) [all …]
|
D | core_ext.py | 3 import os 59 os.environ['MENUCONFIG_STYLE'] = style 87 if not os.path.isdir(args.build_dir): 97 if os.name == 'nt': 100 for root, dirnames, _filenames in os.walk(directory): 102 full_path = os.path.join(root, d) 108 os.rmdir(full_path) 114 if not os.path.isdir(build_dir): 117 if len(os.listdir(build_dir)) == 0: 121 if not os.path.exists(os.path.join(build_dir, 'CMakeCache.txt')): [all …]
|
D | tools.py | 1 import os 29 return os.path.normcase(os.path.realpath(path)) 33 version_path = os.path.join(os.environ['IDF_PATH'], 'tools/cmake/version.cmake') 51 path = os.path.join(path, sdkconfig_filename) 62 '--git-dir=%s' % os.path.join(os.environ['IDF_PATH'], '.git'), 63 '--work-tree=%s' % os.environ['IDF_PATH'], 86 env_copy = dict(os.environ) 143 if not os.path.exists(cache_path): 180 if not os.path.isdir(project_dir): 181 if not os.path.exists(project_dir): [all …]
|
D | serial_ext.py | 5 import os 19 desc_path = os.path.join(args.build_dir, 'project_description.json') 20 if not os.path.exists(desc_path): 30 esptool_path = os.path.join(os.environ['IDF_PATH'], 'components/esptool_py/esptool/') 51 … esptool_path = os.path.join(os.environ['IDF_PATH'], 'components/esptool_py/esptool/esptool.py') 52 esptool_wrapper_path = os.environ.get('ESPTOOL_WRAPPER', '') 56 if os.path.exists(esptool_wrapper_path): 62 with open(os.path.join(args.build_dir, 'flasher_args.json')) as f: 91 elf_file = os.path.join(args.build_dir, project_desc['app_elf']) 92 if not os.path.exists(elf_file): [all …]
|
/hal_espressif-3.5.0/tools/unit-test-app/ |
D | idf_ext.py | 3 import os 4 import os.path 9 def action_extensions(base_actions, project_path=os.getcwd()): 18 CONFIG_NAMES = os.listdir(os.path.join(project_path, 'configs')) 21 BUILDS_DIR = os.path.join(project_path, 'builds') 22 BINARIES_DIR = os.path.join(project_path, 'output') 52 sdkconfig_path = os.path.join(args.project_dir, 'sdkconfig') 56 sdkconfig_path = os.path.abspath(sdkconfig_path) 59 os.remove(sdkconfig_path) 65 config_path = os.path.join(project_path, 'configs', config_name) [all …]
|
/hal_espressif-3.5.0/tools/ci/python_packages/ttfw_idf/ |
D | IDFApp.py | 18 import os 59 file_name = os.path.basename(path) 83 app_name = os.path.splitext(args['app']['file'])[0] 101 if not os.path.dirname(p[1]) and 'partition' not in p[1]: 103 app_name = os.path.splitext(p[1])[0] 116 assert os.path.exists(artifact_index_file) 117 self.gitlab_inst = gitlab_api.Gitlab(os.getenv('CI_PROJECT_ID')) 144 return os.path.join(self.artifact_info['work_dir'], self.artifact_info['build_dir']) 150 flash_arg_file = os.path.join(base_path, 'flasher_args.json') 152 flash_arg_file = os.path.join(base_path, 'download.config') [all …]
|
/hal_espressif-3.5.0/tools/test_idf_py/ |
D | test_idf_py.py | 17 import os 33 current_dir = os.path.dirname(os.path.realpath(__file__)) 34 idf_py_path = os.path.join(current_dir, '..', 'idf.py') 35 extension_path = os.path.join(current_dir, 'test_idf_extensions', 'test_ext') 36 link_path = os.path.join(current_dir, '..', 'idf_py_actions', 'test_ext') 42 os.symlink(extension_path, link_path) 43 os.environ['IDF_EXTRA_ACTIONS_PATH'] = os.path.join(current_dir, 'extra_path') 45 env=os.environ).decode('utf-8', 'ignore') 52 os.remove(link_path) 56 os.symlink(extension_path, link_path) [all …]
|
/hal_espressif-3.5.0/tools/cmake/ |
D | convert_to_cmake.py | 8 import os.path 60 os.path.join(os.environ['IDF_PATH'], 65 … 'COMPONENT_MAKEFILE': os.path.join(component_path, 'component.mk'), 66 'COMPONENT_NAME': os.path.basename(component_path), 73 obj = os.path.splitext(obj)[0] 75 if os.path.exists(os.path.join(component_path, obj) + '.' + ext): 89 component_srcdir_path = os.path.abspath(os.path.join(component_path, component_srcdir)) 92 srcs += glob.glob(os.path.join(component_srcdir_path, '*.[cS]')) 93 srcs += glob.glob(os.path.join(component_srcdir_path, '*.cpp')) 94 srcs = [('"%s"' % str(os.path.relpath(s, component_path))) for s in srcs] [all …]
|
/hal_espressif-3.5.0/tools/find_build_apps/ |
D | common.py | 5 import os 23 IDF_SIZE_PY = os.path.join(os.environ['IDF_PATH'], 'tools', 'idf_size.py') 64 for root, _, files in os.walk(path): 67 return os.path.join(root, res[0]) 76 for root, dirs, files in os.walk(path, topdown=False): 79 os.remove(os.path.join(root, f)) 82 os.rmdir(os.path.join(root, d)) 119 self._app_name = os.path.basename(os.path.normpath(app_path)) 130 self.build_path = os.path.join(self.work_path, 'build') 131 elif os.path.isabs(self.build_dir): [all …]
|
/hal_espressif-3.5.0/tools/ci/ |
D | deploy_docs.py | 21 import os 22 import os.path 34 … return os.path.expandvars(os.environ.get(variable, default) if default else os.environ[variable]) 38 sys.path.append(os.path.join(env('IDF_PATH'), 'docs')) 84 doc_deploy_type = os.getenv('TYPE') 112 tarball_name = os.path.basename(tarball_path) 149 os.remove(tarball_path) 156 target_dirname = os.path.dirname(os.path.dirname(html_dir)) 157 target = os.path.basename(target_dirname) 158 language = os.path.basename(os.path.dirname(target_dirname)) [all …]
|
/hal_espressif-3.5.0/tools/unit-test-app/tools/ |
D | UnitTestParser.py | 4 import os 44 TAG_DEF_FILE = os.path.join('tools', 'unit-test-app', 'tools', 'TagDefinition.yml') 45 MODULE_DEF_FILE = os.path.join('tools', 'unit-test-app', 'tools', 'ModuleDefinition.yml') 46 CONFIG_DEPENDENCY_FILE = os.path.join('tools', 'unit-test-app', 'tools', 'ConfigDependency.yml') 47 MODULE_ARTIFACT_FILE = os.path.join('components', 'idf_test', 'ModuleDefinition.yml') 48 TEST_CASE_FILE_DIR = os.path.join('components', 'idf_test', 'unit_test') 49 UT_CONFIG_FOLDER = os.path.join('tools', 'unit-test-app', 'configs') 61 idf_path = os.getenv('IDF_PATH') 62 idf_target = os.getenv('IDF_TARGET') 71 … self.tag_def = yaml.load(open(os.path.join(idf_path, self.TAG_DEF_FILE), 'r'), Loader=Loader) [all …]
|
/hal_espressif-3.5.0/tools/ |
D | check_python_dependencies.py | 7 import os 29 idf_path = os.getenv('IDF_PATH') 31 default_requirements_path = os.path.join(idf_path, 'requirements.txt') # type: ignore 46 line = os.path.basename(line) 60 if os.path.realpath(args.requirements) != os.path.realpath(default_requirements_path): 63 elif os.environ.get('IDF_PYTHON_ENV_PATH'): 66 if sys.platform == 'win32' and not os.environ.get('MSYSTEM'): 70 …print('To install the missing packages, please run "%s"' % os.path.join(idf_path, install_script))… 71 …elif sys.platform == 'win32' and os.environ.get('MSYSTEM', None) == 'MINGW32' and '/mingw32/bin/py… 96 idf_python_env_path = os.environ.get('IDF_PYTHON_ENV_PATH') [all …]
|
D | idf.py | 21 import os 22 import os.path 43 os.environ['PYTHON'] = sys.executable 47 PROG = os.getenv('IDF_PY_PROGRAM_NAME', 'idf.py') 54 if not os.getenv('_IDF.PY_COMPLETE'): 72 detected_idf_path = realpath(os.path.join(os.path.dirname(__file__), '..')) 73 if 'IDF_PATH' in os.environ: 74 set_idf_path = realpath(os.environ['IDF_PATH']) 82 os.environ['IDF_PATH'] = detected_idf_path 97 os.environ['PYTHON'], [all …]
|
D | gen_esp_err_to_name.py | 36 import os 42 ignore_files = [os.path.join('components', 'mdns', 'test_afl_fuzz_host', 'esp32_mock.h'), 44 os.path.join('components', 'tcpip_adapter', 'include', 'tcpip_adapter_types.h') 48 ignore_dirs = (os.path.join('examples'), 49 os.path.join('components', 'cmock', 'CMock', 'test'), 50 os.path.join('components', 'spi_flash', 'sim')) 53 priority_headers = [os.path.join('components', 'esp_common', 'include', 'esp_err.h')] 56 dont_include = [os.path.join('soc', 'soc.h'), 57 os.path.join('esp_err.h')] 217 spl_path = path.split(os.sep) [all …]
|
D | idf_tools.py | 38 import os 82 IDF_TOOLS_PATH_DEFAULT = os.path.join('~', '.espressif') 86 IDF_MAINTAINER = os.environ.get('IDF_MAINTAINER') or False 90 IDF_TOOLS_INSTALL_CMD = os.environ.get('IDF_TOOLS_INSTALL_CMD') 91 IDF_TOOLS_EXPORT_CMD = os.environ.get('IDF_TOOLS_INSTALL_CMD') 222 fullpath = os.path.join(path, cmd[0] + ext) 223 if os.path.exists(fullpath): 249 paths_list = [p.replace('/', os.path.sep) if os.path.sep in p else p for p in paths_list] 251 if 'MSYSTEM' in os.environ: 264 env_arg = os.environ.copy() [all …]
|
/hal_espressif-3.5.0/examples/system/ota/advanced_https_ota/ |
D | example_test.py | 3 import os 15 server_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_certs/server_cert.pem') 16 key_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_certs/server_key.pem') 60 os.chdir(ota_image_dir) 71 os.chdir(ota_image_dir) 97 os.chdir(ota_image_dir) 125 binary_file = os.path.join(dut1.app.binary_path, bin_name) 126 bin_size = os.path.getsize(binary_file) 174 binary_file = os.path.join(dut1.app.binary_path, bin_name) 176 fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), 'wb+') [all …]
|
/hal_espressif-3.5.0/examples/system/ota/native_ota_example/ |
D | example_test.py | 3 import os 88 os.chdir(ota_image_dir) 89 server_file = os.path.join(ota_image_dir, 'server_cert.pem') 92 key_file = os.path.join(ota_image_dir, 'server_key.pem') 154 binary_file = os.path.join(dut1.app.binary_path, bin_name) 155 bin_size = os.path.getsize(binary_file) 203 binary_file = os.path.join(dut1.app.binary_path, bin_name) 205 fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), 'wb+') 209 binary_file = os.path.join(dut1.app.binary_path, truncated_bin_name) 210 bin_size = os.path.getsize(binary_file) [all …]
|
/hal_espressif-3.5.0/tools/test_idf_tools/ |
D | test_idf_tools.py | 7 import os 31 os.environ['IDF_MAINTAINER'] = '1' 57 with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'tools.json')) as f: 78 …old_tools_dir = os.environ.get('IDF_TOOLS_PATH') or os.path.expanduser(idf_tools.IDF_TOOLS_PATH_DE… 81 if os.path.exists(old_tools_dir): 82 …mirror_prefix_map = 'https://dl.espressif.com/dl/toolchains/preview,file://' + os.path.join(old_to… 84 … mirror_prefix_map += ';https://dl.espressif.com/dl,file://' + os.path.join(old_tools_dir, 'dist') 85 …rror_prefix_map += ';https://github.com/espressif/.*/releases/download/.*/,file://' + os.path.join( 89 os.environ['IDF_MIRROR_PREFIX_MAP'] = mirror_prefix_map 94 os.environ['IDF_TOOLS_PATH'] = cls.temp_tools_dir [all …]
|
/hal_espressif-3.5.0/tools/test_mkdfu/ |
D | test_mkdfu.py | 23 import os 32 current_dir = os.path.dirname(os.path.realpath(__file__)) 33 mkdfu_path = os.path.join(current_dir, '..', 'mkdfu.py') 45 self.addCleanup(os.unlink, f_out.name) 73 …self.assertTrue(filecmp.cmp(f_out.name, os.path.join(current_dir, output_to_compare)), 'Output fil… 81 … with tempfile.NamedTemporaryFile(mode='w', dir=os.path.join(current_dir, '1'), delete=False) as f: 82 self.addCleanup(os.unlink, f.name) 105 shutil.copyfile(os.path.join(current_dir, '1', '1.bin'), bootloader) 108 (0x8000, os.path.join(current_dir, '1', '2.bin')), 109 (0x10000, os.path.join(current_dir, '1', '3.bin'))]) [all …]
|
/hal_espressif-3.5.0/tools/test_apps/system/flash_psram/ |
D | app_test.py | 6 import os 28 config_files = glob.glob(os.path.join(os.path.dirname(__file__), 'sdkconfig.ci.f8r8*')) 29 config_names = [os.path.basename(s).replace('sdkconfig.ci.', '') for s in config_files] 37 config_files = glob.glob(os.path.join(os.path.dirname(__file__), 'sdkconfig.ci.f4r8*')) 38 config_names = [os.path.basename(s).replace('sdkconfig.ci.', '') for s in config_files] 46 config_files = glob.glob(os.path.join(os.path.dirname(__file__), 'sdkconfig.ci.f4r4*')) 47 config_names = [os.path.basename(s).replace('sdkconfig.ci.', '') for s in config_files]
|
/hal_espressif-3.5.0/components/lwip/weekend_test/ |
D | net_suite_test.py | 1 import os 75 binary_file = os.path.join(dut1.app.binary_path, 'net_suite.bin') 76 bin_size = os.path.getsize(binary_file) 87 netsuite_path = os.getenv('NETSUITE_PATH') 88 netsuite_src_path = os.path.join(netsuite_path, 'src') 89 test_dir = os.path.dirname(os.path.realpath(__file__)) 94 copyfile(os.path.join(test_dir, TTCN_SRC), os.path.join(netsuite_src_path, TTCN_SRC)) 95 copyfile(os.path.join(test_dir, TTCN_CFG), os.path.join(netsuite_src_path, TTCN_CFG)) 112 …proc = subprocess.Popen(['ttcn3_start', os.path.join(netsuite_src_path,'test_suite'), os.path.join…
|
/hal_espressif-3.5.0/examples/system/sysview_tracing_heap_log/ |
D | example_test.py | 3 import os 15 rel_project_path = os.path.join('examples', 'system', 'sysview_tracing_heap_log') 17 proj_path = os.path.join(dut.app.idf_path, rel_project_path) 18 elf_path = os.path.join(dut.app.binary_path, 'sysview_tracing_heap_log.elf') 27 with open(os.path.join(proj_path, 'gdbinit')) as f_in, open(tempfiles[0], 'w') as f_out: 34 with ttfw_idf.OCDBackend(os.path.join(proj_path, 'openocd.log'), dut.app.target): 38 gdb_log = os.path.join(proj_path, 'gdb.log') 39 gdb_workdir = os.path.join(proj_path, 'main') 49 …with ttfw_idf.CustomProcess(' '.join([os.path.join(dut.app.idf_path, 'tools/esp_app_trace/sysviewt… 58 os.unlink(x)
|
/hal_espressif-3.5.0/examples/system/ota/simple_ota_example/ |
D | example_test.py | 3 import os 81 os.chdir(ota_image_dir) 84 server_file = os.path.join(ota_image_dir, 'server_cert.pem') 90 key_file = os.path.join(ota_image_dir, 'server_key.pem') 113 bootloader_path = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') 118 app_path = os.path.join(dut.app.binary_path, 'simple_ota.bin') 136 binary_file = os.path.join(dut1.app.binary_path, 'simple_ota.bin') 137 bin_size = os.path.getsize(binary_file) 175 binary_file = os.path.join(dut1.app.binary_path, 'simple_ota.bin') 176 bin_size = os.path.getsize(binary_file) [all …]
|
/hal_espressif-3.5.0/tools/test_apps/system/gdb_loadable_elf/ |
D | app_test.py | 3 import os 16 …with serial.Serial(os.getenv('ESPPORT', '/dev/ttyUSB1'), 115200) as ser, open(log_path, 'wb') as f: 40 rel_project_path = os.path.join('tools', 'test_apps', 'system', 'gdb_loadable_elf') 45 proj_path = os.path.join(idf_path, rel_project_path) 46 elf_path = os.path.join(app.binary_path, 'gdb_loadable_elf.elf') 47 esp_log_path = os.path.join(proj_path, 'esp.log') 50 openocd_log = os.path.join(proj_path, 'openocd.log') 51 gdb_log = os.path.join(proj_path, 'gdb.log') 52 gdb_init = os.path.join(proj_path, 'gdbinit_' + target) 53 gdb_dir = os.path.join(proj_path, 'main')
|
/hal_espressif-3.5.0/examples/system/sysview_tracing/ |
D | example_test.py | 3 import os 16 rel_project_path = os.path.join('examples', 'system', 'sysview_tracing') 18 proj_path = os.path.join(dut.app.idf_path, rel_project_path) 19 elf_path = os.path.join(dut.app.binary_path, 'sysview_tracing.elf') 28 with open(os.path.join(proj_path, 'gdbinit')) as f_in, open(tempfiles[0], 'w') as f_out: 35 with ttfw_idf.OCDBackend(os.path.join(proj_path, 'openocd.log'), dut.app.target) as oocd: 43 gdb_log = os.path.join(proj_path, 'gdb.log') 44 gdb_workdir = os.path.join(proj_path, 'main') 60 os.unlink(x)
|