Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Code instantly terminates on crio (http://www.chiefdelphi.com/forums/showthread.php?t=81666)

brianelite 01-02-2010 17:16

Code instantly terminates on crio
 
Our code is very vanilla and it seems all of our build properties etc are vanilla as well. However as soon as we debug code on our robot the code is terminated by the compact rio I have no idea why. Also in the open run dialog window the when you hit browse (for entry point) theappropriate entry point does not show on the list. :( it also seems like code is deploying to the robot way too fast ditto for debug downloads ... I am getting very frusterated by the crio I have tried reformatting, alternative example projects, different computers I have no idea what the heck is wrong with this.

National instruments, windriver and first should be embarrassed by this monstrosity

nathanww 01-02-2010 17:33

Re: Code instantly terminates on crio
 
A few questions:
1.What programming environment are you using?
2.Are you getting error messages in your debug console?

In FRC programs, the robot usually won't just automatically start the program unless you give it a specific command(In C++ it's START_ROBOT_CLASS) that points to what you want to start up.

It's also possible that your main thread is crashing very soon after it starts. If there are error messages coming out, these should be useful for debugging your code.

brianelite 01-02-2010 18:15

Re: Code instantly terminates on crio
 
I'm using windriver image demo. There are no errors in windriver, the only thing it says is that the debug terminated... But when I open the target console I can see that the code is being deleted as soon as it is deployed....

nathanww 01-02-2010 18:36

Re: Code instantly terminates on crio
 
The image demo is not a good test case because it is pretty complex. If you want to SPECIFICALLY test the image processing, it's a good place to start, but I'd recommend that you try getting the robot running using the basic SimpleRobot or IterativeRobot demos first.

brianelite 01-02-2010 19:03

Re: Code instantly terminates on crio
 
The same issue is present in simple robot template and this shouldn't be happening anyways

Tom Line 02-02-2010 00:38

Re: Code instantly terminates on crio
 
Brian,

Please take a deep breath. Many, many other teams have their robots or control systems up and running using the Windriver development system. This suggests that either: you have found a bug in the system, which is entirely possible, or you haven't done everything correctly in setting it all up.

Calling the product of a lot of hard work from a lot of volunteers and a lot of sponsors a "monstrosity" and saying "it shouldn't do this" probably isn't a very effective way of soliciting help from those same folks.

It's rare that you have an audience like we have on chief delphi. You have hundreds of competent professional engineers just waiting help, as well as the people who actually programmed and built this entire system for us to use. I understand your frustration - but there has to be a better way to vent it that isn't disparaging to sponsors and volunteers alike.

Can you give a better explanation of your issue? Are there any error messages? What lights is your dashboard showing on the diagnostics tab? What error codes?

brianelite 02-02-2010 18:17

Re: Code instantly terminates on crio
 
Wind River is/was a billion dollar company. I highly doubt their software is written by "volunteers".

I went through this guide to create a fresh example project: http://www.chiefdelphi.com/forums/sh...ad.php?t=81064

When I deploy code it does not deploy. On the target console it says something along the lines of "deleted"....

When I try and run/debug code the code goes terminates within a second, although the task shows up in the vxworks connection for a second. When I add a breakpoint, the code terminates at the breakpoint (so the farther down you move the breakpoint down... the longer the code "runs" without throwing up... very bizarre) ... the breakpoint says something like "cannot find source file at line:x" or something like that...

I have had this code problem happen on three laptops and two compact rios, even after reinstallation of windriver and reformatting the device... Does it matter if labview/windriver didn't activate? maybe vxworks doesn't like unsigned code and kills it or somethinging?

Alan Anderson 03-02-2010 11:05

Re: Code instantly terminates on crio
 
Quote:

Originally Posted by brianelite (Post 912028)
I went through this guide to create a fresh example project: http://www.chiefdelphi.com/forums/sh...ad.php?t=81064

Whoa, that's a bit cumbersome, and seems rife with opportunities for something to be missed. It looks like it was written by someone who had managed to modify the template so that the normal procedure no longer worked.

Why not do it the way you're supposed to? See Section 2 of the 2010 FRC Control System manual, which has the proper instructions starting on page 39.

slavik262 03-02-2010 11:24

Re: Code instantly terminates on crio
 
Try using the Simple Robot template in the examples section of WindRiver. It's a great jump point. Just delete the code in the Operator Control and Autonomous functions and you'll have a nice starting project to work from.

Now another thing:

Quote:

Originally Posted by brianelite (Post 912028)
Wind River is/was a billion dollar company. I highly doubt their software is written by "volunteers".

Yes, but the API you use to code the robot, WPILib, was not made by Wind River.

Stop being so aggressive. There's lots of different things that could be causing the issue, but that's besides the point. The people here on Chief Delphi, including mentors, FIRST members from other teams, and professionals from LabVIEW and WPI, are more than willing to help anyone that asks for it. You'll find though, that if you start blaming everyone and get angry at them, fewer and fewer people will offer you help. Relax, and remember that you're representing your team to the entire FIRST community here.

gvarndell 03-02-2010 11:25

Re: Code instantly terminates on crio
 
Quote:

Originally Posted by brianelite (Post 912028)
Wind River is/was a billion dollar company. I highly doubt their software is written by "volunteers".

Wind River never quite made it to a billion dollar company before being acquired by Intel.
In fact, while they aspired to that for a long time, they fell short by a lot.
More like a 1/4 billion.
Anyway, the Wind River GNU compiler and, for a very long time, their network code actually had been largely written by volunteers.

Edit: the blurb about volunteers is in no way intended to denigrate Wind River.
Wind River's pervasive presence in the embedded systems arena, and the resultant scrutiny brought to bear on the GNU tools, contributed significantly to the quality of those tools.

brianelite 03-02-2010 18:59

Re: Code instantly terminates on crio
 
The issue is the same whether it is SimpleRobot, 2010ImageDemo, or any of the other examples I have tried, as I previously mentioned. I initially followed the "proper way"... Unfortunately, it gives me this problem. I have gone through the instructions multiple times on multiple computers, even different compact rios. Exact same problem.

Alan Anderson 03-02-2010 20:53

Re: Code instantly terminates on crio
 
Quote:

Originally Posted by brianelite (Post 912812)
I have gone through the instructions multiple times on multiple computers, even different compact rios. Exact same problem.

Unless every one of the multiple computers is oddly configured in the same way, I strongly suspect that you're not following the instructions the way they need to be followed, or that you've left out a step in setting up your system.

I don't have a lot of experience using the WindRiver environment, so I can't ask helpful questions about it in particular. But I can ask this: what version of the cRIO image is loaded?

tdidi 03-02-2010 21:06

Re: Code instantly terminates on crio
 
Quote:

Originally Posted by brianelite (Post 912028)
When I deploy code it does not deploy. On the target console it says something along the lines of "deleted"....


It might just be a typo, but i do know that in windriver you must "undeploy" the code currently on the cRIO, then "download" the new code to it after its finished undeploying. Then when you need to reset the robot to run the new code.

Also, I've spent a lot of time debugging robot code recently (so trust me on this one), and that line your referring to that says "deleted..." is normal, and is always present when you reset the robot.

What is the last thing being outputted to the console before it stops?

Tom Line 04-02-2010 03:06

Re: Code instantly terminates on crio
 
In addition, what are you seeing on the driver station? Does it stay at no code? What errors do you see in the diagnostic window?

brianelite 05-02-2010 20:37

Re: Code instantly terminates on crio
 
I'm not using the driver station. But it should still work right?

How do you copy text from the target console?

Tom Line 05-02-2010 21:54

Re: Code instantly terminates on crio
 
Brian, you have to run the driver station for the robot to function.

Let's start over.

Did you perform the bench test as spelled out in the getting started manual?

simpsonboy77 05-02-2010 22:00

Re: Code instantly terminates on crio
 
Quote:

Originally Posted by Alan Anderson (Post 912904)
what version of the cRIO image is loaded?

It should be something along the lines of 2010*blah blah blah*V19. The V19 is very important, and we would like a response about it. If you are unsure what you have, reimage the cRio, and make sure you select the correct environment (C/C++ Windriver). Check the format checkbox, and begin the reimage. Make sure to do this on a fresh battery.

Check your IP settings.
Check that you are trying to load the correct file, with the correct team #. To check this, open windriver, and under window select preferences. Then click "FIRST Downloader Preferences"

I had problems the first few days getting the cRio to accept code. I found it invaluable to look at the RS232 debug output. To read this use your favorite terminal service (hyperterminal is default on Windows), and connect via serial with a NULL MODEM cable. My team had no null modem cables, so we purchased a converter, and it works great. Be sure the console out DIP switch is set to on.

You will know when it is receiving data because the cRio spits out a lot of data while booting.

As for copying text, screenshots work.

EDIT: By using the driver station, don't use the 2009 kwikbyte thing. Use the classmate PC and login as the driver. There is also an option to install the driver station on another laptop. One must be on for the cRio to work

Dreglor 05-02-2010 23:04

Re: Code instantly terminates on crio
 
for the console output what is the settings for that so we can see into this booting process

Radical Pi 05-02-2010 23:30

Re: Code instantly terminates on crio
 
The deleted note is most likely along the lines of "FTP task deleted errno=something". That is normal when uploading.

Also, you need to reboot the cRIO before your code will properly load.

Driver Station is also a must to have running

simpsonboy77 06-02-2010 02:07

Re: Code instantly terminates on crio
 
Quote:

Originally Posted by Dreglor (Post 914309)
for the console output what is the settings for that so we can see into this booting process

9600 baud
no parity
I think hardware flow control, but it might be none.

Be sure to use a null modem cable.


All times are GMT -5. The time now is 13:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi