Can't program target

Hi everyone,

I’m trying to program the CW308T-SAM4L. I’ve tried following the instructions, but the link sends me to a Github 404 error (https://github.com/newaetech/chipwhisperer/tree/develop/hardware/victims/firmware/simpleserial-aes/ide_projects/asf/sam4l-simpleserial-aes).

I searched for the code manually, based on naming conventions in the image at: https://wiki.newae.com/CW308T-SAM4L#Adjusting_Hardware_AES

And found most of the files in the hal/ directory, with the exception of simpleserial-aes. I copied all of these files, including simpleserial-aes to a new directory and tried to import it as a project in Atmel Studio. This failed.

I found an old project file (since been deleted) in the Github commit history, and tried to copy that over to the folder and import the project again - this failed.

I tried to create a fresh project in Atmel studio, guessing the correct solutions files etc, and manually adding all the files to the project, and I get 37 build errors that are largely non-descriptive. E.g. the first error points to the makefile line which reads: “@echo Building file: $<” beneath the “./hwaes.o: …/./hwaes.c” line - the error simply says “recipe for target ‘hwaes.o’ failed”. There are also many errors that are similar to: “‘Aesa (aka union )’ has no member named ‘AESA_KEY’” in sam4l_hal.c during build.

I’m a bit lost as to how to build this, and as the commits have been deleted I don’t seem to be able to locate a pre-built option either.

I’m a little lost and don’t really know where to go from here.

Can you please help me get this project going?

Many thanks in advance.

Hi,

Sorry about the late reply. You’re right, it does look like the project directory was deleted in a previous commit. I’ve readded the project file in the latest github commit.

Alex

Thank you very much Alex. I’ll try it out! :smile:

Hi @Alex_Dewar,

I tried to import it in Atmel Studio 7 (freshly installed, latest version), and I receive the error “Value cannot be null. Parameter name URL”

I uninstalled Atmel Studio 7, and installed an older version 6.0.1996, and I can’t import the project in this one at all; error: “The selected file is a solution file, but was created by a newer version of this application and cannot be opened.”

Do you have any idea what the error message that shows up when I try to open the file in Atmel Studio 7 might be referring to?

Cheers.

Spent several hours googling a solution, coming up short though.

I also can’t find any parameters named URL in any of the files, so it’s not obvious to me what to try to fiddle with or what I should look at attempting next.

I’m still struggling to get any further with this. Any ideas @Alex_Dewar or @coflynn?

After a month away from the problem, I gave it another go over this last week. I’m still unable to get past these vague Value cannot be null: parameter URL errors.

Has anyone been able to build this project?

Sorry about that! Some of the project files hadn’t been committed; that was the reason for the cryptic Atmel Studio errors. Supporting the IDE can be a bit nightmarish, so Colin created a SAM4L makefile which allows it to be built on the command-line just like all the other targets. It’s on the develop branch.

So for example you can go to:
hardware/victims/firmware/simpleserial_aes/
and run:
make PLATFORM=CW308_SAM4L
(note no CRYPTO_TARGET options are supported here).
I don’t have a SAM4L target to test but I’m able to do a clean build. Let us know if you run into further issues!

Jean-Pierre

Thanks for this. Once I fetched Colins commit from a few days ago I was able to get this to build and get it onto the target.

Found the AES in the traces, but none of the existing leakage models have worked so far. So I guess it’s time I work out how to bake my own into the framework :stuck_out_tongue: