Skip to content

Commit aff2072

Browse files
danielinuxdgarske
authored andcommitted
Demo app: added test, benchmark, other gadgets
1 parent 34d5ec1 commit aff2072

6 files changed

Lines changed: 404 additions & 46 deletions

File tree

hal/uart/uart_drv_stm32h5.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static int uart1_tx(const uint8_t c)
151151
return 1;
152152
}
153153

154-
static int uart1_rx(uint8_t *c, int len)
154+
static int uart1_rx(uint8_t *c)
155155
{
156156
volatile uint32_t reg;
157157
int i = 0;
@@ -219,7 +219,7 @@ static int uart3_tx(const uint8_t c)
219219
return 1;
220220
}
221221

222-
static int uart3_rx(uint8_t *c, int len)
222+
static int uart3_rx(uint8_t *c)
223223
{
224224
volatile uint32_t reg;
225225
int i = 0;
@@ -249,12 +249,12 @@ int uart_tx(const uint8_t c)
249249
#endif
250250
}
251251

252-
int uart_rx(uint8_t *c, int len)
252+
int uart_rx(uint8_t *c)
253253
{
254254
#if USE_UART1
255-
return uart1_rx(c, len);
255+
return uart1_rx(c);
256256
#else
257-
return uart3_rx(c, len);
257+
return uart3_rx(c);
258258
#endif
259259
}
260260

src/boot_arm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ void RAMFUNCTION do_boot(const uint32_t *app_offset)
364364
/* Jump to non secure app_entry */
365365
asm volatile("mov r7, %0" ::"r"(app_entry));
366366
asm volatile("bic.w r7, r7, #1");
367+
/* Re-enable interrupts to allow non-secure OS handlers */
368+
asm volatile("cpsie i");
367369
asm volatile("blxns r7" );
368370
# else
369371
asm volatile("msr msp, %0" ::"r"(app_end_stack));

test-app/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,19 @@ ifeq ($(TARGET),stm32h5)
157157
ifeq ($(TZEN),1)
158158
LSCRIPT_TEMPLATE=ARM-stm32h5-ns.ld
159159
APP_OBJS+=wcs/wolfcrypt_secure.o
160+
APP_OBJS+=../lib/wolfssl/wolfcrypt/src/logging.o
160161
else
161162
LSCRIPT_TEMPLATE=ARM-stm32h5.ld
162163
endif
164+
CFLAGS+=-DAPP_HAS_SYSTICK
163165
CFLAGS+=-mcpu=cortex-m33 -ffunction-sections -fdata-sections -fno-common
164166
LDFLAGS+=-mcpu=cortex-m33
165167
LDFLAGS+=-Wl,-gc-sections -Wl,-Map=image.map
166168
CFLAGS+=-I..
167169
APP_OBJS+=../hal/uart/uart_drv_$(UART_TARGET).o
170+
APP_OBJS+=../src/flash_otp_keystore.o
171+
APP_OBJS+=../lib/wolfssl/wolfcrypt/benchmark/benchmark.o
172+
APP_OBJS+=../lib/wolfssl/wolfcrypt/test/test.o
168173
endif
169174

170175
ifeq ($(TARGET),stm32u5)

0 commit comments

Comments
 (0)