STM32CubeF1 icon indicating copy to clipboard operation
STM32CubeF1 copied to clipboard

no memory pool implementation in cmisi_os2.c

Open xhlinux opened this issue 2 years ago • 1 comments

such as:osMemoryPoolNew func is not implement, but defined in cmsis_os2.h

//  ==== Memory Pool Management Functions ====

/// Create and Initialize a Memory Pool object.
/// \param[in]     block_count   maximum number of memory blocks in memory pool.
/// \param[in]     block_size    memory block size in bytes.
/// \param[in]     attr          memory pool attributes; NULL: default values.
/// \return memory pool ID for reference by other functions or NULL in case of error.
osMemoryPoolId_t osMemoryPoolNew (uint32_t block_count, uint32_t block_size, const osMemoryPoolAttr_t *attr);

and in STM32Cube_FW_F1_V1.8.4\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os1.c

#if (defined(osFeature_Pool) && (osFeature_Pool != 0))&& !defined(os1_Disable_Pool)

osPoolId osPoolCreate (const osPoolDef_t *pool_def) {

  if (pool_def == NULL) {
    return NULL;
  }
  return osMemoryPoolNew(pool_def->pool_sz, pool_def->item_sz, &pool_def->attr);
}

but osMemoryPoolNew can't link,

so where is osMemoryPoolNew defined?

xhlinux avatar Jun 10 '22 04:06 xhlinux

ST Internal Reference: 131766

HBOSTM avatar Jul 15 '22 14:07 HBOSTM

Hi @xhlinux ,

The osMemoryPoolNew() API shall be defined by user application as requested in the cmsis_os2.h It is a function wrapper and up to user to define the memory used in his application. Otherwise we aren't owner on FreeRTOS MW stack, So please allow me to close this issue and thank you for your contribution.

With Regards,

HBOSTM avatar Apr 04 '23 12:04 HBOSTM