Marking local functions: vPortRaiseBASEPRI Marking externally visible functions: vPortGetHeapStats vPortInitialiseBlocks xPortGetMinimumEverFreeHeapSize xPortGetFreeHeapSize vPortFree pvPortMalloc Marking externally visible variables: Reclaiming functions: Reclaiming variables: Clearing address taken flags: Symbol table: vPortExitCritical/24 (vPortExitCritical) @06becee0 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: Called by: vPortGetHeapStats/20 Calls: vPortEnterCritical/23 (vPortEnterCritical) @06becd20 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: Called by: vPortGetHeapStats/20 Calls: xTaskResumeAll/22 (xTaskResumeAll) @06bec380 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13 Calls: vTaskSuspendAll/21 (vTaskSuspendAll) @06bec1c0 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13 Calls: vPortGetHeapStats/20 (vPortGetHeapStats) @06bdd2a0 Type: function definition analyzed Visibility: force_output externally_visible no_reorder public References: xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulFrees/11 (read)xMinimumEverFreeBytesRemaining/9 (read) Referring: Availability: available Function flags: body Called by: Calls: vPortExitCritical/24 vPortEnterCritical/23 xTaskResumeAll/22 vTaskSuspendAll/21 prvInsertBlockIntoFreeList/19 (prvInsertBlockIntoFreeList) @06bddee0 Type: function definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: xStart/6 (addr)pxEnd/7 (read)pxEnd/7 (read) Referring: Availability: available Function flags: body Called by: vPortFree/14 pvPortMalloc/13 Calls: prvHeapInit/18 (prvHeapInit) @06bddc40 Type: function definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: ucHeap/4 (addr)ucHeap/4 (addr)xStart/6 (write)xStart/6 (write)pxEnd/7 (write)pxEnd/7 (read)pxEnd/7 (read)pxEnd/7 (read)xMinimumEverFreeBytesRemaining/9 (write)xFreeBytesRemaining/8 (write)xBlockAllocatedBit/12 (write) Referring: Availability: available Function flags: body Called by: pvPortMalloc/13 Calls: vPortInitialiseBlocks/17 (vPortInitialiseBlocks) @06bdd9a0 Type: function definition analyzed Visibility: force_output externally_visible no_reorder public References: Referring: Availability: available Function flags: body Called by: Calls: xPortGetMinimumEverFreeHeapSize/16 (xPortGetMinimumEverFreeHeapSize) @06bdd700 Type: function definition analyzed Visibility: force_output externally_visible no_reorder public References: xMinimumEverFreeBytesRemaining/9 (read) Referring: Availability: available Function flags: body Called by: Calls: xPortGetFreeHeapSize/15 (xPortGetFreeHeapSize) @06bdd460 Type: function definition analyzed Visibility: force_output externally_visible no_reorder public References: xFreeBytesRemaining/8 (read) Referring: Availability: available Function flags: body Called by: Calls: vPortFree/14 (vPortFree) @06bdd1c0 Type: function definition analyzed Visibility: force_output externally_visible no_reorder public References: xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xNumberOfSuccessfulFrees/11 (read)xNumberOfSuccessfulFrees/11 (write) Referring: Availability: available Function flags: body Called by: Calls: xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 vTaskSuspendAll/21 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 pvPortMalloc/13 (pvPortMalloc) @06bd7e00 Type: function definition analyzed Visibility: force_output externally_visible no_reorder public References: pxEnd/7 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xStart/6 (addr)xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xFreeBytesRemaining/8 (read)xMinimumEverFreeBytesRemaining/9 (read)xFreeBytesRemaining/8 (read)xMinimumEverFreeBytesRemaining/9 (write)xBlockAllocatedBit/12 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulAllocations/10 (write) Referring: Availability: available Function flags: body Called by: Calls: vPortRaiseBASEPRI/1 xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 prvHeapInit/18 vTaskSuspendAll/21 xBlockAllocatedBit/12 (xBlockAllocatedBit) @06c27678 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)vPortFree/14 (read)vPortFree/14 (read)vPortFree/14 (read)prvHeapInit/18 (write) Availability: available Varpool flags: initialized xNumberOfSuccessfulFrees/11 (xNumberOfSuccessfulFrees) @06c275e8 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: vPortFree/14 (read)vPortFree/14 (write)vPortGetHeapStats/20 (read) Availability: available Varpool flags: initialized xNumberOfSuccessfulAllocations/10 (xNumberOfSuccessfulAllocations) @06c275a0 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (write)vPortGetHeapStats/20 (read) Availability: available Varpool flags: initialized xMinimumEverFreeBytesRemaining/9 (xMinimumEverFreeBytesRemaining) @06c27558 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (write)xPortGetMinimumEverFreeHeapSize/16 (read)prvHeapInit/18 (write)vPortGetHeapStats/20 (read) Availability: available Varpool flags: initialized xFreeBytesRemaining/8 (xFreeBytesRemaining) @06c27510 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)pvPortMalloc/13 (write)pvPortMalloc/13 (read)pvPortMalloc/13 (read)vPortFree/14 (read)vPortFree/14 (write)xPortGetFreeHeapSize/15 (read)prvHeapInit/18 (write)vPortGetHeapStats/20 (read) Availability: available Varpool flags: initialized pxEnd/7 (pxEnd) @06c27480 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)prvHeapInit/18 (read)prvHeapInit/18 (read)prvHeapInit/18 (read)prvInsertBlockIntoFreeList/19 (read)prvInsertBlockIntoFreeList/19 (read)vPortGetHeapStats/20 (read) Availability: available Varpool flags: initialized xStart/6 (xStart) @06c273f0 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: pvPortMalloc/13 (addr)pvPortMalloc/13 (read)prvHeapInit/18 (write)prvHeapInit/18 (write)prvInsertBlockIntoFreeList/19 (addr)vPortGetHeapStats/20 (read) Availability: available Varpool flags: xHeapStructSize/5 (xHeapStructSize) @06c27360 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: Availability: available Varpool flags: initialized read-only const-value-known ucHeap/4 (ucHeap) @06c27120 Type: variable definition analyzed Visibility: force_output no_reorder prevailing_def_ironly References: Referring: prvHeapInit/18 (addr)prvHeapInit/18 (addr) Availability: available Varpool flags: vPortRaiseBASEPRI/1 (vPortRaiseBASEPRI) @06b79d20 Type: function definition analyzed Visibility: no_reorder prevailing_def_ironly References: Referring: Availability: local Function flags: body local Called by: vPortFree/14 vPortFree/14 pvPortMalloc/13 pvPortMalloc/13 pvPortMalloc/13 Calls: vPortGetHeapStats (struct HeapStats_t * pxHeapStats) { size_t xMinSize; size_t xMaxSize; size_t xBlocks; struct BlockLink_t * pxBlock; : xBlocks = 0; xMaxSize = 0; xMinSize = 4294967295; vTaskSuspendAll (); pxBlock = xStart.pxNextFreeBlock; if (pxBlock != 0B) goto ; [INV] else goto ; [INV] : xBlocks = xBlocks + 1; _1 = pxBlock->xBlockSize; if (xMaxSize < _1) goto ; [INV] else goto ; [INV] : xMaxSize = pxBlock->xBlockSize; : _2 = pxBlock->xBlockSize; if (xMinSize > _2) goto ; [INV] else goto ; [INV] : xMinSize = pxBlock->xBlockSize; : pxBlock = pxBlock->pxNextFreeBlock; pxEnd.32_3 = pxEnd; if (pxBlock != pxEnd.32_3) goto ; [INV] else goto ; [INV] : xTaskResumeAll (); pxHeapStats->xSizeOfLargestFreeBlockInBytes = xMaxSize; pxHeapStats->xSizeOfSmallestFreeBlockInBytes = xMinSize; pxHeapStats->xNumberOfFreeBlocks = xBlocks; vPortEnterCritical (); xFreeBytesRemaining.33_4 = xFreeBytesRemaining; pxHeapStats->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.33_4; xNumberOfSuccessfulAllocations.34_5 = xNumberOfSuccessfulAllocations; pxHeapStats->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.34_5; xNumberOfSuccessfulFrees.35_6 = xNumberOfSuccessfulFrees; pxHeapStats->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.35_6; xMinimumEverFreeBytesRemaining.36_7 = xMinimumEverFreeBytesRemaining; pxHeapStats->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.36_7; vPortExitCritical (); return; } prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert) { uint8_t * puc; struct BlockLink_t * pxIterator; : pxIterator = &xStart; goto ; [INV] : pxIterator = pxIterator->pxNextFreeBlock; : _1 = pxIterator->pxNextFreeBlock; if (pxBlockToInsert > _1) goto ; [INV] else goto ; [INV] : puc = pxIterator; _2 = pxIterator->xBlockSize; _3 = puc + _2; if (pxBlockToInsert == _3) goto ; [INV] else goto ; [INV] : _4 = pxIterator->xBlockSize; _5 = pxBlockToInsert->xBlockSize; _6 = _4 + _5; pxIterator->xBlockSize = _6; pxBlockToInsert = pxIterator; : puc = pxBlockToInsert; _7 = pxBlockToInsert->xBlockSize; _8 = puc + _7; _9 = pxIterator->pxNextFreeBlock; if (_8 == _9) goto ; [INV] else goto ; [INV] : _10 = pxIterator->pxNextFreeBlock; pxEnd.30_11 = pxEnd; if (_10 != pxEnd.30_11) goto ; [INV] else goto ; [INV] : _12 = pxBlockToInsert->xBlockSize; _13 = pxIterator->pxNextFreeBlock; _14 = _13->xBlockSize; _15 = _12 + _14; pxBlockToInsert->xBlockSize = _15; _16 = pxIterator->pxNextFreeBlock; _17 = _16->pxNextFreeBlock; pxBlockToInsert->pxNextFreeBlock = _17; goto ; [INV] : pxEnd.31_18 = pxEnd; pxBlockToInsert->pxNextFreeBlock = pxEnd.31_18; goto ; [INV] : _19 = pxIterator->pxNextFreeBlock; pxBlockToInsert->pxNextFreeBlock = _19; : if (pxIterator != pxBlockToInsert) goto ; [INV] else goto ; [INV] : pxIterator->pxNextFreeBlock = pxBlockToInsert; : return; } prvHeapInit () { size_t xTotalHeapSize; size_t uxAddress; uint8_t * pucAlignedHeap; struct BlockLink_t * pxFirstFreeBlock; : xTotalHeapSize = 8192; uxAddress = (size_t) &ucHeap; _1 = uxAddress & 7; if (_1 != 0) goto ; [INV] else goto ; [INV] : uxAddress = uxAddress + 7; uxAddress = uxAddress & 4294967288; _2 = xTotalHeapSize - uxAddress; ucHeap.22_3 = (unsigned int) &ucHeap; xTotalHeapSize = _2 + ucHeap.22_3; : pucAlignedHeap = (uint8_t *) uxAddress; xStart.pxNextFreeBlock = pucAlignedHeap; xStart.xBlockSize = 0; pucAlignedHeap.23_4 = (unsigned int) pucAlignedHeap; uxAddress = xTotalHeapSize + pucAlignedHeap.23_4; xHeapStructSize.24_5 = 8; uxAddress = uxAddress - xHeapStructSize.24_5; uxAddress = uxAddress & 4294967288; uxAddress.25_6 = (struct BlockLink_t *) uxAddress; pxEnd = uxAddress.25_6; pxEnd.26_7 = pxEnd; pxEnd.26_7->xBlockSize = 0; pxEnd.27_8 = pxEnd; pxEnd.27_8->pxNextFreeBlock = 0B; pxFirstFreeBlock = pucAlignedHeap; pxFirstFreeBlock.28_9 = (unsigned int) pxFirstFreeBlock; _10 = uxAddress - pxFirstFreeBlock.28_9; pxFirstFreeBlock->xBlockSize = _10; pxEnd.29_11 = pxEnd; pxFirstFreeBlock->pxNextFreeBlock = pxEnd.29_11; _12 = pxFirstFreeBlock->xBlockSize; xMinimumEverFreeBytesRemaining = _12; _13 = pxFirstFreeBlock->xBlockSize; xFreeBytesRemaining = _13; xBlockAllocatedBit = 2147483648; return; } vPortInitialiseBlocks () { : return; } xPortGetMinimumEverFreeHeapSize () { size_t D.6339; : D.6339 = xMinimumEverFreeBytesRemaining; : : return D.6339; } xPortGetFreeHeapSize () { size_t D.6337; : D.6337 = xFreeBytesRemaining; : : return D.6337; } vPortFree (void * pv) { struct BlockLink_t * pxLink; uint8_t * puc; : puc = pv; if (pv != 0B) goto ; [INV] else goto ; [INV] : xHeapStructSize.16_1 = 8; _2 = -xHeapStructSize.16_1; puc = puc + _2; pxLink = puc; _3 = pxLink->xBlockSize; xBlockAllocatedBit.17_4 = xBlockAllocatedBit; _5 = _3 & xBlockAllocatedBit.17_4; if (_5 == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _6 = pxLink->pxNextFreeBlock; if (_6 != 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _7 = pxLink->xBlockSize; xBlockAllocatedBit.18_8 = xBlockAllocatedBit; _9 = _7 & xBlockAllocatedBit.18_8; if (_9 != 0) goto ; [INV] else goto ; [INV] : _10 = pxLink->pxNextFreeBlock; if (_10 == 0B) goto ; [INV] else goto ; [INV] : _11 = pxLink->xBlockSize; xBlockAllocatedBit.19_12 = xBlockAllocatedBit; _13 = ~xBlockAllocatedBit.19_12; _14 = _11 & _13; pxLink->xBlockSize = _14; vTaskSuspendAll (); _15 = pxLink->xBlockSize; xFreeBytesRemaining.20_16 = xFreeBytesRemaining; _17 = _15 + xFreeBytesRemaining.20_16; xFreeBytesRemaining = _17; prvInsertBlockIntoFreeList (pxLink); xNumberOfSuccessfulFrees.21_18 = xNumberOfSuccessfulFrees; _19 = xNumberOfSuccessfulFrees.21_18 + 1; xNumberOfSuccessfulFrees = _19; xTaskResumeAll (); : return; } pvPortMalloc (size_t xWantedSize) { void * pvReturn; struct BlockLink_t * pxNewBlockLink; struct BlockLink_t * pxPreviousBlock; struct BlockLink_t * pxBlock; void * D.6323; : pvReturn = 0B; vTaskSuspendAll (); pxEnd.0_1 = pxEnd; if (pxEnd.0_1 == 0B) goto ; [INV] else goto ; [INV] : prvHeapInit (); : xBlockAllocatedBit.1_2 = xBlockAllocatedBit; _3 = xWantedSize & xBlockAllocatedBit.1_2; if (_3 == 0) goto ; [INV] else goto ; [INV] : if (xWantedSize != 0) goto ; [INV] else goto ; [INV] : xHeapStructSize.2_4 = 8; _5 = xWantedSize + xHeapStructSize.2_4; if (xWantedSize < _5) goto ; [INV] else goto ; [INV] : xHeapStructSize.3_6 = 8; xWantedSize = xWantedSize + xHeapStructSize.3_6; _7 = xWantedSize & 7; if (_7 != 0) goto ; [INV] else goto ; [INV] : _8 = xWantedSize & 4294967288; _9 = _8 + 8; if (xWantedSize < _9) goto ; [INV] else goto ; [INV] : _10 = xWantedSize & 4294967288; xWantedSize = _10 + 8; _11 = xWantedSize & 7; if (_11 != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : xWantedSize = 0; : goto ; [INV] : xWantedSize = 0; : if (xWantedSize != 0) goto ; [INV] else goto ; [INV] : xFreeBytesRemaining.4_12 = xFreeBytesRemaining; if (xWantedSize <= xFreeBytesRemaining.4_12) goto ; [INV] else goto ; [INV] : pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; goto ; [INV] : pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; : _13 = pxBlock->xBlockSize; if (xWantedSize > _13) goto ; [INV] else goto ; [INV] : _14 = pxBlock->pxNextFreeBlock; if (_14 != 0B) goto ; [INV] else goto ; [INV] : pxEnd.5_15 = pxEnd; if (pxBlock != pxEnd.5_15) goto ; [INV] else goto ; [INV] : _16 = pxPreviousBlock->pxNextFreeBlock; xHeapStructSize.6_17 = 8; pvReturn = _16 + xHeapStructSize.6_17; _18 = pxBlock->pxNextFreeBlock; pxPreviousBlock->pxNextFreeBlock = _18; _19 = pxBlock->xBlockSize; _20 = _19 - xWantedSize; xHeapStructSize.7_21 = 8; _22 = xHeapStructSize.7_21 << 1; if (_20 > _22) goto ; [INV] else goto ; [INV] : pxNewBlockLink = pxBlock + xWantedSize; pxNewBlockLink.8_23 = (unsigned int) pxNewBlockLink; _24 = pxNewBlockLink.8_23 & 7; if (_24 != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _25 = pxBlock->xBlockSize; _26 = _25 - xWantedSize; pxNewBlockLink->xBlockSize = _26; pxBlock->xBlockSize = xWantedSize; prvInsertBlockIntoFreeList (pxNewBlockLink); : xFreeBytesRemaining.9_27 = xFreeBytesRemaining; _28 = pxBlock->xBlockSize; _29 = xFreeBytesRemaining.9_27 - _28; xFreeBytesRemaining = _29; xFreeBytesRemaining.10_30 = xFreeBytesRemaining; xMinimumEverFreeBytesRemaining.11_31 = xMinimumEverFreeBytesRemaining; if (xFreeBytesRemaining.10_30 < xMinimumEverFreeBytesRemaining.11_31) goto ; [INV] else goto ; [INV] : xFreeBytesRemaining.12_32 = xFreeBytesRemaining; xMinimumEverFreeBytesRemaining = xFreeBytesRemaining.12_32; : _33 = pxBlock->xBlockSize; xBlockAllocatedBit.13_34 = xBlockAllocatedBit; _35 = _33 | xBlockAllocatedBit.13_34; pxBlock->xBlockSize = _35; pxBlock->pxNextFreeBlock = 0B; xNumberOfSuccessfulAllocations.14_36 = xNumberOfSuccessfulAllocations; _37 = xNumberOfSuccessfulAllocations.14_36 + 1; xNumberOfSuccessfulAllocations = _37; : xTaskResumeAll (); pvReturn.15_38 = (unsigned int) pvReturn; _39 = pvReturn.15_38 & 7; if (_39 != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : D.6323 = pvReturn; : : return D.6323; } __attribute__((always_inline)) vPortRaiseBASEPRI () { uint32_t ulNewBASEPRI; : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI : "i" 16 : "memory"); return; }