|
@ -19,15 +19,16 @@ import argparse |
|
|
import os |
|
|
import os |
|
|
import re |
|
|
import re |
|
|
import shlex |
|
|
import shlex |
|
|
|
|
|
import subprocess |
|
|
import sys |
|
|
import sys |
|
|
from collections import OrderedDict |
|
|
from collections import OrderedDict |
|
|
|
|
|
|
|
|
from sortedcontainers import SortedDict |
|
|
from sortedcontainers import SortedDict |
|
|
import subprocess |
|
|
|
|
|
|
|
|
|
|
|
if (sys.version_info > (3, 0)): |
|
|
|
|
|
from subprocess import getstatusoutput as getstatusoutput |
|
|
|
|
|
|
|
|
if sys.version_info > (3, 0): |
|
|
|
|
|
from subprocess import getstatusoutput |
|
|
else: |
|
|
else: |
|
|
from commands import getstatusoutput as getstatusoutput |
|
|
|
|
|
|
|
|
from commands import getstatusoutput |
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------- |
|
|
# ------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
@ -105,11 +106,13 @@ def run(env_, modules_): |
|
|
command = "ESPURNA_BOARD=\"WEMOS_D1_MINI_RELAYSHIELD\" ESPURNA_FLAGS=\"%s\" platformio run --silent --environment %s 2>/dev/null" % (flags, env_) |
|
|
command = "ESPURNA_BOARD=\"WEMOS_D1_MINI_RELAYSHIELD\" ESPURNA_FLAGS=\"%s\" platformio run --silent --environment %s 2>/dev/null" % (flags, env_) |
|
|
subprocess.check_call(command, shell=True) |
|
|
subprocess.check_call(command, shell=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def calc_free(module): |
|
|
def calc_free(module): |
|
|
free = 80 * 1024 - module['data'] - module['rodata'] - module['bss'] |
|
|
free = 80 * 1024 - module['data'] - module['rodata'] - module['bss'] |
|
|
free = free + (16 - free % 16) |
|
|
free = free + (16 - free % 16) |
|
|
module['free'] = free |
|
|
module['free'] = free |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def modules_get(): |
|
|
def modules_get(): |
|
|
modules_ = SortedDict() |
|
|
modules_ = SortedDict() |
|
|
for line in open("espurna/config/arduino.h"): |
|
|
for line in open("espurna/config/arduino.h"): |
|
@ -120,7 +123,8 @@ def modules_get(): |
|
|
del modules_['NETBIOS'] |
|
|
del modules_['NETBIOS'] |
|
|
return modules_ |
|
|
return modules_ |
|
|
|
|
|
|
|
|
try: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
|
|
|
|
|
# Parse command line options |
|
|
# Parse command line options |
|
|
parser = argparse.ArgumentParser(description=description) |
|
|
parser = argparse.ArgumentParser(description=description) |
|
@ -279,7 +283,5 @@ try: |
|
|
total['size'], |
|
|
total['size'], |
|
|
)) |
|
|
)) |
|
|
|
|
|
|
|
|
except: |
|
|
|
|
|
raise |
|
|
|
|
|
|
|
|
|
|
|
print("\n") |
|
|
print("\n") |