Skip to content

Commit 3d7d4f3

Browse files
committed
Merge branch 'release/v0.5.0'
2 parents 9357ef8 + 105d914 commit 3d7d4f3

File tree

14 files changed

+108
-145
lines changed

14 files changed

+108
-145
lines changed

boards/esp320.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"name": "Electronic SweetPeas ESP320",
1717
"upload": {
18+
"flash_size": "4MB",
1819
"maximum_ram_size": 294912,
1920
"maximum_size": 1044464,
2021
"require_upload_port": true,

boards/esp32dev.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
],
1616
"name": "Espressif ESP32 Dev Module",
1717
"upload": {
18-
"maximum_ram_size": 114688,
18+
"flash_size": "4MB",
19+
"maximum_ram_size": 294912,
1920
"maximum_size": 1044464,
2021
"require_upload_port": true,
2122
"resetmethod": "nodemcu",

boards/espea32.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"name": "April Brother ESPea32",
1717
"upload": {
18+
"flash_size": "4MB",
1819
"maximum_ram_size": 294912,
1920
"maximum_size": 1044464,
2021
"require_upload_port": true,

boards/hornbill32dev.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"build": {
3+
"core": "esp32",
4+
"extra_flags": "-DESP32_DEV -DHORNBILL_ESP32_DEV",
5+
"f_cpu": "240000000L",
6+
"f_flash": "80000000L",
7+
"flash_mode": "dio",
8+
"ldscript": "esp32_out.ld",
9+
"mcu": "esp32",
10+
"variant": "hornbill32dev"
11+
},
12+
"frameworks": [
13+
"arduino",
14+
"espidf"
15+
],
16+
"name": "Hornbill ESP32 Dev",
17+
"upload": {
18+
"flash_size": "4MB",
19+
"maximum_ram_size": 294912,
20+
"maximum_size": 1044464,
21+
"require_upload_port": true,
22+
"resetmethod": "nodemcu",
23+
"speed": 115200,
24+
"wait_for_upload_port": true
25+
},
26+
"url": "https://hackaday.io/project/18997-hornbill",
27+
"vendor": "Hornbill"
28+
}

boards/hornbill32minima.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"build": {
3+
"core": "esp32",
4+
"extra_flags": "-DESP32_DEV -DHORNBILL_ESP32_MINIMA",
5+
"f_cpu": "240000000L",
6+
"f_flash": "80000000L",
7+
"flash_mode": "dio",
8+
"ldscript": "esp32_out.ld",
9+
"mcu": "esp32",
10+
"variant": "hornbill32minima"
11+
},
12+
"frameworks": [
13+
"arduino",
14+
"espidf"
15+
],
16+
"name": "Hornbill ESP32 Minima",
17+
"upload": {
18+
"flash_size": "4MB",
19+
"maximum_ram_size": 294912,
20+
"maximum_size": 1044464,
21+
"require_upload_port": true,
22+
"resetmethod": "nodemcu",
23+
"speed": 115200,
24+
"wait_for_upload_port": true
25+
},
26+
"url": "https://hackaday.io/project/18997-hornbill",
27+
"vendor": "Hornbill"
28+
}

