From 99d6ce7cfb81dd5f09bbc7937b60b33b1bd01408 Mon Sep 17 00:00:00 2001 From: topicchi Date: Tue, 21 Oct 2025 18:44:40 +0000 Subject: [PATCH] --- trunk/workspace/gcb/makeGCB.py | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 trunk/workspace/gcb/makeGCB.py diff --git a/trunk/workspace/gcb/makeGCB.py b/trunk/workspace/gcb/makeGCB.py deleted file mode 100644 index d236a661..00000000 --- a/trunk/workspace/gcb/makeGCB.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python - -import subprocess -import sys -import platform -import os - -actionLine = sys.argv[1] -projectFile = sys.argv[2] -picprg = 'PK2' -if len(sys.argv)>3: - picprg = sys.argv[3] - -codeFile = open(projectFile+".gcb", 'r') -startLine = codeFile.readline()[3:].strip() -boardLine = codeFile.readline()[3:].strip() -endLine = codeFile.readline()[3:].strip() -codeFile.close() - -sistema=platform.system() -family=boardLine.split(':')[0] -processor=boardLine.split(':')[1] - -if (startLine != "########### start ###########" or endLine != "########### end ###########"): - print("\nMake-GCB: Error in build-commands - can't process file") - sys.exit() - -if sistema=='Windows': - DIRGCB='E:/Progs/GreatCowBasic' -elif sistema=='Darwin': - DIRGCB='/Users/topicchi/Progs/GreatCowBasic' -else: - DIRGCB='/usr/share/GcBasic' - -CC='gcbasic' -OBJDIR='./Release' -if not (os.path.isdir(OBJDIR)): - os.makedirs(OBJDIR) - -gcbCommand = "%s/%s -O:%s/%s.asm -A:GCASM -K:A -V -NP %s.gcb" %(DIRGCB, CC, OBJDIR, projectFile, projectFile) -if picprg=='PK3': - flashCommandPIC = "/opt/microchip/mplabx/mplab_ipe/ipecmd.sh -P%s -F%s/%s.hex -M -TPPK3 -W" %(processor[3:], OBJDIR, projectFile) -else: - flashCommandPIC = "pk2cmd -p%s -f%s/%s.hex -m -r -t" %(processor, OBJDIR, projectFile) -flashCommandAVR = "avrdude -B 10 -c USBasp -p AT%s -U flash:w:%s/%s.hex:a" %(processor, OBJDIR, projectFile) -#print flashCommandPIC - -presult=0 -if actionLine=="build": - print(gcbCommand) - presult = subprocess.call(gcbCommand, shell=True) - -if actionLine=="flash": - hexFile="%s/%s.hex" %(OBJDIR, projectFile) - if not os.path.isfile(hexFile): - print "\nMake-GCB: generating HEX: %s" %(hexFile) - print(gcbCommand) - presult = subprocess.call(gcbCommand, shell=True) - - if family=="pic": - flashCommand=flashCommandPIC - else: - flashCommand=flashCommandAVR - presult = subprocess.call(flashCommand, shell=True) - -if presult != 0: - print("\nMake-GCB: Failed - result code = %s --" %(presult)) -else: - print("\nMake-GCB: -- Success --") -