Newby can't make hex file in MPLAB 8.5 with blink8x.bas program
I'm just starting with PICBASIC PRO. I installed v2.60 along with MPLAB 8.50 and the PBP tool suite is loaded into MPLAB. I'm using the PIC18 Explorer board with the PIC18F8722. I'm trying to compile (build?) and run the blink8x.bas sample program.
On Compiling the blink8x.bas program I get an error that it can't find the hex file and apparently I cannot program the PIC18 chip for debug or release. It says it's building BLINK8X.ASM and then an error msg pops up: Couldn't open hex file C:\PBP\SAMPLES\LABX1\blink8x.HEX although I see a July 16, 2009 version of BLINKX.HEX at C:\PBP\SAMPLES\LABX1.
MPASM 5.35 says "Building Files ..., BLINK8X.ASM, 100%, Errors 0, Warnings Reported 0 Suppressed 3, Messages Reported or Suppressed 0, Lines Assembled 10430" during the build process.
Here's from the Output window:
Executing: "C:\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p18F8722 "blink8x.bas"
Executing: "C:\PBP\PBPW.EXE" -ampasmwin -k# -p18F8722 "blink8x.bas"
PICBASIC PRO(TM) Compiler 2.60, (c) 1998, 2009 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Halting build on first failure as requested.
BUILD FAILED: Thu Apr 22 16:39:03 2010
So maybe there's something wrong with the configuration setup? There doesn't seem to be any Build Configuration set up as Build Configuration says (No Build Configurations). :confused:
Help please. Thanks in advance!
Can't get MCS working with Explorer-18, Can't get PBP to compile program, Not happy!
With MCS/PBP: I don't think I was able to get the Explorer-18 board configured with MCS. I didn't know how to set up the Explorer-18 board as the custom programmer. I tried PK3CMD.exe for the programmer file, but I have no idea if that's the correct exe file or if there are other parameters to set up. I think MCS/PBP compiled the code ok as it made the asm, hex etc files.
And with MPLAB: I still can't get MPLAB to compile the code, getting the usual:
Executing: "C:\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p18F8722 "blinkx.bas"
Executing: "C:\PBP\PBPW.EXE" -ampasmwin -k# -p18F8722 "blinkx.bas"
PICBASIC PRO(TM) Compiler 2.60, (c) 1998, 2009 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Halting build on first failure as requested.
BUILD FAILED: Fri Apr 23 10:47:04 2010
Not happy! Is there any hope with MCS/PBP or do I have to give up and switch to MPLAB and the C compiler route?
There's gotta be a way to get either MCS or MPLAP to do the whole thing.
Thanks mackrackit. Wow! That is clunky (compiling in MCS/PBP and then importing the hex file into MPLAB and programming the PIC18 on the Explorer 18 board), but it works. And it's a pain. I hope there's a better way because I really would like to use MPLAB and not bother with MCS. I don't see the advantage of using MCS since I can't program the PIC 18 chip in the Explorer 18 board in MCS. MCS seems useful only as an editor and compiler to make hex files.
But thanks again mackrackit!
Still no joy with MPLAB/SBP, Unable to execute mpasmwin
mackrackit:
Yes, I have read http://www.melabs.com/support/mplab.htm and I believe I followed it quite faithfully but of course I may have missed something.
Acetronics:
No I don't have any HI TECH compiler on my PC. Just to make sure, I did a search for "TIDE" and nothing showed up. Some IDE stuff for x86's such as QNX and LabWindows, but no HI TECH. You say it looks to be a "computer problem" but maybe you mean "operator problem?" ;)
And also to make sure (and in desperation), I reloaded PBP into C:\Program Files\Microchip\MPLAB IDE and ran MPLAB again compiling blinkx.bas, getting no errors but 3 suppressed warnings and it wasn't able to execute "mpasmwin."
Does that mean it can't find mpasmwin, or what? I see it at C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe and MPLAB "Set Language Tool Locations" is set up for it at that location, C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe.
Here's what I got after reloading SBP into C:\Program Files\Microchip\MPLAB IDE:
Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p18F8722 "blinkx.bas"
Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPW.EXE" -ampasmwin -k# -p18F8722 "blinkx.bas"
PICBASIC PRO(TM) Compiler 2.60, (c) 1998, 2009 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Halting build on first failure as requested.
BUILD FAILED: Fri Apr 23 14:11:40 2010
Thanks for your help. Any other ideas?
Bruce, That's it. Microchip\MPASM Suite wasn't in the PATH!
Bruce,
You're right, Microchip\MPASM Suite wasn't in the PATH. Now all is well, I think. Except that somehow I screwed up MPLAB so I wasn't able to modify my .bas file. It said that it couldn't find the old file in SaveAs or some such goofy thing. So I made a new .bas file and was able to compile it in MPLAB and program the chip. Hopefully no other goofy problem will show up.
I don't understand why the PATH wasn't set up properly. Maybe some problem in the MPLAB install?
Many thanks to you Bruce and to the others who gave me suggestions. :)
Re: Newby can't make hex file in MPLAB 8.5 with blink8x.bas program
Hello!
I am using MPLAB IDE 8.53 and using a Hi-Tech compiler. I have written my code in C. I am using a PIC16f877. My code gets compiled, but i cannot see any hex file in my project folder, nor does it mention it anywhere while building it. This is what i get in the ouput window when I have Re-Build the code.
Build C:\Charge_controller\charger for device 16F877
Using driver C:\Program Files\HI-TECH Software\PICC\9.70\bin\picc.exe
Make: The target "C:\Charge_controller\charger.p1" is out of date.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.70\bin\picc.exe" --pass1 "F:\PWM Charge Controller\charger.c" -q --chip=16F877 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Executing: "C:\Program Files\HI-TECH Software\PICC\9.70\bin\picc.exe" -ocharger.cof -mcharger.map --summary=default --output=default charger.p1 --chip=16F877 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
(1273) Omniscient Code Generation not available in Lite mode (warning)
HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode) V9.70
Copyright (C) 2009 Microchip Technology Inc.
Memory Summary:
Program space used 490h ( 1168) of 2000h words ( 14.3%)
Data space used 70h ( 112) of 170h bytes ( 30.4%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 0h ( 0) of 1h word ( 0.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
Running this compiler in PRO mode, with Omniscient Code Generation enabled,
produces code which is typically 40% smaller than in Lite mode.
The HI-TECH C PRO compiler output for this code could be 467 words smaller.
See http://microchip.htsoft.com/portal/pic_pro for more information.
Loaded C:\Charge_controller\charger.cof.
********** Build successful! **********
Desperately need some help. I am new to programming a PIC and also first to use MPLAB and Hi-Tech. How do i generate a HEX file??!!! :(((
Re: Newby can't make hex file in MPLAB 8.5 with blink8x.bas program
What, for a Hi-Tech C compiler? Sorry Mehran, this forum is for the Micro Engineering Labs (or Melabs.com) PICBASIC PRO compiler, not for the Hi-Tech C compiler. You should post your question to the Hi-Tech users forum.