Regression test fixes

pull/765/head
Thomas Cook 2026-04-21 19:40:50 -04:00 committed by Daniele Lacamera
parent 01270723cf
commit 8d3f459d20
6 changed files with 95 additions and 80 deletions

View File

@ -31,10 +31,11 @@ FLASH_MULTI_SECTOR_ERASE?=1
WOLFCRYPT_TZ?=1
WOLFCRYPT_TZ_PKCS11?=1
# 1024-byte sector to accomodate RSA4096
WOLFBOOT_SECTOR_SIZE?=0x400
# use 1024-byte sector to accomodate RSA4096 signature
# WOLFBOOT_SECTOR_SIZE?=0x400
WOLFBOOT_SECTOR_SIZE?=0x200
# 200KB boot, 80KB keyvault, 8KB NSC, 56KB partitions, 1024 swap
# 200KB boot, 80KB keyvault, 8KB NSC, 56KB partitions, 512/1024 swap
WOLFBOOT_KEYVAULT_ADDRESS?=0x10032000
WOLFBOOT_KEYVAULT_SIZE?=0x14000
WOLFBOOT_NSC_ADDRESS?=0x10046000

View File

@ -29,21 +29,22 @@ DUALBANK_SWAP?=0
PKA?=1
FLASH_MULTI_SECTOR_ERASE?=1
# 1024-byte sector to accomodate RSA4096
WOLFBOOT_SECTOR_SIZE?=0x400
# use 1024-byte sector to accomodate RSA4096 signature
# WOLFBOOT_SECTOR_SIZE?=0x400
WOLFBOOT_SECTOR_SIZE?=0x200
# Default configuration
# 40KB boot, 44KB partitions, 1024 swap
#WOLFBOOT_PARTITION_SIZE?=0xB000
#WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xD000
#WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x18000
#WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x23000
# 44KB boot, 52KB partitions, 512/1024 swap
WOLFBOOT_PARTITION_SIZE?=0xB000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xD000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x18000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x23000
# use these for test/benchmark
WOLFBOOT_PARTITION_SIZE?=0x26000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x10000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x36000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x5C000
#WOLFBOOT_PARTITION_SIZE?=0x2b000
#WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x10000
#WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x3b000
#WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x66000
WOLFCRYPT_TEST?=1
WOLFCRYPT_BENCHMARK?=1
#WOLFCRYPT_TEST?=1
#WOLFCRYPT_BENCHMARK?=1

View File

@ -505,13 +505,17 @@ extern int tolower(int c);
#define CUSTOM_RAND_GENERATE_BLOCK my_rng_seed_gen
extern int my_rng_seed_gen(unsigned char* output, unsigned int sz);
#endif
#define HAVE_AESGCM
#define GCM_TABLE
#define HAVE_AES_ECB
#define WOLFSSL_AES_OFB
#define WOLFSSL_AES_CFB
#define WOLFSSL_AES_COUNTER
#if defined(WOLFSSL_NXP_LPC55S69) || defined(WOLFSSL_NXP_LPC55S69_NO_HWACCEL)
#define HAVE_AES_ECB
#define WOLFSSL_AES_OFB
#define WOLFSSL_AES_CFB
#define WOLFSSL_AES_COUNTER
#define WOLFSSL_STATIC_MEMORY_TEST_SZ (30 * 1024)
#endif
#else
#define HAVE_HASHDRBG
#define WOLFSSL_AES_CFB

View File

@ -1,10 +1,10 @@
_Min_Heap_Size = 0x00008000; /* minimal heap (not using malloc) */
_Min_Heap_Size = 0x00000100; /* minimal heap (not using malloc) */
_Min_Stack_Size = 0x00008000; /* required amount of stack */
MEMORY
{
FLASH (rx) : ORIGIN = @WOLFBOOT_TEST_APP_ADDRESS@, LENGTH = @WOLFBOOT_TEST_APP_SIZE@
RAM (rwx) : ORIGIN = 0x20020000, LENGTH = 96K
RAM (rwx) : ORIGIN = 0x20020000, LENGTH = 160K
}
SECTIONS

View File

@ -182,6 +182,9 @@ ifeq ($(WOLFCRYPT_SUPPORT),1)
# Add SP C math (all architectures)
APP_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sp_c32.o
# Add RSA support (needed by test suite)
APP_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/rsa.o
ifneq ($(NO_ASM),1)
# SP Cortex M
ifneq ($(filter ARM ARM_BE,$(ARCH)),)
@ -738,10 +741,8 @@ ifeq ($(TARGET),lpc55s69)
else
CFLAGS+=-DWOLFSSL_NXP_LPC55S69_NO_HWACCEL
endif
LIBS+=--specs=nano.specs
ifneq ($(WOLFCRYPT_SUPPORT),1)
# Only use nosys stubs when not providing our own syscalls
LDFLAGS+=--specs=nosys.specs
ifeq ($(WOLFCRYPT_SUPPORT),1)
LIBS+=--specs=nano.specs
endif
ifeq ($(WOLFCRYPT_BENCHMARK),1)
# Benchmark needs float printf for results

View File

@ -133,9 +133,11 @@ void main(void)
uint8_t boot_state, update_state;
hal_init();
systick_init();
leds_init();
#ifndef TZEN
systick_init();
__enable_irq();
#endif
wolfBoot_printf("\n==================================\n");
wolfBoot_printf("LPC55S69 wolfBoot demo Application\n");
@ -205,63 +207,69 @@ void main(void)
}
// #include "sys/stat.h"
// int _getpid(void)
// {
// return 1;
// }
#include "sys/stat.h"
int WEAKFUNCTION _getpid(void)
{
return 1;
}
// int _kill(int pid, int sig)
// {
// (void)pid;
// (void)sig;
// return -1;
// }
int WEAKFUNCTION _kill(int pid, int sig)
{
(void)pid;
(void)sig;
return -1;
}
// void _exit(int status)
// {
// _kill(status, -1);
// while (1) {}
// }
void WEAKFUNCTION _exit(int status)
{
_kill(status, -1);
while (1) {}
}
// int _read(int file, char *ptr, int len)
// {
// (void)file;
// (void)ptr;
// (void)len;
// return -1;
// }
int WEAKFUNCTION _read(int file, char *ptr, int len)
{
(void)file;
(void)ptr;
(void)len;
return -1;
}
// int _write(int file, char *ptr, int len)
// {
// (void)file;
// (void)ptr;
// return len;
// }
int WEAKFUNCTION _write(int file, char *ptr, int len)
{
(void)file;
(void)ptr;
return len;
}
// int _close(int file)
// {
// (void)file;
// return -1;
// }
int WEAKFUNCTION _close(int file)
{
(void)file;
return -1;
}
// int _isatty(int file)
// {
// (void)file;
// return 1;
// }
int WEAKFUNCTION _isatty(int file)
{
(void)file;
return 1;
}
// int _lseek(int file, int ptr, int dir)
// {
// (void)file;
// (void)ptr;
// (void)dir;
// return 0;
// }
int WEAKFUNCTION _lseek(int file, int ptr, int dir)
{
(void)file;
(void)ptr;
(void)dir;
return 0;
}
// int _fstat(int file, struct stat *st)
// {
// (void)file;
// st->st_mode = S_IFCHR;
// return 0;
// }
int WEAKFUNCTION _fstat(int file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
void WEAKFUNCTION *_sbrk(int incr)
{
(void)incr;
return 0;
}