|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
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. |
|
#3
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Programming FAQ
Q. I get an error when i try to compile:
Quote:
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):
|
|
#5
|
||||
|
||||
|
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
|
|||
|
|||
|
Re: Programming FAQ
Quote:
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
|
||||
|
||||
|
Re: Programming FAQ
Quote:
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] Last edited by randomperson : 23-12-2004 at 22:24. |
|
#8
|
|||||
|
|||||
|
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 |
|
#9
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Programming FAQ
Quote:
Matt |
|
#11
|
|||||
|
|||||
|
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
|
|||||
|
|||||
|
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
|
|||||
|
|||||
|
Re: Programming FAQ
Quote:
|
|
#14
|
|||||
|
|||||
|
Re: Programming FAQ
Quote:
|
|
#15
|
||||
|
||||
|
Re: Programming FAQ
Right now for my team I am the only ""programmer"" so we are using the same code from last year to run the new one, but the computer that held it crashed and our back up is sitting on a college freshmen's desk.
Q. is there anyway to "uncompile" the code directly from the controller? or do i have to start from scratch? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |