Skip to content

Commit da8cc99

Browse files
committed
Merge branch 'release/v3.1.1'
2 parents 351d672 + a0bb603 commit da8cc99

File tree

6 files changed

+76
-4
lines changed

6 files changed

+76
-4
lines changed

boards/heltec_wifi_kit_32_v2.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"ldscript": "esp32_out.ld",
5+
"partitions": "default_8MB.csv"
6+
},
7+
"core": "esp32",
8+
"extra_flags": "-DARDUINO_HELTEC_WIFI_KIT_32",
9+
"f_cpu": "240000000L",
10+
"f_flash": "40000000L",
11+
"flash_mode": "dio",
12+
"mcu": "esp32",
13+
"variant": "heltec_wifi_kit_32"
14+
},
15+
"connectivity": [
16+
"wifi",
17+
"bluetooth",
18+
"ethernet",
19+
"can"
20+
],
21+
"frameworks": [
22+
"arduino",
23+
"espidf"
24+
],
25+
"name": "Heltec WiFi Kit 32 (V2)",
26+
"upload": {
27+
"flash_size": "8MB",
28+
"maximum_ram_size": 327680,
29+
"maximum_size": 8388608,
30+
"require_upload_port": true,
31+
"speed": 460800
32+
},
33+
"url": "http://www.heltec.cn/project/wifi-kit-32/?lang=en",
34+
"vendor": "Heltec Automation"
35+
}

boards/m5stack-atom.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"maximum_ram_size": 327680,
2828
"maximum_size": 4194304,
2929
"require_upload_port": true,
30-
"speed": 460800
30+
"speed": 1500000
3131
},
3232
"url": "http://www.m5stack.com",
3333
"vendor": "M5Stack"

boards/ttgo-t-beam.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"f_flash": "40000000L",
1010
"flash_mode": "dio",
1111
"mcu": "esp32",
12-
"variant": "t-beam"
12+
"variant": "tbeam"
1313
},
1414
"connectivity": [
1515
"wifi",

builder/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,9 @@ def __fetch_spiffs_size(target, source, env):
231231
else:
232232
target_firm = env.ElfToBin(
233233
join("$BUILD_DIR", "${PROGNAME}"), target_elf)
234+
env.Depends(target_firm, "checkprogsize")
234235

235-
env.AddPlatformTarget("buildfs", target_firm, None, "Build Filesystem Image")
236+
env.AddPlatformTarget("buildfs", target_firm, target_firm, "Build Filesystem Image")
236237
AlwaysBuild(env.Alias("nobuild", target_firm))
237238
target_buildprog = env.Alias("buildprog", target_firm, target_firm)
238239

platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"type": "git",
1919
"url": "https://github.com/platformio/platform-espressif32.git"
2020
},
21-
"version": "3.1.0",
21+
"version": "3.1.1",
2222
"frameworks": {
2323
"arduino": {
2424
"package": "framework-arduinoespressif32",

platform.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,43 @@ def _add_dynamic_options(self, board):
161161
board.manifest["debug"] = debug
162162
return board
163163

164+
def configure_debug_session(self, debug_config):
165+
build_extra_data = debug_config.build_data.get("extra", {})
166+
flash_images = build_extra_data.get("flash_images", [])
167+
168+
if "openocd" in (debug_config.server or {}).get("executable", ""):
169+
debug_config.server["arguments"].extend(
170+
["-c", "adapter_khz %s" % (debug_config.speed or "5000")]
171+
)
172+
173+
ignore_conds = [
174+
debug_config.load_cmds != ["load"],
175+
not flash_images,
176+
not all([os.path.isfile(item["path"]) for item in flash_images]),
177+
]
178+
179+
if any(ignore_conds):
180+
return
181+
182+
load_cmds = [
183+
'monitor program_esp "{{{path}}}" {offset} verify'.format(
184+
path=fs.to_unix_path(item["path"]), offset=item["offset"]
185+
)
186+
for item in flash_images
187+
]
188+
load_cmds.append(
189+
'monitor program_esp "{%s.bin}" %s verify'
190+
% (
191+
fs.to_unix_path(debug_config.build_data["prog_path"][:-4]),
192+
build_extra_data.get("application_offset", "0x10000"),
193+
)
194+
)
195+
debug_config.load_cmds = load_cmds
196+
164197
def configure_debug_options(self, initial_debug_options, ide_data):
198+
"""
199+
Deprecated. Remove method when PlatformIO Core 5.2 is released
200+
"""
165201
ide_extra_data = ide_data.get("extra", {})
166202
flash_images = ide_extra_data.get("flash_images", [])
167203
debug_options = copy.deepcopy(initial_debug_options)

0 commit comments

Comments
 (0)