Skip to content

Commit 394e85f

Browse files
committed
Merge branch 'release/v1.8.0'
2 parents 52c0d78 + 6a883c1 commit 394e85f

File tree

11 files changed

+324
-96
lines changed

11 files changed

+324
-96
lines changed

boards/wifi_slot.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"build": {
3+
"core": "esp8266",
4+
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_AMPERKA_WIFI_SLOT",
5+
"f_cpu": "80000000L",
6+
"f_flash": "40000000L",
7+
"flash_mode": "qio",
8+
"ldscript": "eagle.flash.1m0.ld",
9+
"mcu": "esp8266",
10+
"variant": "wifi_slot"
11+
},
12+
"connectivity": [
13+
"wifi"
14+
],
15+
"frameworks": [
16+
"arduino",
17+
"esp8266-rtos-sdk",
18+
"esp8266-nonos-sdk"
19+
],
20+
"name": "WiFi Slot",
21+
"upload": {
22+
"maximum_ram_size": 81920,
23+
"maximum_size": 4194304,
24+
"require_upload_port": true,
25+
"resetmethod": "nodemcu",
26+
"speed": 115200
27+
},
28+
"url": "http://wiki.amperka.ru/wifi-slot",
29+
"vendor": "Amperka"
30+
}

boards/wifiduino.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"build": {
3+
"core": "esp8266",
4+
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_WIFIDUINO_ESP8266",
5+
"f_cpu": "80000000L",
6+
"f_flash": "40000000L",
7+
"flash_mode": "dio",
8+
"ldscript": "eagle.flash.4m1m.ld",
9+
"mcu": "esp8266",
10+
"variant": "wifiduino"
11+
},
12+
"connectivity": [
13+
"wifi"
14+
],
15+
"frameworks": [
16+
"arduino",
17+
"esp8266-rtos-sdk",
18+
"esp8266-nonos-sdk"
19+
],
20+
"name": "WiFiduino",
21+
"upload": {
22+
"maximum_ram_size": 81920,
23+
"maximum_size": 4194304,
24+
"require_upload_port": true,
25+
"resetmethod": "nodemcu",
26+
"speed": 115200
27+
},
28+
"url": "https://www.facebook.com/WifiDuino/",
29+
"vendor": "WifiDuino"
30+
}

boards/wio_link.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"build": {
3+
"core": "esp8266",
4+
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_AMPERKA_WIFI_SLOT",
5+
"f_cpu": "80000000L",
6+
"f_flash": "40000000L",
7+
"flash_mode": "qio",
8+
"ldscript": "eagle.flash.4m1m.ld",
9+
"mcu": "esp8266",
10+
"variant": "wiolink"
11+
},
12+
"connectivity": [
13+
"wifi"
14+
],
15+
"frameworks": [
16+
"arduino",
17+
"esp8266-rtos-sdk",
18+
"esp8266-nonos-sdk"
19+
],
20+
"name": "Wio Link",
21+
"upload": {
22+
"maximum_ram_size": 81920,
23+
"maximum_size": 4194304,
24+
"require_upload_port": true,
25+
"resetmethod": "nodemcu",
26+
"speed": 115200
27+
},
28+
"url": "https://www.seeedstudio.com/Wio-Link-p-2604.html",
29+
"vendor": "SeeedStudio"
30+
}

boards/xinabox_cw01.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"build": {
3+
"core": "esp8266",
4+
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_GENERIC",
5+
"f_cpu": "80000000L",
6+
"f_flash": "40000000L",
7+
"flash_mode": "qio",
8+
"ldscript": "eagle.flash.4m1m.ld",
9+
"mcu": "esp8266",
10+
"variant": "xinabox"
11+
},
12+
"connectivity": [
13+
"wifi"
14+
],
15+
"frameworks": [
16+
"arduino",
17+
"esp8266-rtos-sdk",
18+
"esp8266-nonos-sdk"
19+
],
20+
"name": "XinaBox CW01",
21+
"upload": {
22+
"maximum_ram_size": 81920,
23+
"maximum_size": 4194304,
24+
"require_upload_port": true,
25+
"resetmethod": "nodemcu",
26+
"speed": 115200
27+
},
28+
"url": "https://xinabox.cc/products/cw01",
29+
"vendor": "XinaBox"
30+
}

