Menu

Help with command line compiling

2011-11-17
2013-05-30
  • Nobody/Anonymous

    I cant find how to use the command line syntax to compile GCBasic if i want to just write in notepad..

     
  • Bert

    Bert - 2011-11-18

    The help file says to drag the .txt file onto the file gcbasic.exe, then to download the new 'compiled.hex'.  This way automatically compiles and assembles the code, and downloading is a separate step.

    But what I find most convenient and reliable is to use GCBasic to compile, then use GPASM to assemble, then use my choice of downloading software, all done in one batch file.  I drag my .txt file onto the batch file (in the same folder) and it goes into the PIC chip:

    @ECHO OFF
    cd \Program Files\GCBASIC\
    GCBASIC /O:compiled.asm /V %1
    \progra~1\gputils\bin\gpasm -I\progra~1\gputils\header -i -w2 compiled.asm >compiled.err
    del compiled.cod>nul
    cd \Program Files\Winpic\
    winpic "c:\Program Files\GCBASIC\compiled.hex" /p
    

    I don't recall why, in the assembling step, I needed to modify the 'MAKESAM.BAT contents to include the header folder (maybe my GPUTILS is outdated) but this works for me.  My choice of WINPIC is of course based on my own setup, and that application is configured for my programmer.

    -Bert

     

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.