Has anyone taken the time to list the equivalent mlab functions to Easy C functions? If so, I could use a copy to help me get started with mlab. Or, maybe there’s a link somewhere to this info.
Thanks
At 10 AM Sunday the 13th the link (http://www.vexfan.com/viewtopic.php?t=31) to the vexfan site is dead…
Is that what I was supposed to learn to expect when/if I try to combine the EasyC API with MPLAB?
Blake
I would re-post the tutorial, but I don’t use the EasyC API any more, and I can not recall how to do it :-(.
Link’s back up, good stuff…
I’m reposting here in case the Vex Fan site goes down again.
Here is how you can make MPLAB use the API that EasyC supplies you with (no having to “hand code” it).
- Get MPLAB (any version (tested on 7.30)), IFI_Loader (optional) and install them.
- Open MPLAB, goto Project->Set Language Tool Locations.
- Set the executables for Microchip C18 Toolset to the tools in EasyC install path\EasyC\Mcc18\bin. The file name is in parentheses.
- Make a new project (Project->New…).
- Now to set the build options. You need to set these to the following directories (others are your choice). Include path must be set to: “EasyC install path\easyC\VeX\UserAPI”. Library path must be set to: “EasyC install path\mcc18\lib”. Linker-Script path must be set to: “EasyC install path\mcc18\lib”.
- Now to add some files to the project. Add the UserAPI.h file found at “EasyC install path\VeX\UserAPI”. Next, add all of the .o files in “EasyC install path\VeX\Object”. Now, add Vex_library.lib found in “EasyC install path\VeX\Library”. Finally add 18f8520user.lkr found in “EasyC install path\VeX\Linker”.
- Create a new file titled “bot.c” or something simillar (must be .c) Add the following to it
#include "UserAPI.h"
void IO_Initialization(void){
//Controller Port #: 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16
DefineControllerIO(4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0);
}
void main(void){
//robot code here
}
- You are now ready to start coding the robot
NOTE: When you compile a program in MPLAB, you have to manualy find the .hex file for upload. It is placed in your “Output directory” from the build options panel.
Any idea why I’m getting:
Deleting intermediary files… done.
Executing: “C:\Program Files\Intelitek\easyC\Mcc18\bin\cpp18.exe” -p=18F8520 “Test1.c” -fo=“Test1.o” /i"C:\Program Files\Intelitek\easyC\VeX\UserAPI" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
-p=18F8520: unknown option
Halting build on first failure as requested.
BUILD FAILED: Wed Aug 16 20:26:33 2006
Thanks…
Fixed!
I set compiler to cpp18 instead of mcc18:cool: