Commits

Anders Hammarquist committed f62cd62

fixes for gcc

  • Participants
  • Parent commits df283e2

Comments (0)

Files changed (2)

File Basic_Wifi_Application/basic_wifi_application.c

 #include "driverlib/systick.h"
 #include "driverlib/fpu.h"
 #include "driverlib/debug.h"
-#include "grlib/grlib.h"
 
 #include "utils/uartstdio.h"
 #include "driverlib/uart.h"
 
 __no_init unsigned char pucCC3000_Rx_Buffer[CC3000_APP_BUFFER_SIZE + CC3000_RX_BUFFER_OVERHEAD_SIZE];
 
+#elif __GNUC__
+
+unsigned char pucCC3000_Rx_Buffer[CC3000_APP_BUFFER_SIZE + CC3000_RX_BUFFER_OVERHEAD_SIZE] __attribute__ ((section (".noinit")));
+
 #endif
 
 
 		}
 	}
 	
-	return ucRes;
+#if __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+	return ucRes; /* undefined if not called with a lower-case hex digit */
+#if __GNUC__
+#pragma GCC diagnostic pop
+#endif
 }
 
 
 	
 	// Enable processor interrupts
 	MAP_IntMasterEnable(); 
-	
 	// WLAN On API Implementation
 	wlan_init( CC3000_UsynchCallback, sendWLFWPatch, sendDriverPatch, 
 						sendBootLoaderPatch, ReadWlanInterruptPin, WlanInterruptEnable, 
 						WlanInterruptDisable, WriteWlanPin);
 	
 	// Trigger a WLAN device
-	wlan_start(0);	
+	wlan_start(0);
 
 	// Turn on the LED 1 (RED) to indicate that we are active and initiated WLAN successfully
 	turnLedOn(1);
 	// Mask out all non-required events from CC3000
 	wlan_set_event_mask(HCI_EVNT_WLAN_KEEPALIVE|HCI_EVNT_WLAN_UNSOL_INIT
 											|HCI_EVNT_WLAN_ASYNC_PING_REPORT);
-	
+
 	DispatcherUARTConfigure(SysCtlClockGet());
-	SysCtlDelay(1000000); 
+	SysCtlDelay(1000000);
 	
 	// Generate teh event to CLI: send a version string
 	{
 //
 //*****************************************************************************
 
-main(void)
+int main(void)
 {
 
 	ulCC3000DHCP = 0;

File HyperTerminal_Driver/dispatcher.c

 unsigned char g_ucUARTBuffer[UART_IF_BUFFER];
 #elif __IAR_SYSTEMS_ICC__
 __no_init unsigned char g_ucUARTBuffer[UART_IF_BUFFER];
-
+#elif __GNUC__
+unsigned char g_ucUARTBuffer[UART_IF_BUFFER] __attribute__ ((section (".noinit")));
 #endif
 volatile unsigned char uart_have_cmd = 0;
 volatile unsigned long g_ulRxBuffCount =0;