Closed w-xinjiang closed 2 years ago
You need to call probe.close() to allow the library to clean up the dlls. You could also use context handlers as follows, that should guarantee that the cleanup is performed:
def update_fw(snr):
print("updating FW in {}".format(snr))
with HighLevel.IPCDFUProbe(api, int(snr), HighLevel.CoProcessor.CP_MODEM) as probe:
print("{} probe initialized". format(snr))
probe.program("mfw_nrf9160_1.2.2.zip")
print("{} programmed".format(snr))
probe.verify("mfw_nrf9160_1.2.2.zip")
print("{} Modem verified".format(snr))
def program_app(snr):
with HighLevel.DebugProbe(api, int(snr) ) as app_probe :
program_options = HighLevel.ProgramOptions(
erase_action=HighLevel.EraseAction.ERASE_ALL,
reset = HighLevel.ResetAction.RESET_SYSTEM,
verify = HighLevel.VerifyAction.VERIFY_READ
)
app_probe.program( "merged.hex" , program_options=program_options )
app_probe.verify( "merged.hex" , HighLevel.VerifyAction.VERIFY_READ )
print("{} Application verified".format(snr))
app_probe.reset()
From v10.13.0 and forward, nrfjprog no longer uses temporary files to implement the J-Link multiloading mechanism. Instead a method similar to MultiAPI is implemented in C++. This should resolve your issue, as we no longer generate any temporary files.
The multi-threaded burning program is packaged into an application with pyinstaller.After the program is running, during the burning process, Jlink_x64.dll and cache files are continuously written to the folder C:\Users\Administrator\AppData\Local\Temp, and will not be recycled.Cause the storage of C drive to be filled.
![image](https://user-images.githubusercontent.com/76776921/103393798-ae1c5200-4b5f-11eb-975c-ba23922a3a98.png)
Code: