Compiling simpleserial-aes in Spyder IPython console

Hi,
I just recently got a new computer at work and tried to set up my CW environment as before in Spyder (I prefer using something like Spyder as an IDE instead of Jupyter Notebook). I’m running Windows 10 and installed Cygwin to have access to the ‘bash’ and ‘make’ commands. I’m also workin on the cloned CW GitHub repository files.
After defining the PLATFORM, CRYPTO_TARGET, and SS_VER, I run these commands in the IPython console, which worked perfectly fine with my old setup on my old computer:

image

For some reason I get an “invalid syntax” error message. I’m not a computer wiz, so I’m having some problems figuring out what is wrong, and hence what to do to fix this. Anyone with any ideas?

Thanks!

Hi,
I got a bit further. I tried with the exclamation mark before ‘make’ (didn’t need that on my previous setup), but now I get into a new error:

Any ideas?

caddr_t should be part of the system include files for arm-none-eabi-gcc in sys/types.h and get included via stdio.h, so my guess is something is broken with your includes.

Alex

Hi,

Thank you for the response. I installed the avr-gcc from the link you have in your CW installation guide (I didn’t think that would be needed), and re-installed the arm-none-eabi-gcc, also using the link you provided (instead of doing it from somewhere else which I had done before), added the bin folders to the PATH, and now it works :slight_smile:

Just a follow-up question. This is not important at all, I’m just curious: for some reason using this structure causes a syntax error: !make PLATFORM=$1 CRYPTO_TARGET=$2 SS_VER=$3, and instead I have to run the make command like this: !make PLATFORM='CW308_STM32F3' CRYPTO_TARGET='TINYAES128C' SS_VER='SS_VER_2_1.

Any idea why? (the first way of doing it worked fine on my old computer).

Thanks!

Hi again,

Sorry, I didn’t mean to say syntax error, I get this return message:

image

Prior to that in the code I run %%bash -s "$PLATFORM" "$CRYPTO_TARGET" "$SS_VER" with no error message.

I think what’s going on in general here is that in Jupyter,

%%bash <args>
cmd 1
cmd 2

is a magic command that runs cmd 1 and cmd 2 using bash <args>. I think in your case, the %%bash is being run by itself and therefore has no effect on the blocks that run after. I’m not familiar with the environment you’re using, but you could try %%bash <args> -c "cd C:\chipwhisperer\path\to\simpleserial-aes; make PLATFORM=$1 CRYPTO_TARGET=$2 SS_VER=$3"

Hi,

That didn’t seem to work. Got this response:
image

I’m not too sure then. I’d imagine there’s some way to do multi-line commands, but I’m not sure what it is.

HI @c64

I think the error in the first screenshot is that you are sending in a diferent line inside the ipython console.
You can send multiple line by typing Ctrl+Enter and then send the multiple line by typing Shift+Enter.

I don’t have acces to the chipwhiperer platform now, but I tested in spyder with an echo comand.
image

Hi,

Thank you. Well, for some reason it seems to work just fine now, by just copying and pasting into the IPython console:

image

I’m not really sure why it works now, cause the exact same procedure was done previously (copy and paste. This was done before I started executing the commands on separate lines, which was the start of this thread), and didn’t work. Also, the “!” mark in front of make needs to be deleted. In any case, I’m just happy it works :slight_smile:

1 Like