diff --git a/Ubiquitous/XiZi/kernel/include/xs_msg.h b/Ubiquitous/XiZi/kernel/include/xs_msg.h index 39f9f9521..d21c785ae 100644 --- a/Ubiquitous/XiZi/kernel/include/xs_msg.h +++ b/Ubiquitous/XiZi/kernel/include/xs_msg.h @@ -33,7 +33,7 @@ struct MsgQueue { struct IdNode id; void *msg_buf; - uint16 index; + int16 index; uint16 num_msgs; uint16 each_len; uint16 max_msgs; diff --git a/Ubiquitous/XiZi/kernel/memory/byte_manage.c b/Ubiquitous/XiZi/kernel/memory/byte_manage.c index 15559795b..7529378c6 100644 --- a/Ubiquitous/XiZi/kernel/memory/byte_manage.c +++ b/Ubiquitous/XiZi/kernel/memory/byte_manage.c @@ -393,7 +393,7 @@ static void* BigMemMalloc(struct DynamicBuddyMemory *dynamic_buddy, x_size_t siz /* failure allocation */ if(result == NONE) { #ifndef MEM_EXTERN_SRAM - KPrintf("%s: allocation failed, size %d.\n", __func__,allocsize); + KPrintf("%s: allocation failed, size %d.\n", __func__,size); #endif return result; } @@ -527,7 +527,7 @@ static void SmallMemInit(struct ByteMemory *byte_memory) #ifdef MEM_STATS /* statistic static memory information */ - byte_memory->dynamic_buddy_manager.static_memory = SMALL_SIZE_64B(SIZEOF_64B) + SMALL_SIZE_32B(SIZEOF_32B); + byte_memory->dynamic_buddy_manager.static_memory = SMALL_NUMBER_64B * SIZEOF_64B + SMALL_NUMBER_32B * SIZEOF_32B; #endif } @@ -1174,10 +1174,10 @@ void ShowMemory(void); void ShowMemory(void) { int i = 0; - KPrintf("total memory: %d\n", ByteManager.dynamic_buddy_manager.dynamic_buddy_end - ByteManager.dynamic_buddy_manager.dynamic_buddy_start); + KPrintf("total memory: %d\n", ByteManager.dynamic_buddy_manager.dynamic_buddy_end - ByteManager.dynamic_buddy_manager.dynamic_buddy_start - SIZEOF_32B); KPrintf("used memory : %d\n", ByteManager.dynamic_buddy_manager.active_memory); KPrintf("maximum allocated memory: %d\n", ByteManager.dynamic_buddy_manager.max_ever_usedmem); - KPrintf("total cache szie: %d, %d/%d[32B],%d/%d[64B]\n", ByteManager.dynamic_buddy_manager.static_memory,ByteManager.static_manager[0].block_free_count,SMALL_NUMBER_32B,ByteManager.static_manager[1].block_free_count,SMALL_NUMBER_64B); + KPrintf("total cache size: %d, %d/%d[32B],%d/%d[64B]\n", ByteManager.dynamic_buddy_manager.static_memory,ByteManager.static_manager[0].block_free_count,SMALL_NUMBER_32B,ByteManager.static_manager[1].block_free_count,SMALL_NUMBER_64B); #ifdef MEM_EXTERN_SRAM for(i = 0; i < EXTSRAM_MAX_NUM; i++) { if(NONE != ExtByteManager[i].done){ diff --git a/Ubiquitous/XiZi/path_kernel.mk b/Ubiquitous/XiZi/path_kernel.mk index 46adf3b9f..c6ad6b9ba 100755 --- a/Ubiquitous/XiZi/path_kernel.mk +++ b/Ubiquitous/XiZi/path_kernel.mk @@ -289,7 +289,12 @@ KERNELPATHS += \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver/CMSIS/Include \ + -I$(BSP_ROOT)/xip \ -I$(KERNEL_ROOT)/include \ + -I$(KERNEL_ROOT)/resources/include \ + +ifeq ($(CONFIG_RESOURCES_LWIP),y) +KERNELPATHS += \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/compat \ @@ -298,9 +303,8 @@ KERNELPATHS += \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip/apps \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip/priv \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip/prot \ - -I$(KERNEL_ROOT)/resources/ethernet/LwIP/arch \ - -I$(KERNEL_ROOT)/resources/include \ - -I$(BSP_ROOT)/xip # + -I$(KERNEL_ROOT)/resources/ethernet/LwIP/arch +endif endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/stm32f103-nano)