Skip to content

Commit

Permalink
Merge branch 'release/v1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jun 4, 2018
2 parents dc3d696 + ad13b11 commit 83979c6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 18 additions & 3 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def __fetch_spiffs_size(target, source, env):
env.Replace(
__get_board_f_flash=_get_board_f_flash,
__get_board_flash_mode=_get_board_flash_mode,

AR="xtensa-esp32-elf-ar",
AS="xtensa-esp32-elf-as",
CC="xtensa-esp32-elf-gcc",
Expand All @@ -137,6 +138,7 @@ def __fetch_spiffs_size(target, source, env):
platform.get_package_dir("tool-esptoolpy") or "", "esptool.py"),
RANLIB="xtensa-esp32-elf-ranlib",
SIZETOOL="xtensa-esp32-elf-size",

ARFLAGS=["rc"],
ASFLAGS=["-x", "assembler-with-cpp"],
CFLAGS=["-std=gnu99"],
Expand All @@ -155,9 +157,15 @@ def __fetch_spiffs_size(target, source, env):
"-nostdlib", "-Wl,-static", "-u", "call_user_start_cpu0",
"-Wl,--undefined=uxTopUsedPriority", "-Wl,--gc-sections"
],

SIZEPROGREGEXP=r"^(?:\.iram0\.text|\.dram0\.text|\.flash\.text|\.dram0\.data|\.flash\.rodata|)\s+(\d+).*",
SIZEDATAREGEXP=r"^(?:\.dram0\.data|\.dram0\.bss)\s+(\d+).*",
SIZECHECKCMD="$SIZETOOL -A -d $SOURCES",
SIZEPRINTCMD="$SIZETOOL -B -d $SOURCES",

MKSPIFFSTOOL="mkspiffs_${PIOPLATFORM}_${PIOFRAMEWORK}",
SIZEPRINTCMD='$SIZETOOL -B -d $SOURCES',
PROGSUFFIX=".elf")
PROGSUFFIX=".elf"
)

# Allow user to override via pre:script
if env.get("PROGNAME", "program") == "program":
Expand Down Expand Up @@ -210,7 +218,14 @@ def __fetch_spiffs_size(target, source, env):
target_buildprog = env.Alias("buildprog", target_firm, target_firm)

# update max upload size based on CSV file
if "upload" in COMMAND_LINE_TARGETS:
if env.get("PIOMAINPROG"):
env.AddPreAction(
"checkprogsize",
env.VerboseAction(
lambda source, target, env: _update_max_upload_size(env),
"Retrieving maximum program size $SOURCES"))
# remove after PIO Core 3.6 release
elif set(["checkprogsize", "upload"]) & set(COMMAND_LINE_TARGETS):
_update_max_upload_size(env)

#
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-espressif32.git"
},
"version": "1.0.1",
"version": "1.0.2",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json",
Expand Down

0 comments on commit 83979c6

Please sign in to comment.