Newby can't make hex file in MPLAB 8.5 with blink8x.bas program


Closed Thread
Results 1 to 16 of 16
  1. #1
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17

    Question 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).

    Help please. Thanks in advance!
    Last edited by ImAnEE; - 23rd April 2010 at 00:51. Reason: put Here's from the Output window: in wrong place

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Are you running a 64-bit Windows system?

    http://melabs.com/support/pbpissues.htm#64-bit
    <br>
    DT

  3. #3
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Darrel: I don't think so but I'm really not sure. In the Control Panel under System it says Microsoft Windows XP Professional Version 2002 Service Pack 3. I don't see anything about 64 bit. Is there a way to be sure? BTW, I'm not using MicroCode Studio. Should I be? I didn't see that in the instructions. I'm just using the MPLAB IDE v8.50.

    Thanks!

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Sometimes MPLAB is difficult to setup, MCS is pretty easy. MPLAB and MCS both have nice features, both are good.

    Try MCS.
    When you start it for the first time, in the tool bar click
    View
    Compiler and Program Options

    On the Compiler tab click "Find Automatically".

    One the Assembler tab check "Use MPASM" and click "Find Automatically".

    That should have you setup with MCS.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default Blink8X

    I've only had a quick look at Blink8X, and I think:

    1. It's a PB program not PBP so you may get problems.
    2. The program does not have any of the usual 'set up' commands:
    . Xtal frequency.
    . Include files.
    . Make PortA digital etc.
    3. It's a bit unusual to start learning PBP on a PIC18F8722 and doing it in MPLAB. Most people choose something like an PIC16F84A anf use MCS.

    Regards Bill Legge

  6. #6
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Thanks very much for the comments and suggestions. They are truly appreciated.

    mackrackit: I'll give MCS a try when I get back to work. Hopefully MCS will work with my Explorer-18 board. I'm not familiar with MCS and PBP, having only used MPLAB and C compilers with 16F877 and dsPIC33 micros.

    Bill: I was following the startup instructions for PBP and it suggested the blink8x.bas program. I should have realized it's not a PBP program. And you're right, maybe I should have started with a PIC16F84A and MCS but my project is on a very aggressive schedule. Since I'm familiar with MPLAB and a co-worker on the project suggested a PIC18 part and PBP (PBP to get the software done quickly), I figured "what could go wrong?" Hopefully this problem will be just a little speed-bump since it looks like PBP should do the job for me and be easier to work with than the C compilers.

    Again, thanks very much for your suggestions! :-)

  7. #7
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Unhappy 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?

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I do not know the script for your board but I am sure someone here does.

    In the mean time being MCS/PBP/MPASM is creating the HEX, just use PLAB to run the programmer.

    That is what I do with the PicStart+. Yup, it is a pain but then I purchased a PicKit2.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default 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!

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I do use PBP 2.5 in MPLAB but I have not upgraded to PBP 2.6 yet so I do not know the new steps for a fact.

    Have you read this?
    http://www.melabs.com/support/mplab.htm
    Dave
    Always wear safety glasses while programming.

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Here's what I get using MPLAB 8.50 and PBP 2.60 ...

    Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p18F8722 "blink8x.bas"
    Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPW.EXE" -ampasmwin -k# -p18F8722 "blink8x.bas"
    PICBASIC PRO(TM) Compiler 2.60, (c) 1998, 2009 microEngineering Labs, Inc.
    All Rights Reserved.
    Loaded C:\Program Files\Microchip\MPLAB IDE\PBP\SAMPLES\LABX1\blink8x.COF.
    BUILD SUCCEEDED: Fri Apr 23 21:12:40 2010
    so it looks to be a "computer problem" ...

    I'd be really curious to know if you have the HI TIDE 3.15 IDE ( Hitech ) installed on your computer ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  12. #12
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default 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?
    Last edited by ImAnEE; - 23rd April 2010 at 23:15. Reason: redundant stuff

  13. #13
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You don't want or need PBP in your MPLAB directory. Drop out to a command prompt and type PATH then hit enter.

    Does it show C:\Program Files\Microchip\MPASM Suite in your path?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  14. #14
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Smile 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.

  15. #15
    Mehran's Avatar
    Mehran Guest


    Did you find this post helpful? Yes | No

    Default 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??!!! ((

  16. #16
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default 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.

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts