Go to Post This reminds me of a sports bar where there's a bunch of games on different TV's. Only this is better because it's FIRST. :D - JackG [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-12-2004, 19:17
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Exclamation Programming FAQ

It seems like we get a lot of the same questions here. So, here's a repository of some of the most common ones. Feel free to post your own with answers.

If you have a question that is not answered here, please search first. I can almost guarantee that someone has asked a similar question before.

Q. MPLAB says that it can't find "xxx.h". What's up?
A. if it's a standard header (eg, #include <adc.h>) then odds are that MPLAB is misconfigured. Either set the include directory manually, or reinstall MCC18 and checking the check boxes.
  #2   Spotlight this post!  
Unread 16-12-2004, 19:46
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Programming FAQ

I need help programming my autonomous?
Look here, there, here, there, here & in the programming white papers & Search for more. There is more stuff than you can imagine.

//Brandon or any mod, Make this a sticky if you can...
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #3   Spotlight this post!  
Unread 16-12-2004, 19:56
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Programming FAQ

This one got me for a while when I first started using the RC.

Q: My robot isnt responding to controllers, wont download a new program, and is stuck in disabled mode. What do I do?

A: 1)hold down both the program and reset buttons.
2)Then, let go of the reset button. (The power light will be blinking green. )
3)Wait until the green light is solid.
4)Let go of the program button.

or see here
  #4   Spotlight this post!  
Unread 21-12-2004, 18:22
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Programming FAQ

Q. I get an error when i try to compile:
Quote:
Error - Source file 'C:\path\that's\too\long\for\the\compiler\ifi_util ities.c' name exceeds file format maximum of 62 characters.
How do I fix this?

A. Don't put the code on the Desktop or My Documents. Here's why:

MCC18, the compiler, can only handle paths that are less than 62 characters long. Here is a few paths to the Desktop and My Documents (with the first 62 in green and everything else in red):
  • C:\Documents and Settings\Kristin & Steve\Desktop\FIRST Code\Default code\ifi_utilities.c
  • D:\Documents and Settings\Astronouth7303\My Documents\Robotics stuff\codes\Default code\main.c
A better place to put it would be C:\Code\Default Code\.
  #5   Spotlight this post!  
Unread 22-12-2004, 07:33
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Programming FAQ

Similar to Tom's:

Q: My programming is running the way it should!

A: Amazingly, about a quarter of the time it isn't really your fault. Try pressing the reset button on the robot controller, then re-download. Sometimes things just get a little corrupted. If it still doesn't work, then start debugging your code...
__________________

  #6   Spotlight this post!  
Unread 22-12-2004, 23:29
Guest
 
Posts: n/a
Re: Programming FAQ

Quote:
Originally Posted by Ryan Morehart
Similar to Tom's:

Q: My programming is running the way it should!

A: Amazingly, about a quarter of the time it isn't really your fault. Try pressing the reset button on the robot controller, then re-download. Sometimes things just get a little corrupted. If it still doesn't work, then start debugging your code...
Q. My programming isn't running the way it should!

A. See above. But when it is running the way it should, about a quarter of the time it still isn't your fault
  #7   Spotlight this post!  
Unread 23-12-2004, 02:35
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
Re: Programming FAQ

Quote:
Originally Posted by Astronouth7303
Q. I get an error when i try to compile:

How do I fix this?

A. Don't put the code on the Desktop or My Documents. Here's why:

MCC18, the compiler, can only handle paths that are less than 62 characters long. Here is a few paths to the Desktop and My Documents (with the first 62 in green and everything else in red):
  • C:\Documents and Settings\Kristin & Steve\Desktop\FIRST Code\Default code\ifi_utilities.c
  • D:\Documents and Settings\Astronouth7303\My Documents\Robotics stuff\codes\Default code\main.c
A better place to put it would be C:\Code\Default Code\.
You know... actually technically that isn't true. Sorta. It is true that it generates an error, but the problem with the 62-character limit is only with the COD file that the linker tries to generate, none of the other files. Correct me if I'm wrong, but I don't think that the COD file is actually used for anything, so you could use as big of a path as you would like if this file wasn't generated.

That being said, I am using MPLAB 7 (which you can download at www.microchip.com), so it may not be possible to disable this in MPLAB 6.x. I know a vast majority of you will be using 6.x because it was distributed with the C18 software last year... someone please correct me if this option isn't available in MPLAB 6.x. If you're using the C18 tools by the command line, then just add option /w and it shouldn't generate the file also... which, you can edit the command line in MPLAB 6.x, so you can just add the /w switch to the MPLINK command and not have a problem.

Here's the workaround for MPLAB 7.

In the MPLAB menu:

Project-> Build Options -> Project

Click on the tab "MPLINK Linker", and check the option "Supress COD-file generation".

Now it won't generate this file, and you can use a path as big as you would like to use. Well, within reason...

[edit]
Apparently, the C-Bot CD that has the licensed version of C18 does not have the correct linker in its c:\mcc18\ directory... so if you use the /w option you will get "invalid option" and still have the problem. However, if you tell MPLAB to use the linker that it came with (located in c:\program files\Microchip\MPASM Suite\mplink.exe), then it should work with no problem

With all that said, if you don't feel like dealing with any problems, don't touch anything, use the default stuff, and make sure your path is under 62 characters
[/edit]
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net

Last edited by randomperson : 23-12-2004 at 22:24.
  #8   Spotlight this post!  
Unread 02-01-2005, 02:52
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Programming FAQ

