I just want to toggle an LED when the USART finishes receiving, so I wrote the following for the USART_RX_vect, but the LED never changes. However, the LED does toggle if move the code from the ISR into the main loop and precede it with while ( !(UCSR0A & (1<<UDRE0)) );

Dear Sir, I'd red your post of "Interrupt for USART RX on Atmega328p seems not to fire", and i can understand the things you do with your code. But sir, Do you use this code with Arduino IDE ? i.e: Is Arduino support main() function? and another thing is that, inside the main function what you do with sei() funtion?

There is no definition for sei(); function in your code. Do you have the definition for this function in other file. Or else is it a pre-defined One? Please explain what this function do? Thanks in advance.