diff --git a/configtool.default.ini b/configtool.default.ini index 5c887ab..3c09233 100644 --- a/configtool.default.ini +++ b/configtool.default.ini @@ -19,11 +19,11 @@ arduinodir = # # Note: the flag -save-temps=obj does not appear to be a valid flag for win32. # Omit the "=obj", or omit it entirely. -cflags = -DF_CPU=%F_CPU% -mmcu=%CPU% -Wall -Wstrict-prototypes -std=gnu99 +cflags = -DF_CPU=%%F_CPU%% -mmcu=%%CPU%% -Wall -Wstrict-prototypes -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Winline -fno-move-loop-invariants -fno-tree-scev-cprop -Os -ffunction-sections -finline-functions-called-once -mcall-prologues - -Wa,-adhlns=%ALNAME% -save-temps=obj + -Wa,-adhlns=%%ALNAME%% -save-temps=obj # Flags passed to avr-gcc to be passed on to the linker. ldflags = -Wl,--as-needed -Wl,--gc-sections diff --git a/configtool/build.py b/configtool/build.py index f2092a5..e31b31f 100644 --- a/configtool/build.py +++ b/configtool/build.py @@ -1,11 +1,18 @@ import wx.lib.newevent -import thread, shlex, subprocess -import os, re + +try: + import thread as _thread +except ImportError: + import _thread +import shlex +import subprocess +import os +import re from os.path import isfile, join from sys import platform if platform.startswith("win"): - from _subprocess import STARTF_USESHOWWINDOW + from subprocess import STARTF_USESHOWWINDOW (scriptEvent, EVT_SCRIPT_UPDATE) = wx.lib.newevent.NewEvent() SCRIPT_RUNNING = 1 @@ -80,7 +87,7 @@ class ScriptThread: def Start(self): self.running = True self.cancelled = False - thread.start_new_thread(self.Run, ()) + _thread.start_new_thread(self.Run, ()) def Stop(self): self.cancelled = True