Add back heap setup code
diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c
index d912557..04f8831 100644
--- a/portable/ThirdParty/GCC/Posix/port.c
+++ b/portable/ThirdParty/GCC/Posix/port.c
@@ -105,8 +105,9 @@
 static volatile BaseType_t uxCriticalNesting;
 static BaseType_t xSchedulerEnd = pdFALSE;
 static pthread_t hTimerTickThread;
+static bool xTimerTickThreadShouldRun;
 static uint64_t prvStartTimeNs;
-static List_t xThreadList; /* The list to track all the pthreads which are not deleted. */
+static List_t xThreadList;
 /*-----------------------------------------------------------*/
 
 static void prvSetupSignalsAndSchedulerPolicy( void );
@@ -277,7 +278,7 @@
 void vPortEndScheduler( void )
 {
     /* Stop the timer tick thread. */
-    pthread_cancel( hTimerTickThread );
+    xTimerTickThreadShouldRun = false;
     pthread_join( hTimerTickThread, NULL );
 
     /* Signal the scheduler to exit its loop. */
@@ -370,7 +371,6 @@
 
     return ( uint64_t ) t.tv_sec * ( uint64_t ) 1000000000UL + ( uint64_t ) t.tv_nsec;
 }
-
 /*-----------------------------------------------------------*/
 
 /* commented as part of the code below in vPortSystemTickHandler,
@@ -379,7 +379,7 @@
 
 static void * prvTimerTickHandler( void * arg )
 {
-    for( ; ; )
+    while( xTimerTickThreadShouldRun )
     {
         /*
          * signal to the active task to cause tick handling or
@@ -399,7 +399,10 @@
         usleep( portTICK_RATE_MICROSECONDS );
         pthread_testcancel();
     }
+
+    return NULL;
 }
+/*-----------------------------------------------------------*/
 
 /*
  * Setup the systick timer to generate the tick interrupts at the required
@@ -407,6 +410,7 @@
  */
 void prvSetupTimerInterrupt( void )
 {
+    xTimerTickThreadShouldRun = true;
     pthread_create( &hTimerTickThread, NULL, prvTimerTickHandler, NULL );
 
     prvStartTimeNs = prvGetTimeNs();