From 1ed774440af73f5a51496b8df0df9779d89d11e8 Mon Sep 17 00:00:00 2001 From: Yilin Sun Date: Tue, 24 Oct 2023 21:50:28 +0800 Subject: [PATCH] Use same stack size, fixed more __ALIGNED. Signed-off-by: Yilin Sun --- gcc/n32wb03x_FLASH.ld | 2 +- .../ns_ble_stack/stack_common/ble_stack_common.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/n32wb03x_FLASH.ld b/gcc/n32wb03x_FLASH.ld index cdb5951..7533f34 100644 --- a/gcc/n32wb03x_FLASH.ld +++ b/gcc/n32wb03x_FLASH.ld @@ -23,7 +23,7 @@ * limitations under the License. */ -__STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x400; +__STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x800; __HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x400; MEMORY diff --git a/middlewares/Nationstech/ble_library/ns_ble_stack/stack_common/ble_stack_common.h b/middlewares/Nationstech/ble_library/ns_ble_stack/stack_common/ble_stack_common.h index 4193c1f..54da4c3 100644 --- a/middlewares/Nationstech/ble_library/ns_ble_stack/stack_common/ble_stack_common.h +++ b/middlewares/Nationstech/ble_library/ns_ble_stack/stack_common/ble_stack_common.h @@ -123,21 +123,21 @@ typedef struct #if (_PATCH_LLD_COM_) -static __align(64) unsigned char patch_0_Array[0x40] = +static __ALIGNED(64) unsigned char patch_0_Array[0x40] = { 0xff, 0xff, 0xff, 0x07, 0xff, 0x7f, 0x00, 0x00, 0xcc, 0x03, 0x00, 0x20, 0x71, 0x02, 0x00, 0x00, 0x91, 0xd7, 0x02, 0x00, 0x00, 0x4a, 0x10, 0x47, 0x11, 0x11, 0x11, 0x11, 0x85, 0x00, 0x70, 0x59, 0x0c, 0x27, 0x0c, 0x46, 0x00, 0x28, 0x7d, 0xd1, 0x00, 0x21, 0x98, 0x20, 0xf5, 0xf7, 0x1e, 0xfe, 0x70, 0x51, 0x05, 0x00, 0x76, 0xd0, 0x00, 0x20, 0x00, 0x90, 0x03, 0xf0, 0x0f, 0xfe, 0x05, 0x90 }; -static __align(64) unsigned char patch_1_Array[0x40] = +static __ALIGNED(64) unsigned char patch_1_Array[0x40] = { 0x00, 0x2c, 0xf2, 0xda, 0x00, 0x20, 0x28, 0x60, 0x68, 0x60, 0xa8, 0x60, 0xe8, 0x60, 0x70, 0xbd, 0x70, 0x47, 0x00, 0x00, 0x10, 0x04, 0x00, 0x20, 0x00, 0x4a, 0x10, 0x47, 0x11, 0x11, 0x11, 0x11, 0x10, 0x86, 0x01, 0x22, 0x82, 0xf3, 0x10, 0x88, 0x01, 0x9a, 0x24, 0x4b, 0x95, 0x00, 0x5a, 0x59, 0x00, 0x2a, 0x3f, 0xd0, 0x17, 0x46, 0x80, 0x37, 0x51, 0x62, 0x78, 0x88, 0x08, 0x21, 0x08, 0x43 }; -static __align(64) unsigned char patch_2_Array[0x40] = +static __ALIGNED(64) unsigned char patch_2_Array[0x40] = { 0xa2, 0x64, 0x43, 0x8f, 0x52, 0x1b, 0x5b, 0x1e, 0x12, 0x01, 0x12, 0x09, 0x43, 0x87, 0x8a, 0x42, 0xf2, 0xd8, 0x00, 0x22, 0x29, 0x46, 0x01, 0x98, 0x00, 0xf0, 0xd6, 0xff, 0x00, 0x20, 0x86, 0xf3, @@ -145,7 +145,7 @@ static __align(64) unsigned char patch_2_Array[0x40] = 0x00, 0x94, 0x01, 0x4c, 0xa0, 0x47, 0x38, 0xbd, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x4c, 0xbd, 0x00 }; -static __align(64) unsigned char patch_3_Array[0x40] = +static __ALIGNED(64) unsigned char patch_3_Array[0x40] = { 0x01, 0x22, 0x82, 0xf3, 0x10, 0x88, 0x09, 0x4d, 0x82, 0x00, 0xaa, 0x58, 0x00, 0x2a, 0x09, 0xd0, 0x70, 0x22, 0x50, 0x43, 0x06, 0x4a, 0x80, 0x18, 0x40, 0x8d, 0x06, 0x4a, 0xc0, 0xb2, 0x52, 0x69, @@ -157,7 +157,7 @@ static __align(64) unsigned char patch_3_Array[0x40] = //#define ramcode_array_len 0x17b0 //#define ramcode_array_crc 0x4db4 -static __align(0x100) unsigned char lld_con_Array[] ={ +static __ALIGNED(0x100) unsigned char lld_con_Array[] ={ 0x40,0xba,0x70,0x47,0xc0,0xba,0x70,0x47,0x30,0xb5,0x0b,0x46,0x01,0x46,0x00,0x20, 0x20,0x22,0x01,0x24,0x09,0xe0,0x0d,0x46,0xd5,0x40,0x9d,0x42,0x05,0xd3,0x1d,0x46, 0x95,0x40,0x49,0x1b,0x25,0x46,0x95,0x40,0x40,0x19,0x15,0x46,0x52,0x1e,0x00,0x2d, @@ -541,7 +541,7 @@ static __align(0x100) unsigned char lld_con_Array[] ={ #endif //(_PATCH_LLD_COM_) #if (_PATCH_KE_MSG_SET_) -static __align(64) unsigned char patch_5_Array[] = +static __ALIGNED(64) unsigned char patch_5_Array[] = { 0x33,0x1a,0x2a,0x46,0x9a,0x40,0x0a,0x42,0x02,0xd1,0x40,0x1c,0x20,0x28,0xf7,0xd3, 0x30,0x1a,0x00,0x06,0x80,0x0d,0x00,0x19,0x40,0x68,0x00,0x28,0x00,0xd0,0x80,0x47, @@ -549,7 +549,7 @@ static __align(64) unsigned char patch_5_Array[] = 0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; -static __align(4) unsigned char fun_5_Array[] ={ +static __ALIGNED(4) unsigned char fun_5_Array[] ={ 0x10,0xb4,0xef,0xf3,0x10,0x81,0x01,0x22,0x82,0xf3,0x10,0x88,0x13,0x46,0x0a,0x28, 0x04,0xd2,0x06,0x4a,0x83,0x40,0x14,0x68,0x1c,0x43,0x14,0x60,0x01,0x20,0x04,0x4a, 0xc0,0x03,0x10,0x60,0x81,0xf3,0x10,0x88,0x10,0xbc,0x70,0x47,0xf8,0x01,0x00,0x20,