boards/lolin32.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"name": "WEMOS LoLin32",
1717
"upload": {
18+
"flash_size": "4MB",
1819
"maximum_ram_size": 294912,
1920
"maximum_size": 1044464,
2021
"require_upload_port": true,

boards/nano32.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"name": "MakerAsia Nano32",
1919
"upload": {
20+
"flash_size": "4MB",
2021
"maximum_ram_size": 294912,
2122
"maximum_size": 1044464,
2223
"require_upload_port": true,

boards/node32s.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"name": "Node32s",
1717
"upload": {
18+
"flash_size": "4MB",
1819
"maximum_ram_size": 114688,
1920
"maximum_size": 1044464,
2021
"require_upload_port": true,

boards/quantum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"name": "Noduino Quantum",
1717
"upload": {
18+
"flash_size": "16MB",
1819
"maximum_ram_size": 294912,
1920
"maximum_size": 1044464,
2021
"require_upload_port": true,

builder/frameworks/arduino.py

Lines changed: 5 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
1514
"""
1615
Arduino
1716
@@ -22,91 +21,10 @@
2221
http://arduino.cc/en/Reference/HomePage
2322
"""
2423

25-
from os.path import isdir, join
26-
27-
from SCons.Script import DefaultEnvironment
28-
29-
env = DefaultEnvironment()
30-
platform = env.PioPlatform()
31-
32-
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
33-
assert isdir(FRAMEWORK_DIR)
34-
35-
env.Prepend(
36-
CPPDEFINES=[
37-
("ARDUINO", 10610),
38-
"ARDUINO_ARCH_ESP32"
39-
],
40-
41-
CPPPATH=[
42-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "config"),
43-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "bt"),
44-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "driver"),
45-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp32"),
46-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "ethernet"),
47-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "freertos"),
48-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "log"),
49-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "lwip"),
50-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "newlib"),
51-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nvs_flash"),
52-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "spi_flash"),
53-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "tcpip_adapter"),
54-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "vfs"),
55-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "expat"),
56-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "json"),
57-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "mbedtls"),
58-
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nghttp"),
59-
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core"))
60-
],
61-
LIBPATH=[
62-
join(FRAMEWORK_DIR, "tools", "sdk", "lib"),
63-
join(FRAMEWORK_DIR, "tools", "sdk", "ld"),
64-
],
65-
LIBS=[
66-
"app_update", "bt", "btdm_app", "c", "coexist", "core", "driver",
67-
"esp32", "ethernet", "expat", "freertos", "g", "hal", "json", "log",
68-
"lwip", "m", "mbedtls", "net80211", "newlib", "nghttp", "nvs_flash",
69-
"openssl", "phy", "pp", "rtc", "smartconfig", "spi_flash",
70-
"tcpip_adapter", "ulp", "vfs", "wpa", "wpa2", "wpa_supplicant", "wps",
71-
"xtensa-debug-module"
72-
]
73-
)
74-
75-
env.Append(
76-
LIBSOURCE_DIRS=[
77-
join(FRAMEWORK_DIR, "libraries")
78-
],
79-
80-
LINKFLAGS=[
81-
"-T", "esp32.common.ld",
82-
"-T", "esp32.rom.ld",
83-
"-T", "esp32.peripherals.ld"
84-
]
85-
)
86-
87-
#
88-
# Target: Build Core Library
89-
#
90-
91-
libs = []
92-
93-
if "build.variant" in env.BoardConfig():
94-
env.Append(
95-
CPPPATH=[
96-
join(FRAMEWORK_DIR, "variants",
97-
env.BoardConfig().get("build.variant"))
98-
]
99-
)
100-
libs.append(env.BuildLibrary(
101-
join("$BUILD_DIR", "FrameworkArduinoVariant"),
102-
join(FRAMEWORK_DIR, "variants", env.BoardConfig().get("build.variant"))
103-
))
104-
105-
envsafe = env.Clone()
24+
from os.path import join
10625

107-
libs.append(envsafe.BuildLibrary(
108-
join("$BUILD_DIR", "FrameworkArduino"),
109-
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core"))
110-
))
26+
from SCons.Script import DefaultEnvironment, SConscript
11127

112-
env.Prepend(LIBS=libs)
28+
SConscript(
29+
join(DefaultEnvironment().PioPlatform().get_package_dir(
30+
"framework-arduinoespressif32"), "tools", "platformio-build.py"))

builder/frameworks/espidf.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,19 @@
3030
platform = env.PioPlatform()
3131

3232
FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
33+
assert FRAMEWORK_DIR and isdir(FRAMEWORK_DIR)
3334
FRAMEWORK_VERSION = platform.get_package_version(
3435
"framework-espidf")
35-
assert isdir(FRAMEWORK_DIR)
3636

3737

