-
PBP in MPLAB
I have been trying for the past day or so to get MPLAB to compile a pbp file.
PBP (V2.46) is installed and operating, but for some reason MPASM refuses to assemble to code to produce a hex file.
I set up a project with a only a known operating (compiles and assembles fine using Microcode Studio/MPASM Assembler) basic file. This file is the only one added to my new project. Directories are kept short but errors always occur when I try to build the basic code.
The build message shows:
Executing: "C:\PBP\PBPW.EXE-ampasmwin-oq-z -p16F819"Car Computer Accel.pbp"
PicBasic Pro Compiler 2.46, (c) 1998, 2005 microEngineering Labs, Inc.
All Rights Reserved
ERROR: Unable to execute mpasmwin. Skipping link step. Not all sources built successfully.
BUILD FAILED: Tue Dec 27 19:15:34 2005
This baffles me because I can open the EXACT same source in MC Studio and compile and assemble flawlessly, even with MPASM. But the moment I try the same thing in MPLAB all of a sudden it will not build...I have tried numerous "example" code and none of that compiles...the basic blink routine won't build either.
I have followed step-by-step this tutorial to no avail: http://www.melabs.com/support/mplab.htm
What is the cause of this error and how can it be fixed?
Alternatively, how could I just import a raw hex file (compiled/assembled in MC Studio) into MPLAB to program using a PIC Start+?
Any responses are greatly appreciated.
-
Executing: "C:\PBP\PBPW.EXE-ampasmwin-oq-z -p16F819"Car Computer Accel.pbp"
PicBasic Pro Compiler 2.46, (c) 1998, 2005 microEngineering Labs, Inc.
All Rights Reserved
ERROR: Unable to execute mpasmwin. Skipping link step. Not all sources built successfully.
BUILD FAILED: Tue Dec 27 19:15:34 2005
At first look, if the above is exactly the error shown by the PC and your command line is just like the first line shown here, I see a couple of problems:
The extra " mark in between 819 and Car - shorten the filename and get rid of the extra " mark
The lack of a space after .EXE, the space needs to be there
The lack of spaces in front of any of the dashes specifying options, again, spaces generally need to be there.
This is what my command line looks like for comparison purposes and it works just fine:
d:\pbp\pbpw -aC:\Progra~1\Microchip\MPASMS~1\MPASMWIN.EXE -c -e -p18f4620 -v -ie:\pbp\inc test4620.bas
Notice I don't give the compiler a chance to use long filenames, I use their old DOS8.3 equivalents, saves me agravation in the future. And also notice all of the spaces in front of the dashes for the options...
Hope that helps...
JDG
-
Hi, Zagi
Do not forget to download the 2.46 Patch from Melabs, nor ...
Alain
-
hex import in mplab
Hi zagi,
I had tried import a .hex file into MPLAB, but I think that´s impossible.
Best regards
Eduardo
-
I have tried adding the patch, my directories have been shortened to no space, <8 character file names.
Still no luck. I can use PBP in MC Studio to produce an assembly file, which will compile fine when loaded into MPLAB and MPASM is used to create a cod file. The problem lies when I try to go from basic-asm-cod in MPLAB. Like I said there is no problem going from asm-cod but I can't get the full conversion from basic to work at all???
Here is another example message, a direct copy/paste:
Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z -p16F819 "CCA.bas"
PicBasic Pro Compiler 2.46, (c) 1998, 2005 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Skipping link step. Not all sources built successfully.
BUILD FAILED: Wed Dec 28 10:00:42 2005
I am very confused and frustrated. I appreciate all the help you guys have given me so far, it seems I am now on the brink of solving the problem but I have no idea what to check now. I am running XP Home if it makes any difference.
Edit: I have a hunch my problem might lie in the "-ampasmwin -oq -z" part of the first line. Can someone please confirm that their parts of that line are the same? Or inform me as to what it is/does?
Thanks so much!
-
Hi zagi,
1. Did you read this thread ? http://www.picbasic.co.uk/forum/showthread.php?t=2883
2. Have you looked at the settings in MPAB IDE under Project>Build Options>Project>PicBasicPro? Is there anything out of line there?