Why I can't Build?
Rebuild target 'Target 1' compiling UART_main.c... UART_main.c(107): warning C316: unterminated conditionals compiling ser.c... linking...
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?SER0_GET_LINE?SER
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT SYMBOL: SER0_TX_STR SEGMENT: ?DT?SER
As I said before, there is a good chance that your code is messed-up due to the first error:
warning C316: unterminated conditionals
So you really should fix that first.
"i can't fix it"
There is little point trying to fix it until you have the earlier error sorted-out!