I think I've found the solution (thanks to Ken Streeter and Brad Miller).
http://www.chiefdelphi.com/forums/showpost.php?p=807962&postcount=5
Before trying to download code, the robot should be "dead": No PWM outputs, no console output when you press buttons. If you get either of these, you have to undeploy the default image code first.