Skip to content

Commit

Permalink
samples: drivers: crypto: Add STM32 driver support
Browse files Browse the repository at this point in the history
Add STM32 CRYP driver support and a corresponding build-only test to
the crypto sample project.

Signed-off-by: Markus Fuchs <[email protected]>
  • Loading branch information
mrfuchs authored and galak committed Feb 7, 2020
1 parent b0fcb07 commit 2096091
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@
&usbotg_fs {
status = "okay";
};

&cryp {
status = "okay";
};
5 changes: 5 additions & 0 deletions samples/drivers/crypto/prj_stm32.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_LOG=y
CONFIG_MAIN_STACK_SIZE=4096

CONFIG_CRYPTO=y
CONFIG_CRYPTO_LOG_LEVEL_DBG=y
5 changes: 5 additions & 0 deletions samples/drivers/crypto/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ tests:
- ".*: CBC Mode"
- ".*: CTR Mode"
- ".*: CCM Mode"
sample.drivers.crypto.stm32:
tags: crypto
platform_whitelist: mikroe_mini_m4_for_stm32
build_only: true
extra_args: CONF_FILE=prj_stm32.conf
2 changes: 2 additions & 0 deletions samples/drivers/crypto/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ LOG_MODULE_REGISTER(main);
#define CRYPTO_DRV_NAME CONFIG_CRYPTO_TINYCRYPT_SHIM_DRV_NAME
#elif CONFIG_CRYPTO_MBEDTLS_SHIM
#define CRYPTO_DRV_NAME CONFIG_CRYPTO_MBEDTLS_SHIM_DRV_NAME
#elif CONFIG_CRYPTO_STM32
#define CRYPTO_DRV_NAME DT_INST_0_ST_STM32_CRYP_LABEL
#else
#error "You need to enable one crypto device"
#endif
Expand Down

0 comments on commit 2096091

Please sign in to comment.