robot controller 2005 2004

To upload this years default code or custom code to the 2004 or 2005 controller it seems like you should be able to just select the right Pic18f8520 for the compiler and thats that. I don’t understand why you would do instructions 2 and 3. The needed files seem to already be included in the default set of files???

the following instructions came in the file called Using_last_years_frc which is a part of the default files.

To compile this project to work with your 2005 FRC (18F8520) system do the following:

  1. Select the correct device from the MPLAB IDE.

    Configure->Select Device->PIC18F8520

  2. Replace the library file with the appropriate one.

    Remove the FRC_Library.lib file and replace it with FRC_Library_8520.lib

                                  or
    

    Remove the FRC_alltimers.lib file and replace it with FRC_alltimers_8520.lib

  3. Remove the 18f8722.lkr file and replace it with the 18f8520.lkr file

  4. Rebuild your project and download the HEX file to your controller.

Can anyone shed some light on this?

The library files are already compiled. So, switching the device in the MPLAB IDE will not do anything to recompile the libraries for the appropriate device. It will only compile your own code for the appropriate device. You have to tell it manually which library is appropriate. Hope that answers your question.

Thanks. it worked
The missing instructions (for those who are not MPLab proficient);
From the view of all files from MPLAB delete or remove the two files per insturction. Right Click on the library files heading and add files. Here you can select the FRC_library_8520 file. Then right click linker scripts and add the 18f8520.lkr file. If you selected the pic18f8520 device all will now compile correctly.

We tried using the 2005 controller for this year’s code, following all the instructions in that one file (the same that was posted here before), but we got this error:
Error - section ‘.code_terminal.o’ can not fit the section. Section ‘.code_terminal.o’ length=0x00000202

o.0; What’s that mean? The file’s too big?

I got that too. :confused: Can someone shed some light on this?

The code’s too large to fit within the smaller memory of the older robot controllers.

Check the size of the code in MPLAB using View -> Memory Gauge.
Caution: The value for program size is expressed in 2-byte integers and so must be doubled to get the number of bytes. The older controllers are limited to around 29K bytes while the new one has 126K or so available.