/* Helper function to obtain the last memory address of the firmware data that is present in the linked list with segments.  */
static uint32_t FirmwareGetLastAddress(void)
/* Helper function to obtain the last memory address of the firmware data that is present in the linked list with segments.  */
static uint32_t FirmwareGetLastAddress(void)
{
  uint32_t result = 0;
  tFirmwareSegment * lastSegment;
  lastSegment = FirmwareGetSegment(FirmwareGetSegmentCount() - 1u);
  assert(lastSegment != NULL);
  if (lastSegment != NULL)
  {
    result = lastSegment->base + lastSegment->length - 1u;
  }
  return result;
}