Skip to content

Commit

Permalink
Merge branch 'release/v1.12.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed May 25, 2020
2 parents dc17a3a + 2ba7708 commit f23e08e
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 110 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Examples

on: [push]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, windows-latest, macos-latest]
python-version: [2.7, 3.7]
example:
- "examples/arduino-blink"
- "examples/arduino-briki-internal-libs"
- "examples/arduino-wifiscan"
- "examples/espidf-arduino-blink"
- "examples/espidf-arduino-wifiscan"
- "examples/espidf-aws-iot"
- "examples/espidf-ble-eddystone"
- "examples/espidf-coap-server"
- "examples/espidf-exceptions"
- "examples/espidf-hello-world"
- "examples/espidf-http-request"
- "examples/espidf-peripherals-uart"
- "examples/espidf-storage-sdcard"
- "examples/espidf-ulp-adc"
- "examples/espidf-ulp-pulse"
- "examples/pumbaa-blink"
- "examples/simba-blink"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install file://.
- name: Build examples
run: |
platformio run -d ${{ matrix.example }}
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Espressif 32: development platform for [PlatformIO](http://platformio.org)
[![Build Status](https://travis-ci.org/platformio/platform-espressif32.svg?branch=develop)](https://travis-ci.org/platformio/platform-espressif32)
[![Build status](https://ci.appveyor.com/api/projects/status/nl087sumhneumse3/branch/develop?svg=true)](https://ci.appveyor.com/project/ivankravets/platform-espressif32/branch/develop)

![alt text](https://github.com/platformio/platform-espressif32/workflows/Examples/badge.svg "Espressif 32 development platform")

Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.

Expand Down
41 changes: 0 additions & 41 deletions appveyor.yml

This file was deleted.

3 changes: 3 additions & 0 deletions boards/pico32.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"ethernet",
"can"
],
"debug": {
"openocd_board": "esp-wroom-32.cfg"
},
"frameworks": [
"arduino",
"espidf"
Expand Down
24 changes: 13 additions & 11 deletions builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,16 @@ def find_framework_service_files(search_path, sdk_config):
result["kconfig_files"] = list()
result["kconfig_build_files"] = list()
for d in listdir(search_path):
for f in listdir(join(search_path, d)):
path = join(search_path, d)
if not isdir(path):
continue
for f in listdir(path):
if f == "linker.lf":
result["lf_files"].append(join(search_path, d, f))
result["lf_files"].append(join(path, f))
elif f == "Kconfig.projbuild":
result["kconfig_build_files"].append(join(search_path, d, f))
result["kconfig_build_files"].append(join(path, f))
elif f == "Kconfig":
result["kconfig_files"].append(join(search_path, d, f))
result["kconfig_files"].append(join(path, f))

result["lf_files"].extend([
join(FRAMEWORK_DIR, "components", "esp32", "ld", "esp32_fragments.lf"),
Expand Down Expand Up @@ -768,10 +771,10 @@ def find_default_component(target_configs):
# Generate final linker script
#

if not env.BoardConfig().get("build.ldscript", ""):
if not board.get("build.ldscript", ""):
linker_script = env.Command(
join("$BUILD_DIR", "esp32_out.ld"),
env.BoardConfig().get(
board.get(
"build.esp-idf.ldscript",
join(FRAMEWORK_DIR, "components", "esp32", "ld", "esp32.ld"),
),
Expand All @@ -789,7 +792,7 @@ def find_default_component(target_configs):
#

fwpartitions_dir = join(FRAMEWORK_DIR, "components", "partition_table")
partitions_csv = env.BoardConfig().get("build.partitions", "partitions_singleapp.csv")
partitions_csv = board.get("build.partitions", "partitions_singleapp.csv")
env.Replace(
PARTITIONS_TABLE_CSV=abspath(
join(fwpartitions_dir, partitions_csv)
Expand All @@ -805,7 +808,7 @@ def find_default_component(target_configs):
'"$PYTHONEXE" "%s" -q --flash-size "%s" $SOURCE $TARGET'
% (
join(FRAMEWORK_DIR, "components", "partition_table", "gen_esp32part.py"),
env.BoardConfig().get("upload.flash_size", "detect"),
board.get("upload.flash_size", "detect"),
),
"Generating partitions $TARGET",
),
Expand Down Expand Up @@ -853,9 +856,8 @@ def find_default_component(target_configs):
project_codemodel = get_cmake_code_model(
env.subst("$PROJECT_DIR"),
BUILD_DIR,
["-DEXTRA_COMPONENT_DIRS:PATH=" + ";".join(extra_components)]
if extra_components
else [],
["-DEXTRA_COMPONENT_DIRS:PATH=" + ";".join(extra_components)] +
click.parser.split_arg_string(board.get("build.cmake_extra_args", ""))
)

if not project_codemodel:
Expand Down
23 changes: 12 additions & 11 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,21 @@ def __fetch_spiffs_size(target, source, env):
env = DefaultEnvironment()
platform = env.PioPlatform()
board = env.BoardConfig()
mcu = board.get("build.mcu", "esp32")

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",
CXX="xtensa-esp32-elf-g++",
GDB="xtensa-esp32-elf-gdb",
AR="xtensa-%s-elf-ar" % mcu,
AS="xtensa-%s-elf-as" % mcu,
CC="xtensa-%s-elf-gcc" % mcu,
CXX="xtensa-%s-elf-g++" % mcu,
GDB="xtensa-%s-elf-gdb" % mcu,
OBJCOPY=join(
platform.get_package_dir("tool-esptoolpy") or "", "esptool.py"),
RANLIB="xtensa-esp32-elf-ranlib",
SIZETOOL="xtensa-esp32-elf-size",
RANLIB="xtensa-%s-elf-ranlib" % mcu,
SIZETOOL="xtensa-%s-elf-size" % mcu,

ARFLAGS=["rc"],

Expand All @@ -153,7 +154,7 @@ def __fetch_spiffs_size(target, source, env):
SIZEPRINTCMD="$SIZETOOL -B -d $SOURCES",

ERASEFLAGS=[
"--chip", "esp32",
"--chip", mcu,
"--port", '"$UPLOAD_PORT"'
],
ERASECMD='"$PYTHONEXE" "$OBJCOPY" $ERASEFLAGS erase_flash',
Expand All @@ -177,7 +178,7 @@ def __fetch_spiffs_size(target, source, env):
ElfToBin=Builder(
action=env.VerboseAction(" ".join([
'"$PYTHONEXE" "$OBJCOPY"',
"--chip", "esp32",
"--chip", mcu,
"elf2image",
"--flash_mode", "$BOARD_FLASH_MODE",
"--flash_freq", "${__get_board_f_flash(__env__)}",
Expand Down Expand Up @@ -293,7 +294,7 @@ def __fetch_spiffs_size(target, source, env):
UPLOADER=join(
platform.get_package_dir("tool-esptoolpy") or "", "esptool.py"),
UPLOADERFLAGS=[
"--chip", "esp32",
"--chip", mcu,
"--port", '"$UPLOAD_PORT"',
"--baud", "$UPLOAD_SPEED",
"--before", "default_reset",
Expand All @@ -311,7 +312,7 @@ def __fetch_spiffs_size(target, source, env):
if "uploadfs" in COMMAND_LINE_TARGETS:
env.Replace(
UPLOADERFLAGS=[
"--chip", "esp32",
"--chip", mcu,
"--port", '"$UPLOAD_PORT"',
"--baud", "$UPLOAD_SPEED",
"--before", "default_reset",
Expand Down
9 changes: 7 additions & 2 deletions 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.12.1",
"version": "1.12.2",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json",
Expand Down Expand Up @@ -42,6 +42,11 @@
"type": "toolchain",
"version": "~2.50200.0"
},
"toolchain-xtensa32s2": {
"type": "toolchain",
"optional": true,
"version": "~1.80200.0"
},
"toolchain-esp32ulp": {
"type": "toolchain",
"optional": true,
Expand All @@ -60,7 +65,7 @@
"framework-espidf": {
"type": "framework",
"optional": true,
"version": "~3.40000.0"
"version": "~3.40001.0"
},
"framework-simba": {
"type": "framework",
Expand Down
19 changes: 15 additions & 4 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
class Espressif32Platform(PlatformBase):

def configure_default_packages(self, variables, targets):
if not variables.get("board"):
return PlatformBase.configure_default_packages(
self, variables, targets)

board_config = self.board_config(variables.get("board"))
mcu = variables.get("board_build.mcu", board_config.get(
"build.mcu", "esp32"))
if "buildfs" in targets:
self.packages['tool-mkspiffs']['optional'] = False
if variables.get("upload_protocol"):
Expand All @@ -29,15 +36,19 @@ def configure_default_packages(self, variables, targets):
self.packages['toolchain-esp32ulp']['optional'] = False
if "espidf" in variables.get("pioframework", []):
for p in self.packages:
if p in ("tool-cmake", "tool-ninja", "toolchain-esp32ulp"):
self.packages[p]['optional'] = False
if p in ("tool-cmake", "tool-ninja", "toolchain-%sulp" % mcu):
self.packages[p]["optional"] = False
elif p in ("tool-mconf", "tool-idf") and "windows" in get_systype():
self.packages[p]['optional'] = False
self.packages['toolchain-xtensa32']['version'] = "~2.80200.0"
# ESP32-S2 toolchain is identical for both Arduino and ESP-IDF
if mcu == "esp32s2":
self.packages.pop("toolchain-xtensa32", None)
self.packages['toolchain-xtensa32s2']['optional'] = False
self.packages['tool-esptoolpy']['version'] = "~1.30000.0"

build_core = variables.get(
"board_build.core", self.board_config(variables.get("board")).get(
"build.core", "arduino")).lower()
"board_build.core", board_config.get("build.core", "arduino")).lower()
if build_core == "mbcwb":
self.packages['framework-arduinoespressif32']['optional'] = True
self.packages['framework-arduino-mbcwb']['optional'] = False
Expand Down

0 comments on commit f23e08e

Please sign in to comment.