This can happen for different reasons. I will give you some suggestions. First make sure you are using the correct IDE for the Galileo Board. There is an specific IDE for the Galileo Board, you can download it in this site: https://communities.intel.com/docs/DOC-22226. Also make sure you are selecting the correct board in the IDE and also the correct COM port.
Then update the firmware and try again. I recommend you to check this Galileo Getting Starter and follow it step by step: https://communities.intel.com/docs/DOC-22872.
Let us know if this help you. Have a nice day!
I found I choose the wrong board version.
Thanks for your answers.