Add support for "windows_x86" development platform // Issue #263

This commit is contained in:
Ivan Kravets committed 2015-08-09 19:05:16 +03:00
1 parent 2715efd910
commit 5e2415cb37
10 files changed
+121 -7

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
VERSION = (2, 3, "0.dev0")
VERSION = (2, 3, "0.dev1")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"
+1 -2
View File
@@ -5,12 +5,11 @@
Builder for native platform
"""
from SCons.Script import DefaultEnvironment, AlwaysBuild, Default
from SCons.Script import AlwaysBuild, Default, DefaultEnvironment
env = DefaultEnvironment()
env.Replace(
SIZEPRINTCMD="size $SOURCES"
)
+49
View File
@@ -0,0 +1,49 @@
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
"""
Builder for Windows x86
"""
from SCons.Script import AlwaysBuild, Default, DefaultEnvironment
from platformio.util import get_systype
env = DefaultEnvironment()
env.Replace(
SIZEPRINTCMD="size $SOURCES",
PROGSUFFIX=".exe"
)
if get_systype() == "darwin_x86_64":
env.Replace(
AR="i586-mingw32-ar",
AS="i586-mingw32-as",
CC="i586-mingw32-gcc",
CXX="i586-mingw32-g++",
OBJCOPY="i586-mingw32-objcopy",
RANLIB="i586-mingw32-ranlib",
SIZETOOL="i586-mingw32-size",
SIZEPRINTCMD='"$SIZETOOL" $SOURCES'
)
#
# Target: Build executable program
#
target_bin = env.BuildProgram()
#
# Target: Print binary size
#
target_size = env.Alias("size", target_bin, "$SIZEPRINTCMD")
AlwaysBuild(target_size)
#
# Target: Define targets
#
Default([target_bin])
+9
View File
@@ -90,6 +90,9 @@ PLATFORM_PACKAGES = {
"tool-micronucleus": [
("Micronucleus", "https://github.com/micronucleus/micronucleus")
],
"toolchain-gccmingw32": [
("MinGW", "http://www.mingw.org")
],
"tool-bossac": [
("BOSSA CLI", "https://sourceforge.net/projects/b-o-s-s-a/")
],
@@ -224,6 +227,12 @@ class BasePlatform(object):
else:
raise NotImplementedError()
def is_embedded(self):
for name, opts in self.get_packages().items():
if name == "framework-mbed" or opts.get("alias") == "uploader":
return True
return False
def get_packages(self):
return self.PACKAGES
+24
View File
@@ -0,0 +1,24 @@
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
from platformio.platforms.base import BasePlatform
class Windows_x86Platform(BasePlatform):
"""
Windows x86 (32-bit) is a metafamily of graphical operating systems
developed and marketed by Microsoft.
Using host OS (Windows or Mac OS X) you can build native application
for Windows x86 platform.
http://platformio.org/#!/platforms/windows_x86
"""
PACKAGES = {
"toolchain-gccmingw32": {
"alias": "toolchain",
"default": True
}
}