3838
def build_espidf_bootloader():
3939
envsafe = env.Clone()
40-
framework_dir = env.subst("$ESPIDF_DIR")
4140
envsafe.Replace(
4241
CPPDEFINES=["ESP_PLATFORM", ("BOOTLOADER_BUILD", 1)],
4342

4443
LIBPATH=[
45-
join(framework_dir, "components", "esp32", "ld"),
46-
join(framework_dir, "components", "bootloader", "src", "main")
44+
join(FRAMEWORK_DIR, "components", "esp32", "ld"),
45+
join(FRAMEWORK_DIR, "components", "bootloader", "src", "main")
4746
],
4847

4948
LINKFLAGS=[
@@ -64,7 +63,7 @@ def build_espidf_bootloader():
6463
LIBS=[
6564
envsafe.BuildLibrary(
6665
join("$BUILD_DIR", "bootloaderLog"),
67-
join(framework_dir, "components", "log")
66+
join(FRAMEWORK_DIR, "components", "log")
6867
), "gcc"
6968
]
7069
)
@@ -73,10 +72,11 @@ def build_espidf_bootloader():
7372
join("$BUILD_DIR", "bootloader.elf"),
7473
envsafe.CollectBuildFiles(
7574
join("$BUILD_DIR", "bootloader"),
76-
join(framework_dir, "components", "bootloader", "src", "main")
75+
join(FRAMEWORK_DIR, "components", "bootloader", "src", "main")
7776
)
7877
)
7978

79+
8080
env.Prepend(
8181
CPPPATH=[
8282
join("$PROJECTSRC_DIR"),
@@ -128,18 +128,24 @@ def build_espidf_bootloader():
128128
"-T", "esp32.rom.ld",
129129
"-T", "esp32.peripherals.ld"
130130
],
131+
132+
UPLOADERFLAGS=[
133+
"0x1000", join("$BUILD_DIR", "bootloader.bin"),
134+
"0x4000", join("$BUILD_DIR", "partitions_table.bin"),
135+
"0x10000"
136+
]
131137
)
132138

133139
#
134140
# Generate partition table
135141
#
136142

137143
partition_table = env.Command(
138-
join(env.subst("$BUILD_DIR"), "partitions_table.bin"),
139-
join("$ESPIDF_DIR", "components",
144+
join("$BUILD_DIR", "partitions_table.bin"),
145+
join(FRAMEWORK_DIR, "components",
140146
"partition_table", "partitions_singleapp.csv"),
141147
'"$PYTHONEXE" "%s" -q $SOURCE $TARGET' % join(
142-
"$ESPIDF_DIR", "components", "partition_table", "gen_esp32part.py")
148+
FRAMEWORK_DIR, "components", "partition_table", "gen_esp32part.py")
143149
)
144150

145151
env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", partition_table)
@@ -151,7 +157,7 @@ def build_espidf_bootloader():
151157

152158
linker_script = env.Command(
153159
join("$BUILD_DIR", "esp32_out.ld"),
154-
join("$ESPIDF_DIR", "components", "esp32", "ld", "esp32.ld"),
160+
join(FRAMEWORK_DIR, "components", "esp32", "ld", "esp32.ld"),
155161
"$CC -I$PROJECTSRC_DIR -C -P -x c -E $SOURCE -o $TARGET"
156162
)
157163

builder/frameworks/simba.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,15 @@ def VariantDirWrap(env, variant_dir, src_dir, duplicate=False):
5454
PLATFORMFW_DIR=env.PioPlatform().get_package_dir("framework-simba")
5555
)
5656

57+
env.Append(
58+
UPLOADERFLAGS=[
59+
"0x1000", join("$PLATFORMFW_DIR", "3pp", "esp32",
60+
"bin", "bootloader.bin"),
61+
"0x4000", join("$PLATFORMFW_DIR", "3pp", "esp32",
62+
"bin", "partitions_singleapp.bin"),
63+
"0x10000"
64+
]
65+
)
66+
5767
SConscript(
5868
[env.subst(join("$PLATFORMFW_DIR", "make", "platformio.sconscript"))])

0 commit comments

Comments
 (0)