newaetech / chipwhisperer-jupyter

Interactive ChipWhisperer tutorials using Jupyter notebooks.
220 stars 70 forks source link

Building Firmware on Windows #38

Closed Armannnnnn closed 1 year ago

Armannnnnn commented 1 year ago

Following the instructions for Lab 2_1A, I've encountered the following issue when attempting to build firmware.

I'm running the following in Jupyter:

%%cmd -s "$PLATFORM" cd C:/Users/15055/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2 make PLATFORM=CWNANO CRYPTO_TARGET=NONE

Note that I'm using %%cmd rather than %%bash due to working in a Windows environment. I've used Chocolatey to install a working make command on Windows. I'm using the ChipWhisperer-NANO board and therefore use CWNANO for my platform.

I'm encountering the following error:

process_begin: CreateProcess(NULL, rm -f -- simpleserial-base-CWNANO.hex, ...) failed. make (e=2): The system cannot find the file specified. make[1]: *** [.././Makefile.inc:510: clean_objs] Error 2 make[1]: Leaving directory 'C:/Users/15055/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2' make: *** [.././Makefile.inc:323: all] Error 2

I've verified that the simpleserial-base-lab2 directory exists and contains the makefile and simpleserial-base.c file. What steps should I take to resolve this error?

alex-dewar commented 1 year ago

Hi,

The issue here is us using rm instead of del for file removal. If you change C:/Users/15055/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/Makefile.inc to use del instead with the correct flags, the build should work.

Out of curiosity, is there any reason you're not running the build in bash? We do include a bash terminal with the Windows installer.

Alex

Armannnnnn commented 1 year ago

Actually, using the bash terminal included in the Windows installation seemed to resolve all of the issues I was having with missing commands. I wasn't aware this was included with the installation, thanks for the help!