Skip to content

Commit

Permalink
making variable volatile so it is not removed by the linker, needed f…
Browse files Browse the repository at this point in the history
…or the NXP TAD plugin
  • Loading branch information
Erich Styger committed Jul 29, 2016
1 parent 1dd319f commit 69d4334
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Drivers/freeRTOS/Source/portable/MemMang/heap_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ static void prvHeapInit( void );

/* The size of the structure placed at the beginning of each allocated memory
block must by correctly byte aligned. */
static const size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
#if 0
static const size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
#else /* << EST do not optimize this variable, needed for NXP TAD plugin */
static const volatile size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
#endif

/* Create a couple of list links to mark the start and end of the list. */
static BlockLink_t xStart, *pxEnd = NULL;
Expand Down

0 comments on commit 69d4334

Please sign in to comment.