forked from wolfSSL/wolfTPM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support for all TPM2 API's using TIS and SPI IO callback. * Helper for getting TPM return code string `TPM2_GetRCString`. * TPM 2.0 demo code in `examples/tpm/tpm2_demo.c` with support for STM32 CubeMX SPI as reference. Requires wolfSSL (wolfSSL/wolfssl#1344)
- Loading branch information
Showing
52 changed files
with
12,722 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.metadata | ||
language.settings.xml | ||
src/config.h.in | ||
autom4te.cache | ||
build-aux | ||
aclocal.m4 | ||
configure | ||
Makefile.in | ||
m4 | ||
aminclude.am | ||
config.log | ||
config.status | ||
libtool | ||
Makefile | ||
wolftpm-config | ||
.dirstamp | ||
*.la | ||
*.lo | ||
config.h | ||
stamp-h1 | ||
test-suite.log | ||
src/.deps | ||
src/.libs |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>wolfSTM32_CubeMX</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<triggers>clean,full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
<nature>fr.ac6.mcu.ide.core.MCUProjectNature</nature> | ||
</natures> | ||
</projectDescription> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* wolftpm_example.h | ||
* | ||
* Copyright (C) 2006-2017 wolfSSL Inc. | ||
* | ||
* This file is part of wolfSSL. (formerly known as CyaSSL) | ||
* | ||
* wolfTPM is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* wolfTPM is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
*/ | ||
|
||
|
||
#ifndef WOLFTPM_EXAMPLE_H_ | ||
#define WOLFTPM_EXAMPLE_H_ | ||
|
||
#include <stm32f4xx_hal.h> | ||
#include <stm32f4xx.h> | ||
#include <cmsis_os.h> | ||
|
||
#ifdef HAVE_CONFIG_H | ||
#include <config.h> | ||
#endif | ||
|
||
#ifndef WOLFSSL_USER_SETTINGS | ||
#include <wolfssl/options.h> | ||
#endif | ||
#include <wolfssl/wolfcrypt/settings.h> | ||
#include <wolfssl/ssl.h> | ||
#include <wolfcrypt/test/test.h> | ||
#include <wolfcrypt/benchmark/benchmark.h> | ||
|
||
#include <wolftpm/tpm2.h> | ||
|
||
void wolfTPMDemo(void const * argument); | ||
|
||
|
||
#endif /* WOLFTPM_EXAMPLE_H_ */ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# wolfSSL STM32F2/F4 Example for Open STM32 Tools System Workbench | ||
|
||
|
||
## Requirements | ||
|
||
* STM32CubeMX: STM32 CubeMX HAL code generation tool - [http://www.st.com/en/development-tools/stm32cubemx.html](http://www.st.com/en/development-tools/stm32cubemx.html) | ||
* SystemWorkbench for STM32 - [http://www.st.com/en/development-tools/sw4stm32.html](http://www.st.com/en/development-tools/sw4stm32.html) | ||
|
||
## Setup | ||
|
||
1. Using the STM32CubeMX tool, load the `<wolfssl-root>/IDE/OPENSTM32/wolfSTM32.ino` file. | ||
2. Adjust the HAL options based on your specific micro-controller. | ||
3. Generate source code. | ||
4. Run `SystemWorkbench` and choose a new workspace location for this project. | ||
5. Import `wolfSTM32' project from `<wolfssl-root>/IDE/OPENSTM32/`. | ||
6. Adjust the micro-controller define in `Project Settings -> C/C++ General -> Paths and Symbols -> Symbols -> GNU C`. Example uses `STM32F437xx`, but should be changed to reflect your micro-controller type. | ||
7. Build and Run | ||
|
||
Note: You may need to manually copy over the CubeMX HAL files for `stm32f4xx_hal_cryp.c`, `stm32f4xx_hal_cryp_ex.c`, `stm32f4xx_hal_cryp.h`, `stm32f4xx_hal_cryp_ex.h`. Also uncomment the `#define HAL_CRYP_MODULE_ENABLED` line in `stm32f4xx_hal_conf.h`. | ||
|
||
## Configuration | ||
|
||
The settings for the wolfSTM32 project are located in `<wolfssl-root>/IDE/OPENSTM32/Inc/user_settings.h`. | ||
|
||
## Support | ||
|
||
For questions please email [[email protected]](mailto:[email protected]) |
Oops, something went wrong.