Skip to content

Commit

Permalink
test-size: use 'strip' to remove libc debug symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinux committed Sep 12, 2023
1 parent 1d7bc4f commit c078159
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/examples/stm32l5-nonsecure-dualbank.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ V?=0
SPMATH?=1
RAM_CODE?=0
DUALBANK_SWAP?=1
WOLFBOOT_PARTITION_SIZE?=0x38000
WOLFBOOT_PARTITION_SIZE?=0x30000
WOLFBOOT_SECTOR_SIZE?=0x2000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08008000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x08108000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08010000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x08110000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xFFFFFFFF
7 changes: 6 additions & 1 deletion include/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ extern int tolower(int c);

/* Some ECC options are disabled to reduce size */
# if !defined(WOLFCRYPT_SECURE_MODE)
# ifndef WOLFBOOT_TPM
# if !defined(WOLFBOOT_TPM)
# define NO_ECC_SIGN
# define NO_ECC_DHE
# define NO_ECC_EXPORT
# define NO_ECC_KEY_EXPORT
# else
Expand Down Expand Up @@ -132,6 +133,10 @@ extern int tolower(int c);
# ifdef WOLFBOOT_SIGN_ECC256
# define HAVE_ECC256
# define FP_MAX_BITS (256 + 32)
# if !defined(USE_FAST_MATH) && !defined(WOLFSSL_SP_MATH_ALL)
# define WOLFSSL_SP_NO_384
# define WOLFSSL_SP_NO_521
# endif
# elif defined(WOLFBOOT_SIGN_ECC384)
# define HAVE_ECC384
# define FP_MAX_BITS (384 * 2)
Expand Down
3 changes: 2 additions & 1 deletion tools/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ $(BINASSEMBLE):
test-size: FORCE
$(Q)make clean
$(Q)make wolfboot.bin
$(Q)$(CROSS_COMPILE)strip wolfboot.elf
$(Q)FP=`$(SIZE) -A wolfboot.elf | awk ' /Total/ {print $$2;}'`; echo SIZE: $$FP LIMIT: $$LIMIT; test $$FP -le $$LIMIT

# Testbed actions
Expand Down Expand Up @@ -949,7 +950,7 @@ test-size-all:
make keysclean
make test-size SIGN=ECC256 NO_ASM=1 LIMIT=13706
make keysclean
make test-size SIGN=RSA2048 LIMIT=11186
make test-size SIGN=RSA2048 LIMIT=11226
make keysclean
make test-size SIGN=RSA2048 NO_ASM=1 LIMIT=11166
make keysclean
Expand Down

0 comments on commit c078159

Please sign in to comment.