diff --git a/arch.mk b/arch.mk index da9368a6..4fead406 100644 --- a/arch.mk +++ b/arch.mk @@ -164,7 +164,16 @@ ifeq ($(TARGET),psoc6) $(CYPRESS_PDL)/drivers/source/cy_ble_clk.o \ $(CYPRESS_PDL)/drivers/source/cy_wdt.o \ $(CYPRESS_PDL)/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.o \ - $(CYPRESS_PDL)/devices/templates/COMPONENT_MTB/COMPONENT_CM0P/system_psoc6_cm0plus.o + $(CYPRESS_PDL)/devices/templates/COMPONENT_MTB/COMPONENT_CM0P/system_psoc6_cm0plus.o \ + ./lib/wolfssl/wolfcrypt/src/port/cypress/psoc6_crypto.o \ + $(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v2.o \ + $(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v1.o \ + $(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v2.o \ + $(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v1.o \ + $(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw.o \ + $(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw_v1.o \ + $(CYPRESS_PDL)/drivers/source/cy_crypto.o + CFLAGS+=-I$(CYPRESS_PDL)/drivers/include/ \ -I$(CYPRESS_PDL)/devices/include \ -I$(CYPRESS_PDL)/cmsis/include \ @@ -172,7 +181,8 @@ ifeq ($(TARGET),psoc6) -I$(CYPRESS_CORE_LIB)/include \ -I$(CYPRESS_PDL)/devices/include/ip \ -I$(CYPRESS_PDL)/devices/templates/COMPONENT_MTB \ - -DCY8C624ABZI_D44 + -DCY8C624ABZI_D44 \ + -DWOLFSSL_PSOC6_CRYPTO ARCH_FLASH_OFFSET=0x10000000 endif diff --git a/hal/psoc6.c b/hal/psoc6.c index 6619bd85..f4932e67 100644 --- a/hal/psoc6.c +++ b/hal/psoc6.c @@ -31,6 +31,7 @@ #include "cy_sysclk.h" #include "cy_syslib.h" #include "cy_ipc_drv.h" +#include "wolfssl/wolfcrypt/port/cypress/psoc6_crypto.h" #include "psoc6_02_config.h" @@ -100,6 +101,7 @@ void hal_init(void) Cy_PDL_Init(CY_DEVICE_CFG); Cy_Flash_Init(); hal_set_pll(); + psoc6_crypto_port_init(); } void hal_prepare_boot(void) diff --git a/lib/wolfssl b/lib/wolfssl index a104caef..0bd1ef06 160000 --- a/lib/wolfssl +++ b/lib/wolfssl @@ -1 +1 @@ -Subproject commit a104caef130ec58027f51d99b8254af83f5c744f +Subproject commit 0bd1ef064ca76b636ed5a23a92e5e3302e7aaf01