mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-03 20:04:27 +02:00
Minor fixes; full support of Windows
This commit is contained in:
@@ -4,6 +4,7 @@ board_mcu = atmega168
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_port = /dev/tty.SLAB_USBtoUART
|
||||
; upload_port = COM3
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
|
||||
|
@@ -51,7 +51,7 @@ if not isdir(env['PLATFORMIOHOME_DIR']):
|
||||
"`platformio install` command")
|
||||
elif not isdir(env.subst("$PLATFORM_DIR")):
|
||||
Exit("An '%s' platform hasn't been installed yet. Please use "
|
||||
"`platformio install %s` command" % (env['PLATFORM'].upper(),
|
||||
"`platformio install %s` command" % (env['PLATFORM'],
|
||||
env['PLATFORM']))
|
||||
|
||||
SConscriptChdir(0)
|
||||
|
@@ -15,7 +15,7 @@ env = DefaultEnvironment()
|
||||
|
||||
env.Replace(
|
||||
AR="avr-ar",
|
||||
AS="avr-as",
|
||||
AS="avr-gcc",
|
||||
CC="avr-gcc",
|
||||
CXX="avr-g++",
|
||||
OBJCOPY="avr-objcopy",
|
||||
|
@@ -11,11 +11,13 @@ from os.path import join
|
||||
from SCons.Script import (AlwaysBuild, Builder, Default, DefaultEnvironment,
|
||||
SConscript, SConscriptChdir)
|
||||
|
||||
from platformio.util import get_system
|
||||
|
||||
env = DefaultEnvironment()
|
||||
|
||||
env.Replace(
|
||||
AR="msp430-ar",
|
||||
AS="msp430-as",
|
||||
AS="msp430-gcc",
|
||||
CC="msp430-gcc",
|
||||
CXX="msp430-g++",
|
||||
OBJCOPY="msp430-objcopy",
|
||||
@@ -49,7 +51,7 @@ env.Replace(
|
||||
|
||||
UPLOADER=join("$PLATFORMTOOLS_DIR", "mspdebug", "mspdebug"),
|
||||
UPLOADERFLAGS=[
|
||||
"$UPLOAD_PROTOCOL",
|
||||
"$UPLOAD_PROTOCOL" if get_system() != "windows32" else "tilib",
|
||||
"--force-reset"
|
||||
],
|
||||
UPLOADCMD='$UPLOADER $UPLOADERFLAGS "prog $SOURCES"'
|
||||
|
@@ -15,7 +15,7 @@ env = DefaultEnvironment()
|
||||
|
||||
env.Replace(
|
||||
AR="arm-none-eabi-ar",
|
||||
AS="arm-none-eabi-as",
|
||||
AS="arm-none-eabi-gcc",
|
||||
CC="arm-none-eabi-gcc",
|
||||
CXX="arm-none-eabi-g++",
|
||||
OBJCOPY="arm-none-eabi-objcopy",
|
||||
@@ -25,7 +25,7 @@ env.Replace(
|
||||
|
||||
ASFLAGS=[
|
||||
"-g", # include debugging info (so errors include line numbers)
|
||||
"-x", "-assembler-with-cpp",
|
||||
"-x", "assembler-with-cpp",
|
||||
"-Wall",
|
||||
"-mthumb",
|
||||
"-mcpu=cortex-m4",
|
||||
|
@@ -65,13 +65,19 @@ class FileDownloader(object):
|
||||
if not sha1:
|
||||
return
|
||||
|
||||
dlsha1 = None
|
||||
try:
|
||||
res = check_output(["shasum", self._destination])
|
||||
res = check_output(["sha1sum", self._destination])
|
||||
dlsha1 = res[:40]
|
||||
if sha1 != dlsha1:
|
||||
raise FDSHASumMismatch(dlsha1, self._fname, sha1)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
res = check_output(["shasum", "-a", "1", self._destination])
|
||||
dlsha1 = res[:40]
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
if dlsha1 and sha1 != dlsha1:
|
||||
raise FDSHASumMismatch(dlsha1, self._fname, sha1)
|
||||
|
||||
def _preserve_filemtime(self, lmdate):
|
||||
timedata = parsedate_tz(lmdate)
|
||||
|
@@ -10,7 +10,7 @@ class TitivaPlatform(BasePlatform):
|
||||
|
||||
PACKAGES = {
|
||||
|
||||
"toolchain-titiva": {
|
||||
"toolchain-gccarmnoneeabi": {
|
||||
"path": join("tools", "toolchain"),
|
||||
"default": True
|
||||
},
|
||||
@@ -22,7 +22,7 @@ class TitivaPlatform(BasePlatform):
|
||||
|
||||
"framework-energiativa": {
|
||||
"path": join("frameworks", "energia"),
|
||||
"default": False
|
||||
"default": True
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -44,6 +44,7 @@ def change_filemtime(path, time):
|
||||
|
||||
|
||||
def exec_command(args):
|
||||
p = Popen(args, stdout=PIPE, stderr=PIPE)
|
||||
use_shell = get_system() == "windows32"
|
||||
p = Popen(args, stdout=PIPE, stderr=PIPE, shell=use_shell)
|
||||
out, err = p.communicate()
|
||||
return dict(out=out.strip(), err=err.strip())
|
||||
|
1
setup.py
1
setup.py
@@ -17,6 +17,7 @@ setup(
|
||||
license=__license__,
|
||||
install_requires=[
|
||||
"click",
|
||||
"colorama",
|
||||
"pyserial",
|
||||
"requests",
|
||||
# "SCons"
|
||||
|
Reference in New Issue
Block a user