Skip to content

Commit

Permalink
Merge branch 'release/v3.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Mar 18, 2021
2 parents 351d672 + a0bb603 commit da8cc99
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 4 deletions.
35 changes: 35 additions & 0 deletions boards/heltec_wifi_kit_32_v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"build": {
"arduino":{
"ldscript": "esp32_out.ld",
"partitions": "default_8MB.csv"
},
"core": "esp32",
"extra_flags": "-DARDUINO_HELTEC_WIFI_KIT_32",
"f_cpu": "240000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"mcu": "esp32",
"variant": "heltec_wifi_kit_32"
},
"connectivity": [
"wifi",
"bluetooth",
"ethernet",
"can"
],
"frameworks": [
"arduino",
"espidf"
],
"name": "Heltec WiFi Kit 32 (V2)",
"upload": {
"flash_size": "8MB",
"maximum_ram_size": 327680,
"maximum_size": 8388608,
"require_upload_port": true,
"speed": 460800
},
"url": "http://www.heltec.cn/project/wifi-kit-32/?lang=en",
"vendor": "Heltec Automation"
}
2 changes: 1 addition & 1 deletion boards/m5stack-atom.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
"speed": 1500000
},
"url": "http://www.m5stack.com",
"vendor": "M5Stack"
Expand Down
2 changes: 1 addition & 1 deletion boards/ttgo-t-beam.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"f_flash": "40000000L",
"flash_mode": "dio",
"mcu": "esp32",
"variant": "t-beam"
"variant": "tbeam"
},
"connectivity": [
"wifi",
Expand Down
3 changes: 2 additions & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ def __fetch_spiffs_size(target, source, env):
else:
target_firm = env.ElfToBin(
join("$BUILD_DIR", "${PROGNAME}"), target_elf)
env.Depends(target_firm, "checkprogsize")

env.AddPlatformTarget("buildfs", target_firm, None, "Build Filesystem Image")
env.AddPlatformTarget("buildfs", target_firm, target_firm, "Build Filesystem Image")
AlwaysBuild(env.Alias("nobuild", target_firm))
target_buildprog = env.Alias("buildprog", target_firm, target_firm)

Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-espressif32.git"
},
"version": "3.1.0",
"version": "3.1.1",
"frameworks": {
"arduino": {
"package": "framework-arduinoespressif32",
Expand Down
36 changes: 36 additions & 0 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,43 @@ def _add_dynamic_options(self, board):
board.manifest["debug"] = debug
return board

def configure_debug_session(self, debug_config):
build_extra_data = debug_config.build_data.get("extra", {})
flash_images = build_extra_data.get("flash_images", [])

if "openocd" in (debug_config.server or {}).get("executable", ""):
debug_config.server["arguments"].extend(
["-c", "adapter_khz %s" % (debug_config.speed or "5000")]
)

ignore_conds = [
debug_config.load_cmds != ["load"],
not flash_images,
not all([os.path.isfile(item["path"]) for item in flash_images]),
]

if any(ignore_conds):
return

load_cmds = [
'monitor program_esp "{{{path}}}" {offset} verify'.format(
path=fs.to_unix_path(item["path"]), offset=item["offset"]
)
for item in flash_images
]
load_cmds.append(
'monitor program_esp "{%s.bin}" %s verify'
% (
fs.to_unix_path(debug_config.build_data["prog_path"][:-4]),
build_extra_data.get("application_offset", "0x10000"),
)
)
debug_config.load_cmds = load_cmds

def configure_debug_options(self, initial_debug_options, ide_data):
"""
Deprecated. Remove method when PlatformIO Core 5.2 is released
"""
ide_extra_data = ide_data.get("extra", {})
flash_images = ide_extra_data.get("flash_images", [])
debug_options = copy.deepcopy(initial_debug_options)
Expand Down

0 comments on commit da8cc99

Please sign in to comment.