mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Changed the MicroBlaze demo back to using heap_3.c having updated the linker script generation.
This commit is contained in:
parent
08d7c89175
commit
39f8526265
|
@ -68,7 +68,7 @@ IF EXIST FreeRTOS_Source Goto END
|
||||||
copy %FREERTOS_SOURCE%\portable\MemMang\heap_3.c FreeRTOS_Source\portable\MemMang
|
copy %FREERTOS_SOURCE%\portable\MemMang\heap_3.c FreeRTOS_Source\portable\MemMang
|
||||||
|
|
||||||
REM Copy the basic memory allocation files into the BSP directory
|
REM Copy the basic memory allocation files into the BSP directory
|
||||||
copy %FREERTOS_SOURCE%\portable\MemMang\heap_2.c %BSP_SOURCE%\portable\MemMang
|
copy %FREERTOS_SOURCE%\portable\MemMang\heap_3.c %BSP_SOURCE%\portable\MemMang
|
||||||
|
|
||||||
REM Copy the files that define the common demo tasks.
|
REM Copy the files that define the common demo tasks.
|
||||||
copy %COMMON_SOURCE%\dynamic.c Demo_Source
|
copy %COMMON_SOURCE%\dynamic.c Demo_Source
|
||||||
|
|
|
@ -422,29 +422,37 @@ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
volatile size_t xFreeHeapSpace;
|
#ifdef EXAMPLE_CODE_ONLY
|
||||||
|
|
||||||
/* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set
|
The following code can only be included if heap_1.c or heap_2.c is used in
|
||||||
to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle
|
the project. By default, heap_3.c is used, so the example code is
|
||||||
task. It is essential that code added to this hook function never attempts
|
excluded. See http://www.freertos.org/a00111.html for more information on
|
||||||
to block in any way (for example, call xQueueReceive() with a block time
|
memory management options.
|
||||||
specified, or call vTaskDelay()). If the application makes use of the
|
|
||||||
vTaskDelete() API function (as this demo application does) then it is also
|
|
||||||
important that vApplicationIdleHook() is permitted to return to its calling
|
|
||||||
function, because it is the responsibility of the idle task to clean up
|
|
||||||
memory allocated by the kernel to any task that has since been deleted. */
|
|
||||||
|
|
||||||
/* This implementation of vApplicationIdleHook() simply demonstrates how
|
volatile size_t xFreeHeapSpace;
|
||||||
the xPortGetFreeHeapSize() function can be used. */
|
|
||||||
xFreeHeapSpace = xPortGetFreeHeapSize();
|
|
||||||
|
|
||||||
if( xFreeHeapSpace > 100 )
|
/* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set
|
||||||
{
|
to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle
|
||||||
/* By now, the kernel has allocated everything it is going to, so
|
task. It is essential that code added to this hook function never attempts
|
||||||
if there is a lot of heap remaining unallocated then
|
to block in any way (for example, call xQueueReceive() with a block time
|
||||||
the value of configTOTAL_HEAP_SIZE in FreeRTOSConfig.h can be
|
specified, or call vTaskDelay()). If the application makes use of the
|
||||||
reduced accordingly. */
|
vTaskDelete() API function (as this demo application does) then it is also
|
||||||
}
|
important that vApplicationIdleHook() is permitted to return to its calling
|
||||||
|
function, because it is the responsibility of the idle task to clean up
|
||||||
|
memory allocated by the kernel to any task that has since been deleted. */
|
||||||
|
|
||||||
|
/* This implementation of vApplicationIdleHook() simply demonstrates how
|
||||||
|
the xPortGetFreeHeapSize() function can be used. */
|
||||||
|
xFreeHeapSpace = xPortGetFreeHeapSize();
|
||||||
|
|
||||||
|
if( xFreeHeapSpace > 100 )
|
||||||
|
{
|
||||||
|
/* By now, the kernel has allocated everything it is going to, so
|
||||||
|
if there is a lot of heap remaining unallocated then
|
||||||
|
the value of configTOTAL_HEAP_SIZE in FreeRTOSConfig.h can be
|
||||||
|
reduced accordingly. */
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;
|
_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;
|
||||||
_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x8;
|
_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x10400;
|
||||||
|
|
||||||
/* Define Memories in the system */
|
/* Define Memories in the system */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue