Skip to content

Commit

Permalink
Merge branch 'release/v1.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Aug 13, 2018
2 parents 52c0d78 + 6a883c1 commit 394e85f
Show file tree
Hide file tree
Showing 11 changed files with 324 additions and 96 deletions.
30 changes: 30 additions & 0 deletions boards/wifi_slot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_AMPERKA_WIFI_SLOT",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "eagle.flash.1m0.ld",
"mcu": "esp8266",
"variant": "wifi_slot"
},
"connectivity": [
"wifi"
],
"frameworks": [
"arduino",
"esp8266-rtos-sdk",
"esp8266-nonos-sdk"
],
"name": "WiFi Slot",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"require_upload_port": true,
"resetmethod": "nodemcu",
"speed": 115200
},
"url": "http://wiki.amperka.ru/wifi-slot",
"vendor": "Amperka"
}
30 changes: 30 additions & 0 deletions boards/wifiduino.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_WIFIDUINO_ESP8266",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "eagle.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "wifiduino"
},
"connectivity": [
"wifi"
],
"frameworks": [
"arduino",
"esp8266-rtos-sdk",
"esp8266-nonos-sdk"
],
"name": "WiFiduino",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"require_upload_port": true,
"resetmethod": "nodemcu",
"speed": 115200
},
"url": "https://www.facebook.com/WifiDuino/",
"vendor": "WifiDuino"
}
30 changes: 30 additions & 0 deletions boards/wio_link.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_AMPERKA_WIFI_SLOT",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "eagle.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "wiolink"
},
"connectivity": [
"wifi"
],
"frameworks": [
"arduino",
"esp8266-rtos-sdk",
"esp8266-nonos-sdk"
],
"name": "Wio Link",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"require_upload_port": true,
"resetmethod": "nodemcu",
"speed": 115200
},
"url": "https://www.seeedstudio.com/Wio-Link-p-2604.html",
"vendor": "SeeedStudio"
}
30 changes: 30 additions & 0 deletions boards/xinabox_cw01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_GENERIC",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "eagle.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "xinabox"
},
"connectivity": [
"wifi"
],
"frameworks": [
"arduino",
"esp8266-rtos-sdk",
"esp8266-nonos-sdk"
],
"name": "XinaBox CW01",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"require_upload_port": true,
"resetmethod": "nodemcu",
"speed": 115200
},
"url": "https://xinabox.cc/products/cw01",
"vendor": "XinaBox"
}
91 changes: 91 additions & 0 deletions builder/frameworks/_bare.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Copyright 2014-present PlatformIO <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Default flags for bare-metal programming (without any framework layers)
#

from os.path import join

from SCons.Script import Import

Import("env")

env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],

CFLAGS=[
"-std=gnu99",
"-Wpointer-arith",
"-Wno-implicit-function-declaration",
"-Wl,-EL",
"-fno-inline-functions",
"-nostdlib"
],

CCFLAGS=[
"-Os", # optimize for size
"-mlongcalls",
"-mtext-section-literals",
"-falign-functions=4",
"-U__STRICT_ANSI__",
"-ffunction-sections",
"-fdata-sections"
],

CXXFLAGS=[
"-fno-rtti",
"-fno-exceptions",
"-std=c++11"
],

CPPDEFINES=[
("F_CPU", "$BOARD_F_CPU"),
"__ets__",
"ICACHE_FLASH"
],

LINKFLAGS=[
"-Os",
"-nostdlib",
"-Wl,--no-check-sections",
"-u", "call_user_start",
"-u", "_printf_float",
"-u", "_scanf_float",
"-Wl,-static",
"-Wl,--gc-sections"
],

CPPPATH=[
join("$SDK_ESP8266_DIR", "include"), "$PROJECTSRC_DIR"
],

LIBPATH=[
join("$SDK_ESP8266_DIR", "lib"),
join("$SDK_ESP8266_DIR", "ld")
],

LIBS=[
"c", "gcc", "phy", "pp", "net80211", "lwip", "wpa", "wpa2",
"main", "wps", "crypto", "json", "ssl", "pwm", "upgrade",
"smartconfig", "airkiss", "at"
]
)

# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

env.Replace(
UPLOAD_ADDRESS="0x40000"
)
52 changes: 51 additions & 1 deletion builder/frameworks/esp8266-nonos-sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,52 @@
FRAMEWORK_DIR = platform.get_package_dir("framework-esp8266-nonos-sdk")
assert isdir(FRAMEWORK_DIR)

env.Prepend(
env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],

CFLAGS=[
"-std=gnu99",
"-Wpointer-arith",
"-Wno-implicit-function-declaration",
"-Wl,-EL",
"-fno-inline-functions",
"-nostdlib"
],

CCFLAGS=[
"-Os", # optimize for size
"-mlongcalls",
"-mtext-section-literals",
"-falign-functions=4",
"-U__STRICT_ANSI__",
"-ffunction-sections",
"-fdata-sections",
"-fno-builtin-printf"
],

CXXFLAGS=[
"-fno-rtti",
"-fno-exceptions",
"-std=c++11"
],

LINKFLAGS=[
"-Os",
"-nostdlib",
"-Wl,--no-check-sections",
"-Wl,-static",
"-Wl,--gc-sections",
"-u", "call_user_start",
"-u", "_printf_float",
"-u", "_scanf_float"
],

CPPDEFINES=[
("F_CPU", "$BOARD_F_CPU"),
"__ets__",
"ICACHE_FLASH"
],

CPPPATH=[
join(FRAMEWORK_DIR, "include"),
join(FRAMEWORK_DIR, "extra_include"),
Expand All @@ -43,6 +88,7 @@
join(FRAMEWORK_DIR, "include", "ssl"),
join(FRAMEWORK_DIR, "include", "json"),
join(FRAMEWORK_DIR, "include", "openssl"),
join("$SDK_ESP8266_DIR", "include"), "$PROJECTSRC_DIR"
],

LIBPATH=[
Expand All @@ -56,8 +102,12 @@
]
)

# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

env.Replace(
LDSCRIPT_PATH=[join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld")],
UPLOAD_ADDRESS="0x10000"
)

#
Expand Down
50 changes: 49 additions & 1 deletion builder/frameworks/esp8266-rtos-sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,51 @@
FRAMEWORK_DIR = platform.get_package_dir("framework-esp8266-rtos-sdk")
assert isdir(FRAMEWORK_DIR)

env.Prepend(
env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],

CFLAGS=[
"-std=gnu99",
"-Wpointer-arith",
"-Wno-implicit-function-declaration",
"-Wl,-EL",
"-fno-inline-functions",
"-nostdlib"
],

CCFLAGS=[
"-Os", # optimize for size
"-mlongcalls",
"-mtext-section-literals",
"-falign-functions=4",
"-U__STRICT_ANSI__",
"-ffunction-sections",
"-fdata-sections"
],

CXXFLAGS=[
"-fno-rtti",
"-fno-exceptions",
"-std=c++11"
],

LINKFLAGS=[
"-Os",
"-nostdlib",
"-Wl,--no-check-sections",
"-Wl,-static",
"-Wl,--gc-sections",
"-u", "call_user_start",
"-u", "_printf_float",
"-u", "_scanf_float"
],

CPPDEFINES=[
("F_CPU", "$BOARD_F_CPU"),
"__ets__",
"ICACHE_FLASH"
],

CPPPATH=[
join(FRAMEWORK_DIR, "include"),
join(FRAMEWORK_DIR, "extra_include"),
Expand All @@ -58,8 +102,12 @@
]
)

# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

env.Replace(
LDSCRIPT_PATH=[join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld")],
UPLOAD_ADDRESS="0x20000"
)

#
Expand Down
9 changes: 7 additions & 2 deletions builder/frameworks/simba.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from os.path import join, sep

from SCons.Script import DefaultEnvironment, SConscript
from SCons.Script import DefaultEnvironment

from platformio.builder.tools import platformio as platformio_tool

Expand All @@ -50,9 +50,14 @@ def VariantDirWrap(env, variant_dir, src_dir, duplicate=False):
env.AddMethod(LookupSources)
env.AddMethod(VariantDirWrap)

env.Append(
CPPDEFINES=[
("F_CPU", "$BOARD_F_CPU")
]
)
env.Replace(
PLATFORMFW_DIR=env.PioPlatform().get_package_dir("framework-simba")
)

SConscript(
env.SConscript(
[env.subst(join("$PLATFORMFW_DIR", "make", "platformio.sconscript"))])
Loading

0 comments on commit 394e85f

Please sign in to comment.