Keil : LPC1768 UART : Error: L6200E: Symbol a multiply defined (by main.o and uart.o)
You have declared a and i in a header, so they're being defined in each translation unit they're compiled in. You should put them in their respective implementation files, static if they don't need to be shared and in the smallest scope you can.

i for example is used only as a loop counter in the rx function, either declare it at the top of the function or if you're using c99 then declare it in the loop.