Skip to content

Commit

Permalink
fix:编译问题
Browse files Browse the repository at this point in the history
  • Loading branch information
allewalker committed Dec 28, 2024
1 parent d7bd3b5 commit 762d053
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions PLAT/os/freertos/CMSIS/common/src/mm_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ AP_PLAT_COMMON_BSS mm_trace_node_t *free_node;
------------------------------------------------------------------------------*/
MMDEBUG_TEXT_SECTION void mm_trace_init(void)
{
#ifdef __USER_CODE__
if (free_node) return;
#endif
struct mm_trace_node *node;
unsigned long index;

Expand Down Expand Up @@ -254,6 +257,27 @@ MMDEBUG_TEXT_SECTION void show_mem_trace(void)


#ifdef __USER_CODE__

MMDEBUG_TEXT_SECTION void mm_trace_init_cust(void)
{
mm_trace_init();
}

MMDEBUG_TEXT_SECTION void mm_free_trace_cust(void* buffer)
{
mm_free_trace(buffer);
}

MMDEBUG_TEXT_SECTION void mm_malloc_trace_cust(void* buffer, unsigned long length, unsigned int func_lr)
{
mm_malloc_trace(buffer, length, func_lr);
}

MMDEBUG_TEXT_SECTION void show_mem_trace_cust(void)
{
show_mem_trace();
}

#else
#if defined (PSRAM_FEATURE_ENABLE) && (PSRAM_EXIST==1)

Expand Down
2 changes: 2 additions & 0 deletions PLAT/os/freertos/src/heap_6.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ FREERTOS_HEAP6_TEXT_SECTION void GetSRAMHeapInfo(uint32_t *total, uint32_t *allo
xTaskResumeAll();
}

#ifdef TYPE_EC718M
FREERTOS_HEAP6_TEXT_SECTION void *pvPortMalloc_CUST( size_t xWantedSize, unsigned int funcPtr )
{
return pvPortMalloc_EC(xWantedSize, funcPtr);
Expand All @@ -403,6 +404,7 @@ FREERTOS_HEAP6_TEXT_SECTION void vPortFreeCust( void *pv )
if (pv != NULL)
vPortFreeEc( pv ) ;
}
#endif

#ifdef TYPE_EC718U
FREERTOS_HEAP6_TEXT_SECTION bool vPortGetHeapInfo(uint8_t type, int *mem_range)
Expand Down

0 comments on commit 762d053

Please sign in to comment.