static void waitForGdbToConnect(void) { for (;;) { waitForFirstCharFromHost(); if (didHostSendGdbAckChar()) return; Platform_CommWaitForReceiveDataToStop(); Platform_CommPrepareToWaitForGdbConnection(); } }
static void configureUartForExclusiveUseOfDebugger(UartParameters* pParameters) { enablePowerToUart(); setUartPeripheralClockTo1xCCLK(); clearUartFractionalBaudDivisor(); enableUartFifoAndDisableDma(); setUartTo8N1(); setUartBaudRate(pParameters); selectUartPins(); enableUartToInterruptOnReceivedChar(); Platform_CommPrepareToWaitForGdbConnection(); configureNVICForUartInterrupt(); }