can't upload program to Mega 2560 using simulink

Hi All I use Arduino Mega 2560 R3 (official board) and my OS is Window 7. I program a simple code using simulink (I repeat a simulink example for Arduino Mega 2560) and I face a problem that I can't upload my programs to the arduino board.

I have uploaded program without driver installation at first time that when I upload, it show the error

"The call to realtime_make_rtw_hook, during the after_make hook generated the following error: Could not download the model to the target hardware. Verify the connection between the computer and target hardware.

The build process will terminate as a result.

Caused by: Could not download the model to the target hardware. Verify the connection between the computer and target hardware."

Then I install the driver (arduino 1.0.5) and check as Arduino troubleshooting, it still doesn't work. When upload, it still show the error

"The call to realtime_make_rtw_hook, during the after_make hook generated the following error: Could not download the model to the target hardware. Verify the connection between the computer and target hardware.

The build process will terminate as a result.

Caused by: Could not download the model to the target hardware. Verify the connection between the computer and target hardware."

I'm no idea for problem solving.

Thank you for any help

Hi, what was your solution ?

Hello ,

Please check COM port of target hardware in the configuration parameters of simulink.