it successfully runs the setup scripts, and programming the target. But when capturing traces the following occurs:
(ChipWhisperer Target WARNING|File SimpleSerial2.py:502) Read timed out:
(ChipWhisperer Target ERROR|File SimpleSerial2.py:285) Device did not ack
Capturing traces: 100%
50/50 [01:46<00:00, 2.13s/it]
(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:730) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 8b
(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:730) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 8a
Target timed out!
(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:730) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 0b
(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:730) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 0a
Target timed out!
etc....
untill all 50 capturings are finished. However the next step is to assert that you have all 50 traces, but this fails, therefore the capturing did not go through. The “captures” also take a very long time. I am currently using the chipwhisperer lite with the CW308_STM32F3 board.
The capture is taking a long time because each attempt fails and times out after scope.adc.timeout seconds (default 2s).
The errors indicate that ChipWhisperer is not able to communicate with the target. The most likely cause for this is that the firmware was compiled with a different SS_VER setting than what is used in your notebook.
You can also try adding a reset_target(scope) after the cw.program_target() call.
Hmm okay, I have set SS_VER to 2.1 as it recommended in the hardware page. And when i run the setup code this is the output:
Building for platform CW308_STM32F3 with CRYPTO_TARGET=TINYAES128C
SS_VER set to SS_VER_2_1
SS_VER set to SS_VER_2_1
Blank crypto options, building for AES128
.
Size after:
+--------------------------------------------------------
Welcome to another exciting ChipWhisperer target build!!
+ Built for platform CW308T: STM32F3 Target with:
arm-none-eabi-gcc (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) 13.3.1 20240614
Copyright (C) 2023 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.
+ CRYPTO_TARGET = TINYAES128C
text data bss dec hex filename
5552 536 1632 7720 1e28 simpleserial-aes-CW308_STM32F3.elf
+ CRYPTO_OPTIONS = AES128C
+--------------------------------------------------------
How do i check if the firmware was compiled with the wrong SS_VER? And if it is, how would i change it? should i try to use a different SS_VER when compiling?
I also tried to use the reset target call, but it seems like it did not do much.
Ok so I just changed the SS_VER in the code and then it worked. Am I not supposed to use the example values which are stated on top of the hardware of each course?
You can use SS_VER_1_1 or SS_VER_2_1, as long as the same version is used for compiling the code and in the notebook where Setup_Generic.ipynb is called (because that’s where the target object gets set up).
You can double check with type(target): should be (…)SimpleSerial for 1_1, (…)SimpleSerial2 for 2_1.
The other thing that can get missed is that the target needs to be programmed with your compiled firmware .