跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

What are the differences between the BSP stack, BSP heap and ThreadX stack and heap?

Latest Updated:10/04/2016

Question:

What are the differences between the BSP stack, BSP heap and ThreadX stack and heap?.

Answer:

Here are some details on the various dynamic memories used in SSP implementations:

-the BSP stack is the stack used during initialization, until ThreadX starts its first thread; or the only stack when no RTOS is used.

-the BSP heap is the one used by malloc, realloc, free.

-each thread in ThreadX has its own stack, independent of each other thread and the system (BSP).

-there is no thread specific heap. You can use the byte pool and/or block pool services from ThreadX for this.

-first_unused_memory points to the first available (free) RAM memory (that is, not allocated to variables, heap, stacks, etc).

-tx_application_define_user is called by the synergy generated code already, it shouldn't be called by the user code directly.