Menu

18F Configuration Error

kent_twt4
2007-08-27
2013-05-30
  • kent_twt4

    kent_twt4 - 2007-08-27

    Just trying to get going on the 18f devices and getting a config error back from assembly.  Sorry if this has been covered before.

    ---------- Capture Output ----------
    > "C:\Program Files\GCBasic\Compile.bat" C:\PROGRA~1\CRIMSO~1\16F443~1
    Great Cow BASIC (0.9 4/8/2007)

    Compiling C:\PROGRA~1\CRIMSO~1\16F443~1 ...
    Program compiled successfully!

    Assembling program ...
    Assembly failed due to the following errors:

    compiled.asm:10:Error [174] Unknown opcode "CONFIG"

    Press any key to continue

     
    • Hugh Considine

      Hugh Considine - 2007-08-27

      This is probably because GCBASIC uses the newer MPASM CONFIG directive on 18F chips, but gputils only supports _CONFIG. The solution is to use either MPASM or the GCBASIC internal assembler - more info here:
      https://sourceforge.net/forum/forum.php?thread_id=1675925&forum_id=579126

      I plan on making the internal assembler the default in the next version of GCBASIC, as it will remove the need to find a suitable assembler for AVRs. It may be a little buggy at present, but I'm keen for it to be well tested before release - an assembler bug is harder to spot than a compiler bug!

       
    • kent_twt4

      kent_twt4 - 2007-08-28

      Got the file to assemble for the 18f4331 under MPASM per your instructions.  The AD registers are way different than the 18f4550 and?  Had to cut out the TurnOff AD used for system initialization from the system.h file.  Please note no problem compiling the same file substituting the 18f4550 device.

      Now the programmer says the hex file is too big for the device when it clearly is not (Just blinking a Led on and off).  The MPASM is set with case sensitive-off and with the 18f4431 device, so not sure what might be the problem.  The only thing I notice is when looking at say a 16f hex+ascii file the hex ends at "3FFF" then ascii goes to ".?".  When looking at an 18f hex+ascii after the hex "3FFF" the ascii goes to ".." and stays that way.  This may not be significant, maybe its the way that MPASM is configured?

      Same deal when trying to us GCASM, must be my setup.

       
  • Peter  Rabiger

    Peter Rabiger - 2010-10-07

    18Fxxxx compiler error.
    Downloaded the latest GCB update. Looks like problem is not solved yet. Need an easy to handle solution. I am not that prof to jump around in MPASM or so. So far what I have discovered with the new update its quite impressing. Thanks for your hard work and efforts.
    Peter R.

     
  • Peter  Rabiger

    Peter Rabiger - 2010-10-15

    I am working on the German translation of the GCB help file. The English has some sample programms with PIC 18Fxxx. How were they compiled? See my post (trilusion)
    Would it be advisable to replace those samples with 16Fxxx types?

    Thanks
    Peter Rabiger

     
  • Hugh Considine

    Hugh Considine - 2010-10-16

    There are a couple of ways to fix this.

    One option is to download the latest version of gputils. They added support for the newer CONFIG directive in the version after that which is included in GCBASIC.

    The other option is to use the built in assembler of GCBASIC. If you're using the compile.bat file, you can open it in Notepad, find the /A:makeasm.bat switch, and change it to /A:GCASM. The update also gives you the option of deleting compile.bat, and compiling programs by dragging and dropping them onto gcbasic.exe. If you do this, rename the "sample gcbasic.ini" file to "gcbasic.ini" - this is the new settings file for GCBASIC and replaces compile.bat. Find the line that starts with "Assembler = " and change it to "Assembler = GCASM". (From memory the default Assembler line is for MPASM, and there is an example a couple of lines down that shows how to change it to GCASM.)

     
  • Peter  Rabiger

    Peter Rabiger - 2010-11-05

    Got your reply. Both suggestions as how to fix the problem are working. Thanks a lot.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.