File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -652,6 +652,7 @@ ifeq ($(WOLFCRYPT_TZ_PKCS11),1)
652652 CFLAGS+=-DCK_CALLABLE ="__attribute__((cmse_nonsecure_entry))"
653653 CFLAGS+ =-I$(WOLFBOOT_LIB_WOLFPKCS11 )
654654 CFLAGS+=-DWP11_HASH_PIN_COST =3
655+ LDFLAGS+=--specs =nano.specs
655656 WOLFCRYPT_OBJS+ =src/pkcs11_store.o
656657 WOLFCRYPT_OBJS+ =src/pkcs11_callable.o
657658 WOLFCRYPT_OBJS+ =$(WOLFBOOT_LIB_WOLFSSL ) /wolfcrypt/src/pwdbased.o
Original file line number Diff line number Diff line change @@ -66,19 +66,16 @@ extern unsigned int _heap_size; /* From linker script: heap limit */
6666void * _sbrk (unsigned int incr )
6767{
6868 static unsigned char * heap = (unsigned char * )& _start_heap ;
69- static uint32_t heapsize = (uint32_t )( & _heap_size ) ;
69+ static uint32_t heapsize = (uintptr_t ) & _heap_size ;
7070 void * old_heap = heap ;
7171 if (((incr >> 2 ) << 2 ) != incr )
7272 incr = ((incr >> 2 ) + 1 ) << 2 ;
7373
74- if (heap == NULL )
74+ if (heap == NULL ) {
7575 heap = (unsigned char * )& _start_heap ;
76- else
76+ old_heap = heap ;
77+ } else
7778 heap += incr ;
78- if (((uint32_t )heap - (uint32_t )(& _start_heap )) > heapsize ) {
79- heap -= incr ;
80- return NULL ;
81- }
8279 return old_heap ;
8380}
8481#endif
You can’t perform that action at this time.
0 commit comments