MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / GenerateVSCodePyocdConfig

Function GenerateVSCodePyocdConfig

tools/vscpyocd.py:164–189  ·  view source on GitHub ↗
(pack)

Source from the content-addressed store, hash-verified

162 return max_similar_targetId
163
164def GenerateVSCodePyocdConfig(pack):
165 if pack == 'env':
166 pack = get_pack_from_env()
167 if pack == None:
168 return
169 else:
170 # Check is exist
171 if not os.path.exists(pack):
172 return
173 # Check is file
174 if not os.path.isfile(pack):
175 return
176 # Check is pack
177 if not str(pack).endswith('.pack'):
178 return
179
180 pack = pack.replace('\\', '/')
181
182 targetId = get_trgetId_from_pack(pack)
183 if targetId ==None:
184 return
185
186 create_need_files(targetId, pack)
187 print('Pyocd Config Done!')
188
189 return
190

Callers 1

GenTargetProjectFunction · 0.90

Calls 3

get_pack_from_envFunction · 0.85
get_trgetId_from_packFunction · 0.85
create_need_filesFunction · 0.85

Tested by

no test coverage detected