Skip to content

Commit

Permalink
Move the FreeRTOS heap to RAM2 and use all available space there
Browse files Browse the repository at this point in the history
The available heap now has a size of 16KB, which is the size of the second SRAM
bank on LPC1764
  • Loading branch information
Henrique Silva committed Sep 30, 2015
1 parent 7ac1625 commit 330d159
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FreeRTOS/heap_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ task.h is included from an application file. */
#if( configAPPLICATION_ALLOCATED_HEAP == 1 )
/* The application writer has already defined the array used for the RTOS
heap - probably so it can be placed in a special segment or address. */
extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
__attribute__ ((section(".noinit_RAM2"))) uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
#else
static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
#endif /* configAPPLICATION_ALLOCATED_HEAP */
Expand Down
2 changes: 1 addition & 1 deletion FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ licensing and training services.
#define configCPU_CLOCK_HZ ( ( unsigned long ) 8000000)
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 0x4000 ) )
#define configMAX_TASK_NAME_LEN ( 12 )
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 0
Expand Down

0 comments on commit 330d159

Please sign in to comment.