I made my first program with mplab but I can’t locate the HEX file with the IFI loader, I searched everywhere, even from most recent, all I find are all the other files but not the HEX file. Is there some kind of command that makes a HEX file? Or is something disabled? Please answer!
I found a way on how to export the hex file, but the IFI loader says:
Invalid Address : 0x0 (Correct Range : 0x800-0x7fff)
When I click export, a new window apears, under program memory, it says
Start: 0, End: 0x7ffe
What do I do? Please reply and thanx in advance!
I already solved everything by myself, I needed to export a Hex file. Then I had a problem with the IFI Loader, Invalid Address 0x0(Correct Range 0x800-0x7fff). All I did is forget about that Ifi loader and use easyC’s Ifi loader. Though in the terminal window all I see is a bunch of symbols. Besides that the robot works, if someone could please tell me what was wrong with the other Ifi loader or about the problem with the terminal window then I would be gratefull, I really need the PrintToScreen command. Thank you and I hope this was useful.
There are a few things you can look at. First up, did you config MPLABS for the right VEX processor 18F8520.
There should be a linker file that you are using, it looks like this:
// $Id: 18f8520.lkr,v 1.1 2006/01/18 19:12:08 jbeynon Exp $ // File: 18f8520i.lkr // Sample linker script for the PIC18F8520 processor LIBPATH . //FILES c018i.o FILES clib.lib FILES p18f8520.lib CODEPAGE NAME=vectors START=0x0 END=0x7ff PROTECTED CODEPAGE NAME=page START=0x800 END=0x7FFF CODEPAGE NAME=idlocs START=0x200000 END=0x200007 PROTECTED CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED CODEPAGE NAME=eedata START=0xF00000 END=0xF003FF PROTECTED ACCESSBANK NAME=accessram START=0x0 END=0x5F DATABANK NAME=gpr0 START=0x80 END=0xFF PROTECTED DATABANK NAME=gpr1 START=0x100 END=0x1FF DATABANK NAME=gpr2 START=0x200 END=0x2FF DATABANK NAME=gpr3 START=0x300 END=0x3FF DATABANK NAME=gpr4 START=0x400 END=0x4FF DATABANK NAME=gpr5 START=0x500 END=0x5FF DATABANK NAME=gpr6 START=0x600 END=0x6FF DATABANK NAME=gpr7 START=0x700 END=0x7F3 DATABANK NAME=dbgspr START=0x7F4 END=0x7FF PROTECTED ACCESSBANK NAME=accesssfr START=0xF60 END=0xFFF PROTECTED SECTION NAME=CONFIG ROM=config STACK SIZE=0x100 RAM=gpr6
Do you have the Vex library file in your library path?
Lastly, EasyC supplies the code for PrintToScreen. To get that functionallity you’ll need to get the WPI Library code and link to that library.
Thanks, the PrintToScreen command works awsomely though I still have to use the easyC loader, the linker script that I included is: 18f8520user.lkr. Is that correct?
The MPLAB compiler comes as part of EasyC, so it’s possible that is the right file name.
I had assumed that you were just using the MPLAB compiler on it’s own, not the EasyC supplied verision. The file name on my version is just 18f8520.lkr. And it puts the base at 800h. You will need to look at your linker file for a line that looks like:
CODEPAGE NAME=page START=0x800 END=0x7FFF
I’ve never dug into the internals of EasyC, so I have no idea how it does it’s mapping.
I got into the linker file and there’s a line that looks just like that. Should I edit that?(sorry if I sound a little noobish)
Both Down Loaders should download the Hex File correctly. (Try restoring the VEX Default Firmware with both loaders to verify this)
It sounds like you are getting close to having it ALL working…