I am trying to run this code but getting error on following lines:
%%sh -s “$PLATFORM” “$SS_VER”
cd …/…/…/hardware/victims/firmware/simpleserial-rsa
make PLATFORM=$1 CRYPTO_TARGET=MBEDTLS CRYPTO_OPTIONS=RSA OPT=2 SS_VER=$2
error:
SS_VER set to SS_VER_2_1
SS_VER set to SS_VER_2_1
SS_VER set to SS_VER_2_1
SS_VER set to SS_VER_2_1
make[1]: ‘.dep’ is up to date.
SS_VER set to SS_VER_2_1
SS_VER set to SS_VER_2_1
.
Welcome to another exciting ChipWhisperer target build!!
avr-gcc (GCC) 11.1.0
Copyright (C) 2021 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.
Compiling:
simpleserial-rsa.c: In function ‘main’:
simpleserial-rsa.c:49:34: warning: passing argument 3 of ‘simpleserial_addcmd’ from incompatible pointer type [-Wincompatible-pointer-types]
49 | simpleserial_addcmd(‘t’, 0, real_dec);
| ^~~~~~~~
| |
| uint8_t (*)(uint8_t , uint8_t) {aka unsigned char ()(unsigned char , unsigned char)}
In file included from simpleserial-rsa.c:20:
…/./simpleserial/simpleserial.h:40:61: note: expected 'uint8_t ()(uint8_t, uint8_t, uint8_t, uint8_t )’ {aka 'unsigned char ()(unsigned char, unsigned char, unsigned char, unsigned char )'} but argument is of type 'uint8_t ()(uint8_t , uint8_t)’ {aka 'unsigned char ()(unsigned char , unsigned char)'}
40 | int simpleserial_addcmd(char c, unsigned int len, uint8_t (fp)(uint8_t, uint8_t, uint8_t, uint8_t));
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
simpleserial-rsa.c:56:34: warning: passing argument 3 of ‘simpleserial_addcmd’ from incompatible pointer type [-Wincompatible-pointer-types]
56 | simpleserial_addcmd(‘p’, 16, get_pt);
| ^~~~~~
| |
| uint8_t ()(uint8_t , uint8_t) {aka unsigned char ()(unsigned char , unsigned char)}
In file included from simpleserial-rsa.c:20:
…/./simpleserial/simpleserial.h:40:61: note: expected 'uint8_t ()(uint8_t, uint8_t, uint8_t, uint8_t )’ {aka 'unsigned char ()(unsigned char, unsigned char, unsigned char, unsigned char )'} but argument is of type 'uint8_t ()(uint8_t , uint8_t)’ {aka 'unsigned char ()(unsigned char *, unsigned char)‘}
40 | int simpleserial_addcmd(char c, unsigned int len, uint8_t (fp)(uint8_t, uint8_t, uint8_t, uint8_t));
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
simpleserial-rsa.c …Done!
.
Compiling:
In file included from simpleserial-rsa-xmega.c:28:
…/./crypto/avrcryptolib/rsa/rsa_basic.h:23:10: fatal error: bigint.h: No such file or directory
23 | #include “bigint.h”
| ^~~~~~~~~~
compilation terminated.
make[1]: *** […/./Makefile.inc:495: objdir-CWLITEXMEGA/simpleserial-rsa-xmega.o] Error 1
make: *** […/./Makefile.inc:338: all] Error 2
simpleserial-rsa-xmega.c …
CalledProcessError Traceback (most recent call last)
Cell In[25], line 1
----> 1 get_ipython().run_cell_magic(‘sh’, ‘-s “$PLATFORM” “$SS_VER”’, ‘cd …/…/…/hardware/victims/firmware/simpleserial-rsa\nmake PLATFORM=$1 CRYPTO_TARGET=MBEDTLS CRYPTO_OPTIONS=RSA OPT=2 SS_VER=$2\n’)
File C:\Users\MYPC~1\CHIPWH~1\cw\home\portable\WPy64-31080\python-3.10.8.amd64\lib\site-packages\IPython\core\interactiveshell.py:2422, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2420 with self.builtin_trap:
2421 args = (magic_arg_s, cell)
→ 2422 result = fn(*args, **kwargs)
2423 return result
File C:\Users\MYPC~1\CHIPWH~1\cw\home\portable\WPy64-31080\python-3.10.8.amd64\lib\site-packages\IPython\core\magics\script.py:153, in ScriptMagics._make_script_magic..named_script_magic(line, cell)
151 else:
152 line = script
→ 153 return self.shebang(line, cell)
File C:\Users\MYPC~1\CHIPWH~1\cw\home\portable\WPy64-31080\python-3.10.8.amd64\lib\site-packages\IPython\core\magics\script.py:305, in ScriptMagics.shebang(self, line, cell)
300 if args.raise_error and p.returncode != 0:
301 # If we get here and p.returncode is still None, we must have
302 # killed it but not yet seen its return code. We don’t wait for it,
303 # in case it’s stuck in uninterruptible sleep. -9 = SIGKILL
304 rc = p.returncode or -9
→ 305 raise CalledProcessError(rc, cell)
CalledProcessError: Command ‘b’cd …/…/…/hardware/victims/firmware/simpleserial-rsa\nmake PLATFORM=$1 CRYPTO_TARGET=MBEDTLS CRYPTO_OPTIONS=RSA OPT=2 SS_VER=$2\n’’ returned non-zero exit status 2.
kindly help me out to resolve this issue