builder/frameworks/_bare.py

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright 2014-present PlatformIO <[email protected]>
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
#
16+
# Default flags for bare-metal programming (without any framework layers)
17+
#
18+
19+
from os.path import join
20+
21+
from SCons.Script import Import
22+
23+
Import("env")
24+
25+
env.Append(
26+
ASFLAGS=["-x", "assembler-with-cpp"],
27+
28+
CFLAGS=[
29+
"-std=gnu99",
30+
"-Wpointer-arith",
31+
"-Wno-implicit-function-declaration",
32+
"-Wl,-EL",
33+
"-fno-inline-functions",
34+
"-nostdlib"
35+
],
36+
37+
CCFLAGS=[
38+
"-Os", # optimize for size
39+
"-mlongcalls",
40+
"-mtext-section-literals",
41+
"-falign-functions=4",
42+
"-U__STRICT_ANSI__",
43+
"-ffunction-sections",
44+
"-fdata-sections"
45+
],
46+
47+
CXXFLAGS=[
48+
"-fno-rtti",
49+
"-fno-exceptions",
50+
"-std=c++11"
51+
],
52+
53+
CPPDEFINES=[
54+
("F_CPU", "$BOARD_F_CPU"),
55+
"__ets__",
56+
"ICACHE_FLASH"
57+
],
58+
59+
LINKFLAGS=[
60+
"-Os",
61+
"-nostdlib",
62+
"-Wl,--no-check-sections",
63+
"-u", "call_user_start",
64+
"-u", "_printf_float",
65+
"-u", "_scanf_float",
66+
"-Wl,-static",
67+
"-Wl,--gc-sections"
68+
],
69+
70+
CPPPATH=[
71+
join("$SDK_ESP8266_DIR", "include"), "$PROJECTSRC_DIR"
72+
],
73+
74+
LIBPATH=[
75+
join("$SDK_ESP8266_DIR", "lib"),
76+
join("$SDK_ESP8266_DIR", "ld")
77+
],
78+
79+
LIBS=[
80+
"c", "gcc", "phy", "pp", "net80211", "lwip", "wpa", "wpa2",
81+
"main", "wps", "crypto", "json", "ssl", "pwm", "upgrade",
82+
"smartconfig", "airkiss", "at"
83+
]
84+
)
85+
86+
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
87+
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
88+
89+
env.Replace(
90+
UPLOAD_ADDRESS="0x40000"
91+
)

builder/frameworks/esp8266-nonos-sdk.py

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,52 @@
3030
FRAMEWORK_DIR = platform.get_package_dir("framework-esp8266-nonos-sdk")
3131
assert isdir(FRAMEWORK_DIR)
3232

33-
env.Prepend(
33+
env.Append(
34+
ASFLAGS=["-x", "assembler-with-cpp"],
35+
36+
CFLAGS=[
37+
"-std=gnu99",
38+
"-Wpointer-arith",
39+
"-Wno-implicit-function-declaration",
40+
"-Wl,-EL",
41+
"-fno-inline-functions",
42+
"-nostdlib"
43+
],
44+
45+
CCFLAGS=[
46+
"-Os", # optimize for size
47+
"-mlongcalls",
48+
"-mtext-section-literals",
49+
"-falign-functions=4",
50+
"-U__STRICT_ANSI__",
51+
"-ffunction-sections",
52+
"-fdata-sections",
53+
"-fno-builtin-printf"
54+
],
55+
56+
CXXFLAGS=[
57+
"-fno-rtti",
58+
"-fno-exceptions",
59+
"-std=c++11"
60+
],
61+
62+
LINKFLAGS=[
63+
"-Os",
64+
"-nostdlib",
65+
"-Wl,--no-check-sections",
66+
"-Wl,-static",
67+
"-Wl,--gc-sections",
68+
"-u", "call_user_start",
69+
"-u", "_printf_float",
70+
"-u", "_scanf_float"
71+
],
72+
73+
CPPDEFINES=[
74+
("F_CPU", "$BOARD_F_CPU"),
75+
"__ets__",
76+
"ICACHE_FLASH"
77+
],
78+
3479
CPPPATH=[
3580
join(FRAMEWORK_DIR, "include"),
3681
join(FRAMEWORK_DIR, "extra_include"),
@@ -43,6 +88,7 @@
4388
join(FRAMEWORK_DIR, "include", "ssl"),
4489
join(FRAMEWORK_DIR, "include", "json"),
4590
join(FRAMEWORK_DIR, "include", "openssl"),
91+
join("$SDK_ESP8266_DIR", "include"), "$PROJECTSRC_DIR"
4692
],
4793

4894
LIBPATH=[
@@ -56,8 +102,12 @@
56102
]
57103
)
58104

105+
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
106+
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
107+
59108
env.Replace(
60109
LDSCRIPT_PATH=[join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld")],
110+
UPLOAD_ADDRESS="0x10000"
61111
)
62112

63113
#

builder/frameworks/esp8266-rtos-sdk.py

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,51 @@
3131
FRAMEWORK_DIR = platform.get_package_dir("framework-esp8266-rtos-sdk")
3232
assert isdir(FRAMEWORK_DIR)
3333

34-
env.Prepend(
34+
env.Append(
35+
ASFLAGS=["-x", "assembler-with-cpp"],
36+
37+
CFLAGS=[
38+
"-std=gnu99",
39+
"-Wpointer-arith",
40+
"-Wno-implicit-function-declaration",
41+
"-Wl,-EL",
42+
"-fno-inline-functions",
43+
"-nostdlib"
44+
],
45+
46+
CCFLAGS=[
47+
"-Os", # optimize for size
48+
"-mlongcalls",
49+
"-mtext-section-literals",
50+
"-falign-functions=4",
51+
"-U__STRICT_ANSI__",
52+
"-ffunction-sections",
53+
"-fdata-sections"
54+
],
55+
56+
CXXFLAGS=[
57+
"-fno-rtti",
58+
"-fno-exceptions",
59+
"-std=c++11"
60+
],
61+
62+
LINKFLAGS=[
63+
"-Os",
64+
"-nostdlib",
65+
"-Wl,--no-check-sections",
66+
"-Wl,-static",
67+
"-Wl,--gc-sections",
68+
"-u", "call_user_start",
69+
"-u", "_printf_float",
70+
"-u", "_scanf_float"
71+
],
72+
73+
CPPDEFINES=[
74+
("F_CPU", "$BOARD_F_CPU"),
75+
"__ets__",
76+
"ICACHE_FLASH"
77+
],
78+
3579
CPPPATH=[
3680
join(FRAMEWORK_DIR, "include"),
3781
join(FRAMEWORK_DIR, "extra_include"),
@@ -58,8 +102,12 @@
58102
]
59103
)
60104

105+
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
106+
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
107+
61108
env.Replace(
62109
LDSCRIPT_PATH=[join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld")],
110+
UPLOAD_ADDRESS="0x20000"
63111
)
64112

65113
#

builder/frameworks/simba.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from os.path import join, sep
2525

26-
from SCons.Script import DefaultEnvironment, SConscript
26+
from SCons.Script import DefaultEnvironment
2727

2828
from platformio.builder.tools import platformio as platformio_tool
2929

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

53+
env.Append(
54+
CPPDEFINES=[
55+
("F_CPU", "$BOARD_F_CPU")
56+
]
57+
)
5358
env.Replace(
5459
PLATFORMFW_DIR=env.PioPlatform().get_package_dir("framework-simba")
5560
)
5661

57-
SConscript(
62+
env.SConscript(
5863
[env.subst(join("$PLATFORMFW_DIR", "make", "platformio.sconscript"))])

0 commit comments

Comments
 (0)