View unanswered posts | View active topics It is currently Sat Jul 26, 2014 1:14 pm






Reply to topic  [ 9 posts ] 
"Cannot communicate with robot controller CPU" 
Author Message
Rookie

Joined: Sat Dec 15, 2012 5:07 pm
Posts: 5
Post "Cannot communicate with robot controller CPU"
I've now tried a Uno, Mega, Duemilanove and all fail the same way with RobotC for Arduino 3.54. Although I can download load the RobotC firmware fine, when I try to compile and uploade code I almost always get this error:

"Failed to verify that the serial link is connected to a Robot Controller.

Cannot commnicate with robot controller CPU"

I did get it to work once with a Uno, but none of the variables were showing up in the debugger. And I've never got it to work again. I've tried on two PCs, both Windows 7, 64-bit.

What am I doing wrong?


Sat Dec 15, 2012 5:16 pm
Profile
Online
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 556
Post Re: "Cannot communicate with robot controller CPU"
First, make sure the drivers are installed properly in Windows. We have a walkthrough guide on our wiki that can show you how to do this step-by-step: http://www.robotc.net/wiki/ARDUINO_Installing_Drivers

Next, make sure you have updated the bootloader; this is a special process that is required for the MEGA and 2560 boards (but not any other of the other boards). More information on this process can be found here: http://www.robotc.net/wiki/ARDUINO_MEGA ... Bootloader

Finally, make sure you have gone through the setup guide (also on our wiki) that shows you how to configure ROBOTC for the Arduino boards: http://www.robotc.net/wiki/Tutorials/Ge ... th_Arduino

If all of these steps have been followed and you are still having problems, please let me know exactly what the issues are and what causes them to occur.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Mon Dec 17, 2012 12:34 pm
Profile
Rookie

Joined: Sat Dec 15, 2012 5:07 pm
Posts: 5
Post Re: "Cannot communicate with robot controller CPU"
John, thanks for the reply and suggestions, but I'm afraid I've checked them all and it made no difference. Same error message when I select "Compile and Download program". I've tested this on two Win 7 64-bit PCs, and on the Uno, Duemillanove (not the Mega, because I can't load the new bootloader).

Regular Arduino loads code fine on these boards. It's just RobotC that doesn't work for me.

Could there be some conflict between the regular Arduino driver and the RobotC one? All these computers are already running the standard Arduino driver.


Mon Dec 17, 2012 10:06 pm
Profile
Online
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 556
Post Re: "Cannot communicate with robot controller CPU"
We've been testing this and have found a solution. Are you using the UART ports for serial communication? If you are, you will need to put a ~2 second wait command at the start of your program. The reason for this is that the Arduino starts executing whatever code is already loaded on it as soon as it is powered on. If you have a program loaded that utilizes pins 0 or 1, they will be 'locked down' by the program and will not be able to communicate with ROBOTC. Thus, the serial link is never established and the program will not be able to be loaded.

To solve this, add the wait command early on in your program (before the UART port is utilized), redownload the firmware to the Arduino, and then compile and download the program. This should solve the issue for you. If not, please let me know and we will debug this further.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Jan 03, 2013 12:22 pm
Profile
Rookie

Joined: Sat Dec 15, 2012 5:07 pm
Posts: 5
Post Re: "Cannot communicate with robot controller CPU"
Thanks, I'll give that a try.

But that's quite a limitation, don't you think? What Arduino program doesn't start with some text written out on Serial? It's a shame that RobotC can't run standard Arduino code without this special modification.

Any chance the bootloader can be fixed to address this?


Fri Jan 04, 2013 2:39 am
Profile
Rookie

Joined: Sat Dec 15, 2012 5:07 pm
Posts: 5
Post Re: "Cannot communicate with robot controller CPU"
I tried it, and it turns out that you need to do more than ensure that your program doesn't write to serial at the start. You also need to ensure that whatever program is ALREADY ON the Arduino also doesn't write to serial. Given that you can't communicate with the board in RobotC until you do, that means you need to boot up regular Arduino, load a program that doesn't send to serial at the start, and compile it to the board. Only then can you switch back to RobotC and program as usual.

So it now works, but this is pretty crippling problem for newcomers, who are likely to have already tried their board with regular Arduino, possibly loading a sketch that writes to serial. It would be great if you could get this fixed soon.


Sun Jan 06, 2013 2:16 am
Profile
Online
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 556
Post Re: "Cannot communicate with robot controller CPU"
zlite wrote:
I tried it, and it turns out that you need to do more than ensure that your program doesn't write to serial at the start. You also need to ensure that whatever program is ALREADY ON the Arduino also doesn't write to serial. Given that you can't communicate with the board in RobotC until you do, that means you need to boot up regular Arduino, load a program that doesn't send to serial at the start, and compile it to the board. Only then can you switch back to RobotC and program as usual.

So it now works, but this is pretty crippling problem for newcomers, who are likely to have already tried their board with regular Arduino, possibly loading a sketch that writes to serial. It would be great if you could get this fixed soon.


As long as you have a sufficient wait command at the start of the program, you shouldn't need to go through all of these steps; simply press the reset button on the Arduino board (which will restart the program at the wait command, before the UART port is controlled by the program) and compile and download from ROBOTC before the wait command runs its course. I usually use a 2-3 second wait command to give myself plenty of time to hit F5 on my keyboard. This will let you recompile and download in ROBOTC without any issues.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Fri Jan 18, 2013 4:57 pm
Profile
Rookie

Joined: Sat Dec 15, 2012 5:07 pm
Posts: 5
Post Re: "Cannot communicate with robot controller CPU"
Yes, once you know the problem it's pretty easy to work around it. My point is that the initial experience for many existing Arduino users is going to be mysterious failure because they had a program already on the board that writes to serial without a delay. You can either document the heck out of this and hope that people RTFM or change the bootloader code to resolve it once and for all. Needless to say, I'd recommend the latter ;-)


Fri Jan 18, 2013 5:18 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 601
Post Re: "Cannot communicate with robot controller CPU"
The problem is that ROBOTC does not write the bootload for the Arduino. We use the standard Arduino bootloader out of the box. The only way to communicate with the Arduino Uno is via the single serial port on the board. Our options are as follows:

1. Always require the user to press a "go" button before executing code - this is annoying because it requires hardware before you can actually use the robot.
2. Document the issue and have the user read about it - Would be a great option, but as you said, most people don't read the documentation
3. Prevent serial port access in general - lowers the usefulness of the system, but would remove this issue all together.
4. Rewrite the bootloader - You'd need the end user to have a ISP programmer, which is additional cost and burden.

I'll look through the process and see if we can do anything to improve it, as I do agree it's an annoyance - but it's the difficulty of not being the creator/maintainer of all of the code that's on a specific system that you have to work around issues like this.

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Fri Jan 18, 2013 5:31 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.