-
Notifications
You must be signed in to change notification settings - Fork 9
Add support to ESP32C3 #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
It's worth mentioning that the baud rate is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested that everything works. What is a little weird to me is that the flashing and the printing of the output are done over the same USB device? How do you run this in parallel?
What's printed as cycle counts seems way too low for me (this is for Kyber-512):
+
keypair cycles
94613
encaps cycles
80242
decaps cycles
106573
$
We should except something over 1M cycles for encapsulation according to https://eprint.iacr.org/2020/049.pdf.
Do you think adding emulation with qemu is going to be easy? |
I flashed it, and run the pyserial then, reset the board. |
I will also look into the clock configuration as well |
Adding emulation with qemu might need to write another linker script, but if you already had some working examples, then it shouldn't be too hard or complicated I expect. |
Signed-off-by: Thing-han, Lim <[email protected]>
For
and for
should be some reasonable cycle counts for me |
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
stack api are updated, and the resulting stack size is as follow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's confusing that if I run tests --list-platforms
it lists esp32-c3
, but if I run tests func esp32-c3
it prints unsupported platform {platform}
.
Let's not offer the option in the scripts until it's support.
Thanks @potsrevennil! This is looking great! There is also some gibberish in the beginning of the output (that is sent at 115200 baud; while the rest is at 38400) . You'll either have to switch to 115200 everywhere or need to change the baud rate at an earlier boot stage. Or somehow turn off that that is printed. Here is the output
Integration with the scripts is still needed (and looks rather annoying since flashing and output are going through the same serial device). Please open an issue for that. |
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This all looks good now! We can merge this once CI passes!
Thanks for all this work, @potsrevennil!
We could consider putting this into https://github.com/mupq/pqriscv as well in case @rpls thinks it is useful.
depends on #48
This PR added
esp32c3
support to the build systemrunning
should be able to compile the binary for all tests (test/speed/stack/nistkat).
Then flash to the
esp32c3
device withwhere
PORT
start with/dev/tty
and/dev/cu
on Linux and macOS respectively.This is not integrated to the
tests
script yet, there will be a separate PR for this.You can receive serial output from the same device (after resetting the board) - the baud rate is 115200:
Building the artifacts for
esp32c3
is included in CI as well.UPDATE:
Cycle Count
Stack Usage