Install chipwhisperer in pycharm

I run chipwhisperer well on jupyter.But now I need to run that on pycharm.Does anyone know how to install chipwhisperer on pycharm?

Hi,

You’ll need to follow the native install instructions: https://chipwhisperer.readthedocs.io/en/latest/prerequisites.html#prerequisites and https://chipwhisperer.readthedocs.io/en/latest/installing.html. You can then use the python interpreter you installed ChipWhisperer to in PyCharm.

Alex

Alex
Thank you a lot! I want to know how to use cw_firmware_updater_5_4_0.
Biyuanqiao

Before using the firmware updater, you’ll need to connect to the scope via ChipWhisperer and enter the bootloader via https://chipwhisperer.readthedocs.io/en/latest/api.html#firmware-update. The firmware updater can only program, not enter the bootloader. From there, you can run the firmware updater via the command line: firmware_update.exe COM_PORT HARDWARE_TYPE.

In most cases, the firmware updater shouldn’t be needed and you can just do the full reprogram via ChipWhisperer. It’s mostly just meant for people who can erase/enter the bootloader, but are having trouble with the reprogramming step as in https://github.com/newaetech/chipwhisperer/issues/287.

Alex
firmware_update.exe COM_PORT HARDWARE_TYPE dont work
Biyuanqiao

Have you erased the firmware on the ChipWhisperer yet? You need to do that (instructions here: https://chipwhisperer.readthedocs.io/en/latest/api.html#firmware-update) before you can use the firmware update tool.

Alex
I have erased the firmware on the ChipWhisperer.What should I do next?
Biyuanqiao

Go into Device Manager and find the bootloader serial port. It should be under Ports (COM & LPT) and should be called something like AT91 Serial Device.... This will be the COM_PORT argument that you pass to firmware_update.exe (should be something like COM4). HARDWARE_TYPE will be either cwlite, cw1200, cwnano, or cw305 depending on which device you’re trying to reprogram. Once this succeeds, unplug + replug the ChipWhisperer and you should be good to go.

If the reprogram doesn’t work, can you please post the resulting error message?

Alex

Alex
There is only ‘Bossa Program Port(COM1)’ under ports(COM & LPT).And I ran ‘cw_firmware_updater_5_4_0.exe COMn cwlite’.I have tried all the COM ports, but they all report errors and cannot be opened.
Biyuanqiao

I’m pretty sure COM1 is right, though I haven’t seen it listed as Bossa Program Port before. Can you try programming the firmware with Bossa instead: https://www.shumatech.com/web/products/bossa. The Lite firmware is located at chipwhisperer\hardware\capture\chipwhisperer-lite\sam3u_fw\SAM3U_VendorExample\Debug\SAM3U_CW1173.bin

If that doesn’t work, perhaps try uninstalling + deleting drivers, then unplugging/replugging?

Also, can you please post the full error message when you try to program?

Alex

Alex


I use chipwhisperer on pycharm.I have updated the firmware of the chipwhisperer lite with cw_firmware_updater_5_4_0.exe. Why do the warnings and errors in the figure appear?looking forward to your reply,thank you!
Biyuanqiao

My first guess is that the target isn’t running. Can you try:

import time
target.write('v\n')
time.sleep(0.1)
print(target.read())

and post what the target responds with?

Alex


The result is still like this.
Biyuanqiao

Can you modify your code such that only the setup is done + the code I posted above? I’m guessing the target isn’t running properly. Are you running custom firmware?

Alex