Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,7 @@ ifeq ($(TARGET),lpc55s69)
-I$(MCUXPRESSO)/drivers/rng_1 \
-I$(MCUXPRESSO_CMSIS)/Include \
-I$(MCUXPRESSO_CMSIS)/Core/Include
CFLAGS+=-DWOLFSSL_NXP_RNG_1
CFLAGS+=-DCPU_$(MCUXPRESSO_CPU)
CFLAGS+=-DFSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL=1
CFLAGS+=-DFSL_SDK_DISABLE_DRIVER_RESET_CONTROL=1
Expand All @@ -1274,14 +1275,12 @@ ifeq ($(TARGET),lpc55s69)
$(MCUXPRESSO)/drivers/flexcomm/usart/fsl_usart.o
endif
ifeq ($(PKA),1)
CFLAGS+=-DWOLFSSL_NXP_LPC55S69_WITH_HWACCEL
CFLAGS+=-DWOLFSSL_NXP_LPC55S6X
OBJS+=\
$(MCUXPRESSO)/drivers/casper/fsl_casper.o \
$(MCUXPRESSO)/drivers/hashcrypt/fsl_hashcrypt.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/nxp/casper_port.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/nxp/hashcrypt_port.o
else
CFLAGS+=-DWOLFSSL_NXP_LPC55S69_NO_HWACCEL
endif
endif

Expand Down
7 changes: 2 additions & 5 deletions hal/lpc55s69.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,13 @@ void hal_init(void)
#ifdef __WOLFBOOT
/* lpc55s69 must run < 100 MHz for flash write/erase to work */
BOARD_BootClockFROHF96M();
// BOARD_BootClockPLL150M();

# ifdef DEBUG_UART
uart_init();
uart_write("lpc55s69 init\n", 14);
# endif

# ifdef WOLFSSL_NXP_LPC55S69_WITH_HWACCEL
# ifdef WOLFSSL_NXP_LPC55S6X
CLOCK_EnableClock(kCLOCK_HashCrypt);
wc_hashcrypt_init();
CLOCK_EnableClock(kCLOCK_Casper);
Expand All @@ -118,10 +117,8 @@ void hal_init(void)

CLOCK_EnableClock(kCLOCK_Rng);
RESET_PeripheralReset(kRNG_RST_SHIFT_RSTn);

#endif /* __WOLFBOOT */

RNG_Init(RNG);
#endif /* __WOLFBOOT */

#if defined(__WOLFBOOT) || !defined(TZEN)
memset(&pflash, 0, sizeof(pflash));
Expand Down
7 changes: 1 addition & 6 deletions include/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,7 @@ extern int tolower(int c);
#define NO_AES_CBC
#else
#if defined(WOLFCRYPT_TEST) || defined(WOLFCRYPT_BENCHMARK)
#if defined(WOLFSSL_NXP_LPC55S69_WITH_HWACCEL) \
|| defined(WOLFSSL_NXP_LPC55S69_NO_HWACCEL)
#ifdef TARGET_lpc55s69
/* use actual rng hardware for seed, HASHDRBG for generation */
#define HAVE_HASHDRBG
#define HAVE_AES_ECB
Expand Down Expand Up @@ -607,10 +606,6 @@ extern int tolower(int c);

/* wolfCrypt Test/Benchmark Configuration */
#ifdef WOLFCRYPT_TEST
#ifdef WOLFSSL_NXP_LPC55S69_WITH_HWACCEL
/* lpc55s69 hashcrypt hw does not support interleaving */
#define NO_WOLFSSL_SHA256_INTERLEAVE
#endif
/* Skip extended tests to save memory */
#define NO_CRYPT_TEST_EXTENDED
/* Use smaller certificate buffers */
Expand Down
5 changes: 2 additions & 3 deletions test-app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ endif

ifeq ($(TARGET),lpc55s69)
CFLAGS+=-ffunction-sections -fdata-sections
CFLAGS+=-DWOLFSSL_NXP_RNG_1
ifeq ($(TZEN),1)
LSCRIPT_TEMPLATE=ARM-lpc55s69-ns.ld
CFLAGS:=$(filter-out -mcmse, $(CFLAGS))
Expand All @@ -751,14 +752,12 @@ ifeq ($(TARGET),lpc55s69)
$(MCUXPRESSO)/drivers/lpc_gpio/fsl_gpio.o \
$(MCUXPRESSO)/drivers/rng_1/fsl_rng.o
ifeq ($(PKA),1)
CFLAGS+=-DWOLFSSL_NXP_LPC55S69_WITH_HWACCEL
CFLAGS+=-DWOLFSSL_NXP_LPC55S6X
APP_OBJS+=\
$(MCUXPRESSO)/drivers/casper/fsl_casper.o \
$(MCUXPRESSO)/drivers/hashcrypt/fsl_hashcrypt.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/nxp/casper_port.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/nxp/hashcrypt_port.o
else
CFLAGS+=-DWOLFSSL_NXP_LPC55S69_NO_HWACCEL
endif
ifeq ($(WOLFCRYPT_SUPPORT),1)
LDFLAGS+=--specs=nano.specs
Expand Down
1 change: 1 addition & 0 deletions tools/scripts/lpc55s69/lpc55s69_debug.cmm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SYStem.Up
;; STOP in wolfBoot...
data.load "&basedir\wolfboot.elf" /nocode
symbol.sourcepath.TranslateSUBpath "\home\tcook\wolf\wolfBoot" "&basedir"
symbol.sourcepath.TranslateSUBpath "\home\tcook\wolf\NXP" "&basedir\..\NXP"
Register.Set PC isr_reset
Register.Set MSP END_STACK
break.set main /onchip /temporary
Expand Down
3 changes: 3 additions & 0 deletions tools/scripts/lpc55s69/lpc55s69_flash_update.cmm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ SYStem.Up

DO ~~/demo/arm/flash/lpc55xx PREPAREONLY

; Change from 32KiB sector size to 512
flash.delete 1.
flash.create 1. 0x00000000--0x00097fff 0x200 TARGET Long

FLASH.ReProgram ALL
Data.LOAD.Binary "&basedir\test-app\image_v2_signed.bin" 0x18000
Expand Down
Loading