Question: What OS is on the robot? If there is none or its horrible can I put embedded Linux on it? I only run Linux myself, is it possible to program this robot on Linux? Is there some sort of emulator I can get so I don't have to be with the robot, or it dose not have to be fully built for me to test?
Or basically
I am a rookie, where do I start, I want to learn about the robot controller.


Answer: OK first, yes you can program this robot using Linux. Visit http://kevin.org/frc/ and you should find some more information. For starting off, I highly recommend the documents on http://www.innovationfirst.com/FIRS...cumentation.htm
And then if you are advanced enough you can look at this page, but only if you are a really core programmer. Otherwise innovation FIRST is the best place to start.

To answer another part of you question, there is no OS on the robot controller. It is a microchip which understands C and assembler. Search, Read documents and get a feel of what our robot controller(microchip product) is. Its might not be such a good idea to try to go as far and put Linux on there or something, Search, Read documents you can find and you will get a feel.

-Bharat
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #9   Spotlight this post!  
Unread 10-01-2005, 14:03
cabbagekid2 cabbagekid2 is offline
Registered User
#0368 (Kika Mana)
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Honolulu, HI
Posts: 85
cabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura about
Re: Programming FAQ

Question: Does everyone use the C18 compiler? Or do some of you use the Visual Studio C compiler?

If you use the Visual Studio C complier, how would you download the code to the RC?
  #10   Spotlight this post!  
Unread 10-01-2005, 16:15
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
Re: Programming FAQ

Quote:
Originally Posted by cabbagekid2
Question: Does everyone use the C18 compiler? Or do some of you use the Visual Studio C compiler?

If you use the Visual Studio C complier, how would you download the code to the RC?
You must use the C18 compiler. The Visual Studio C++ compiler does not target the Microchip microcontroller.

Matt
  #11   Spotlight this post!  
Unread 10-01-2005, 19:01
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Programming FAQ

Q: Where can I find all this cool stuff that was talked about in the (2005) kickoff?

A: The Camera stuff, default code, (eventually) the new firmware (master code), and technical docs are on http://ifirobotics.com. The link to the new IDE and MCC18 compiler are on FIRST's website (http://www.usfirst.org/).

Q: I CAN'T FIND THE COMPILER!!! THE LINK IS MESSED UP!!! HELP!!!

A: Yes, we know you can't download the compiler right now. Asking again won't help. Just try again later (like tomarrow) and hope it works. We can't do anything about it no matter how much you pester us.
  #12   Spotlight this post!  
Unread 16-01-2005, 20:34
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Programming FAQ

Q. Why won't my program link? (Generic Linking problems)

A. If you have any kind of linking problems, the first thing you should do is to tell it to Build All (Ctrl+F10, or Project > Build All). If this doesn't help, keep digging here.
  #13   Spotlight this post!  
Unread 17-01-2005, 20:43
djcapelis's Avatar
djcapelis djcapelis is offline
Fried Manic Custard
None #0675 (Geeks with Power Tools)
Team Role: Programmer
 
Join Date: May 2003
Rookie Year: 2001
Location: Rohnert Park, CA
Posts: 129
djcapelis will become famous soon enoughdjcapelis will become famous soon enough
Send a message via ICQ to djcapelis Send a message via AIM to djcapelis Send a message via Yahoo to djcapelis
Re: Programming FAQ

Quote:
Originally Posted by Bharat Nain
To answer another part of you question, there is no OS on the robot controller. It is a microchip which understands C and assembler. Search, Read documents and get a feel of what our robot controller(microchip product) is. Its might not be such a good idea to try to go as far and put Linux on there or something, Search, Read documents you can find and you will get a feel.

-Bharat
Not quite. The controller doesn't understand C or ASM actually, the compiler and linker turns these languages into machine code which the controller can understand. It works just like any other processor in that way.

I believe another thread on this forum is porting RTOS to the microcontroller.
__________________
"I have more friends than enemies, I'm working to resolve the issue."
  #14   Spotlight this post!  
Unread 06-02-2005, 17:44
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Programming FAQ

Quote:
Originally Posted by Astronouth7303
Q: I CAN'T FIND THE COMPILER!!! THE LINK IS MESSED UP!!! HELP!!!

A: Yes, we know you can't download the compiler right now. Asking again won't help. Just try again later (like tomarrow) and hope it works. We can't do anything about it no matter how much you pester us.
I e-mailed the support e-mail address on usfirst.org and the next day it worked. I don't know if this was just coincidence or if it was because of my e-mail, but there it is.
__________________
Aren't signatures a bit outdated?
  #15   Spotlight this post!  
Unread 08-02-2005, 18:03
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Programming FAQ

Quote:
Originally Posted by Astronouth7303
Q: I CAN'T FIND THE COMPILER!!! THE LINK IS MESSED UP!!! HELP!!!

A: Yes, we know you can't download the compiler right now. Asking again won't help. Just try again later (like tomarrow) and hope it works. We can't do anything about it no matter how much you pester us.
This is now outdated. At kick-off, Dave Lavery said that the compiler would be on Microchip's website for 2 weeks. The beggining of week number three was January 22, 2005. If you are still in need of a compiler, your best bet is to contact another FIRST member.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming - Getting Started Mark McLeod Programming 80 16-04-2008 23:37
C Programming Guide cbolin Programming 7 15-01-2005 13:22
Book on C programming - suggestions? wun Programming 18 14-01-2005 00:12
Robot Programming Education phrontist Programming 11 03-05-2004 07:32
A few questions on programming the Control System Avarik Control System 21 08-02-2004 11:42


All times are GMT -5. The time now is 08:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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