SS_VER set to SS_VER_1_1 SS_VER set to SS_VER_1_1 SS_VER set to SS_VER_1_1 SS_VER set to SS_VER_1_1 make[1]: '.dep' is up to date. SS_VER set to SS_VER_1_1 SS_VER set to SS_VER_1_1 . Welcome to another exciting ChipWhisperer target build!! arm-none-eabi-gcc (15:12.2.rel1-1) 12.2.1 20221205 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
import chipwhisperer as cw try: if not scope.connectStatus: scope.con() except NameError: scope = cw.scope() try: target = cw.target(scope) except IOError: print("INFO: Caught exception on reconnecting to target - attempting to reconnect to scope first.") print("INFO: This is a work-around when USB has died without Python knowing. Ignore errors above this line.") scope = cw.scope() target = cw.target(scope)
print("INFO: Found ChipWhisperer😍")
if "STM" in PLATFORM or PLATFORM == "CWLITEARM" or PLATFORM == "CWNANO": prog = cw.programmers.STM32FProgrammer elif PLATFORM == "CW303" or PLATFORM == "CWLITEXMEGA": prog = cw.programmers.XMEGAProgrammer elif "neorv32" in PLATFORM.lower(): prog = cw.programmers.NEORV32Programmer elif PLATFORM == "CW308_SAM4S": prog = cw.programmers.SAM4SProgrammer else: prog = None import time time.sleep(0.05) scope.default_setup()
if PLATFORM == "CW308_SAM4S": scope.io.target_pwr = 0 time.sleep(0.2) scope.io.target_pwr = 1 time.sleep(0.2) def reset_target(scope): if PLATFORM == "CW303" or PLATFORM == "CWLITEXMEGA": scope.io.pdic = 'low' time.sleep(0.1) scope.io.pdic = 'high_z' #XMEGA doesn't like pdic driven high time.sleep(0.1) #xmega needs more startup time elif "neorv32" in PLATFORM.lower(): raise IOError("Default iCE40 neorv32 build does not have external reset - reprogram device to reset") elif PLATFORM == "CW308_SAM4S": scope.io.nrst = 'low' time.sleep(0.25) scope.io.nrst = 'high_z' time.sleep(0.25) else: scope.io.nrst = 'low' time.sleep(0.05) scope.io.nrst = 'high_z' time.sleep(0.05)
以下输出说明成功,我的固件版本偏低(不要紧)
1 2 3
(ChipWhisperer NAEUSB WARNING|File naeusb.py:743) Your firmware (0.64) is outdated - latest is 0.65 See https://chipwhisperer.readthedocs.io/en/latest/firmware.html for more information
Detected known STMF32: STM32F302xB(C)/303xB(C) Extended erase (0x44), this can take ten seconds or more Attempting to program 4867 bytes at 0x8000000 STM32F Programming flash... STM32F Reading flash... Verified flash OK, 4867 bytes