avrdude: ser_drain(): read error: E/S Operation was aborted by ...

Hello i have this message avrdude: ser_drain(): read error: E/S Operation was aborted by ... an application solicitude, the message is not sure excat because it's a translation

i was trying to make a mouse with arduino and 2 pot. in the beginning i could only read the data in the serial port, and it was ok! i tried to use the mouse.begin command for arduino leonardo, but i have a duemillanove as i read the due could do it as well i thought due was my old 2009, and i send the data changing the board and saying i have and arduino leonardo, i was sure it was not going to work , but let it try!

i screw it up, i thought maybe i fucked up the chip atmega328, i take it out the socket and put a new one, but the message persist

is there a way to fix it? or i fucked up the whole board?