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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cant find how to use the command line syntax to compile GCBasic if i want to just write in notepad..
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:
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