Hello,
I am trying to flash the CW308_STM32F4 on Ubuntu (Using the Instruction Power Differences Hardware lab as a test, but I have used others ones just to make sure).
I set PLATFORM = ‘CW308_STM32F4’ am getting the following error when executing:
cw.program_target(scope, prog, "../../../firmware/mcu/simpleserial-base-lab2/simpleserial-base-{}.hex".format(PLATFORM))
Failed to detect chip. Check following:
1. Connections and device power.
2. Device has valid clock (or remove clock entirely for internal osc).
3. On Rev -02 CW308T-STM32Fx boards, BOOT0 is routed to PDIC.
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[7], line 1
----> 1 cw.program_target(scope, prog, "../../../firmware/mcu/simpleserial-base-lab2/simpleserial-base-{}.hex".format(PLATFORM))
File ~/MasterThesis/chipwhisperer/software/chipwhisperer/__init__.py:181, in program_target(scope, prog_type, fw_path, **kwargs)
179 prog._logging = None
180 prog.open()
--> 181 prog.find()
182 prog.erase()
183 prog.program(fw_path, memtype="flash", verify=True)
File ~/MasterThesis/chipwhisperer/software/chipwhisperer/capture/api/programmers.py:129, in save_and_restore_pins.<locals>.func_wrapper(self, *args, **kwargs)
126 target_logger.debug('Changing {} pin configuration'.format(pin_setup))
128 try:
--> 129 val = func(self, *args, **kwargs)
130 finally:
131 target_logger.debug('Restoring {} pin configuration'.format(pin_setup))
File ~/MasterThesis/chipwhisperer/software/chipwhisperer/capture/api/programmers.py:420, in STM32FProgrammer.find(self)
418 target_logger.warning("(tio1, tio2) != ('serial_rx', 'serial_tx')")
419 target_logger.warning("Did you forget to call scope.default_setup()?")
--> 420 sig, chip = stm32f.find()
File ~/MasterThesis/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py:38, in close_on_fail.<locals>.func_wrapper(self, *args, **kwargs)
35 @wraps(func)
36 def func_wrapper(self, *args, **kwargs):
37 try:
---> 38 return func(self, *args, **kwargs)
39 except:
40 self.close_port()
File ~/MasterThesis/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py:174, in STM32FSerial.find(self, logfunc)
171 logfunc = print_fun
173 try:
--> 174 self.initChip()
175 except IOError:
176 logfunc("Failed to detect chip. Check following: ")
File ~/MasterThesis/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py:38, in close_on_fail.<locals>.func_wrapper(self, *args, **kwargs)
35 @wraps(func)
36 def func_wrapper(self, *args, **kwargs):
37 try:
---> 38 return func(self, *args, **kwargs)
39 except:
40 self.close_port()
File ~/MasterThesis/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py:354, in STM32FSerial.initChip(self)
351 fails += 1
353 self.releaseChip()
--> 354 raise IOError("Could not detect STM32F, check connections, BOOT MODE entry setup")
OSError: Could not detect STM32F, check connections, BOOT MODE entry setup
When doing a fresh reinstall the target will flash once and execute normally, however after unplugging the cw it always breaks. I have tried to reinstall cw, tried older versions and even completely reinstalled my ubuntu dual boot.
Suprisingly, I didn’t have this issue when using the STM32F3 target. It also works on the same machine in a windows dual boot installation.
I also went through several posts on here with the same error and tried those solutions(mostly wrong jumpers) but that did not help.
I have no idea anymore what could be wrong since it works on a different machine, on the same machine with Windows WSL and on Ubuntu with the STM32F3 target(last I tested)
.