-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add MCU client #179
Merged
Merged
Add MCU client #179
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will allow for other HTTP operations (POST, PUT, etc)
Still needs work: - Fails on key exchange for some reason - Still using *_VERIFY_NONE - Required significant RAM and stack increases
Mostly coloring and delays
…ttestation Mostly just required some asn1 parsing to extract the extension field from mbedtls's x509 structure
dominic-mulligan-arm
requested review from
dreemkiller,
ShaleXIONG and
dominic-mulligan-arm
July 22, 2021 08:29
Note that there is a bit of necessary duplication due to docker limiting access from the veracruz-mcu-client directory
…s own folder This also now means the MCU Veracruz client is much better integrated with Zephyr's build system, which should be helpful for integrating the library into existing Zephyr projects. This includes properly adding the various scripts into CMakeLists.txt, hooking the various configuration options into Kconfig.vc, and providing the necessary metadata to include the Veracruz library. The demo has been moved to the "samples" directory, as is common in Zephyr modules, with the Makefile still compiling the demo by default (since most inclusions of the library will bypass the Makefile for Zephyr's build system).
…ram/result access
Sizes at the time of writing, note this includes the full Zephyr OS: code static heap stack 180531 43802 45012 8264 make run_with_memory_report also generates detailed reports thanks to Zephyr's ram/rom reporting and Valgrind's Massif (heap/stack measurement). Note that this ends up measure ROM usage for thumb, and RAM for native (usually x86). This is a convenient trick for easily finding rough measurements since RAM does not change as much cross-platform.
Note that this isn't supported in the QEMU-based boards, so we fall back to the pseudorandom RNG in those cases (with compile-time warnings)
Before it has a beautiful mixture of hardcoded values and long command strings passed on the command line, the new version is quite a bit cleaner
This allows the logging to be disabled for a quieter stdout and smaller code size footprint
Due to popular demand
… of maintaining a copy I don't think there's a great solution to this, since of course symlinks from Docker to the containing directory won't work. Not even a Docker COPY works here because the relevant file is outside of the build context.
Currently just based on some arbitrary, but hopefully interesting, pattern matches. Here are the results at the time of writing: code static heap stack base64 607 0 0 0 main 568 0 0 0 mbedtls 92700 104 22668 0 nanopb 6502 0 0 0 net 34476 21680 0 0 policy 2820 0 0 0 vc 1318 920 6144 0 zephyr 13004 18153 3890 0 misc 7921 2825 2468 7416 TOTAL 177491 43802 44928 7416
Due to base64 encoding, we need to have a 4/3x larger CONFIG_VC_SEND_BUFFER than CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN. Curious why this wasn't failing earlier, most like due to the size of the binary changing due to upstream changes.
Rebased to pull in #192 and tested locally |
dreemkiller
approved these changes
Aug 12, 2021
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build-process
Something related to the Veracruz build process
client-code
Something related to client code for interacting with Veracruz
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note this is dependent on #75
Adds a MCU client and demo based on Zephyr OS. In order to test on Zephry OS, this uses a Docker image with the relevant build system, which makes things a bit complicated for both the build system and for networking.
To reproduce the demo you can follow the MCU_CLIENT_INSTRUCTIONS.markdown in the new veracruz-mcu-client directory.
Note that testing-wise, this is in the same state as #75. We can't easily add this into the CI until a CI friendly platform (Linux or IceCap) is merged. See #176 for more info.
Should resolve #41
TODO:
veracruz-mcu-client/demoveracruz-mcu-client/example unless anyone else has a better idea)