@gleiden
I know this is an old thread, but I just encountered this issue myself tonight. I believe the error is caused by the COM port being either unavailable or busy. In my case, I accidentally created a serial print function for debugging that was writing non-stop to the COM port - this was basically overloading the programmer's ability to get it's data through to begin uploading the new code. I got lucky because my code had a several second initiation routine before it started sending debug data to the COM port - so I unplugged the controller while the compiler was working and plugged in the usb cable just before the compiler was about to upload the code. This allowed the programmer to 'get through' the COM port before the code running on the controller started overwhelming the port.

There must be another way to solve this - I am surprised that pressing the button as you power on the controller to put it into download mode does not work... I would think that is the answer.

At least you know the reasoning for the error.