mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Export device info in pair with sizedata
This commit is contained in:
@ -136,7 +136,17 @@ def _calculate_firmware_size(sections):
|
|||||||
|
|
||||||
|
|
||||||
def DumpSizeData(_, target, source, env): # pylint: disable=unused-argument
|
def DumpSizeData(_, target, source, env): # pylint: disable=unused-argument
|
||||||
data = {"memory": {}, "version": 1}
|
data = {"device": {}, "memory": {}, "version": 1}
|
||||||
|
|
||||||
|
board = env.BoardConfig()
|
||||||
|
if board:
|
||||||
|
data["device"] = {
|
||||||
|
"mcu": board.get("build.mcu", ""),
|
||||||
|
"cpu": board.get("build.cpu", ""),
|
||||||
|
"frequency": board.get("build.f_cpu"),
|
||||||
|
"flash": int(board.get("upload.maximum_size", 0)),
|
||||||
|
"ram": int(board.get("upload.maximum_ram_size", 0)),
|
||||||
|
}
|
||||||
|
|
||||||
elf_path = env.subst("$PIOMAINPROG")
|
elf_path = env.subst("$PIOMAINPROG")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user