Skip to content

Commit f23e08e

Browse files
committed
Merge branch 'release/v1.12.2'
2 parents dc17a3a + 2ba7708 commit f23e08e

File tree

9 files changed

+98
-110
lines changed

9 files changed

+98
-110
lines changed

.github/workflows/examples.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Examples
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ubuntu-16.04, windows-latest, macos-latest]
11+
python-version: [2.7, 3.7]
12+
example:
13+
- "examples/arduino-blink"
14+
- "examples/arduino-briki-internal-libs"
15+
- "examples/arduino-wifiscan"
16+
- "examples/espidf-arduino-blink"
17+
- "examples/espidf-arduino-wifiscan"
18+
- "examples/espidf-aws-iot"
19+
- "examples/espidf-ble-eddystone"
20+
- "examples/espidf-coap-server"
21+
- "examples/espidf-exceptions"
22+
- "examples/espidf-hello-world"
23+
- "examples/espidf-http-request"
24+
- "examples/espidf-peripherals-uart"
25+
- "examples/espidf-storage-sdcard"
26+
- "examples/espidf-ulp-adc"
27+
- "examples/espidf-ulp-pulse"
28+
- "examples/pumbaa-blink"
29+
- "examples/simba-blink"
30+
runs-on: ${{ matrix.os }}
31+
steps:
32+
- uses: actions/checkout@v2
33+
with:
34+
submodules: "recursive"
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v1
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install -U https://github.com/platformio/platformio/archive/develop.zip
43+
platformio platform install file://.
44+
- name: Build examples
45+
run: |
46+
platformio run -d ${{ matrix.example }}

.travis.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Espressif 32: development platform for [PlatformIO](http://platformio.org)
2-
[![Build Status](https://travis-ci.org/platformio/platform-espressif32.svg?branch=develop)](https://travis-ci.org/platformio/platform-espressif32)
3-
[![Build status](https://ci.appveyor.com/api/projects/status/nl087sumhneumse3/branch/develop?svg=true)](https://ci.appveyor.com/project/ivankravets/platform-espressif32/branch/develop)
2+
3+
![alt text](https://github.com/platformio/platform-espressif32/workflows/Examples/badge.svg "Espressif 32 development platform")
44

55
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.
66

appveyor.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

boards/pico32.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"ethernet",
1818
"can"
1919
],
20+
"debug": {
21+
"openocd_board": "esp-wroom-32.cfg"
22+
},
2023
"frameworks": [
2124
"arduino",
2225
"espidf"

builder/frameworks/espidf.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,16 @@ def find_framework_service_files(search_path, sdk_config):
411411
result["kconfig_files"] = list()
412412
result["kconfig_build_files"] = list()
413413
for d in listdir(search_path):
414-
for f in listdir(join(search_path, d)):
414+
path = join(search_path, d)
415+
if not isdir(path):
416+
continue
417+
for f in listdir(path):
415418
if f == "linker.lf":
416-
result["lf_files"].append(join(search_path, d, f))
419+
result["lf_files"].append(join(path, f))
417420
elif f == "Kconfig.projbuild":
418-
result["kconfig_build_files"].append(join(search_path, d, f))
421+
result["kconfig_build_files"].append(join(path, f))
419422
elif f == "Kconfig":
420-
result["kconfig_files"].append(join(search_path, d, f))
423+
result["kconfig_files"].append(join(path, f))
421424

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

771-
if not env.BoardConfig().get("build.ldscript", ""):
774+
if not board.get("build.ldscript", ""):
772775
linker_script = env.Command(
773776
join("$BUILD_DIR", "esp32_out.ld"),
774-
env.BoardConfig().get(
777+
board.get(
775778
"build.esp-idf.ldscript",
776779
join(FRAMEWORK_DIR, "components", "esp32", "ld", "esp32.ld"),
777780
),
@@ -789,7 +792,7 @@ def find_default_component(target_configs):
789792
#
790793

791794
fwpartitions_dir = join(FRAMEWORK_DIR, "components", "partition_table")
792-
partitions_csv = env.BoardConfig().get("build.partitions", "partitions_singleapp.csv")
795+
partitions_csv = board.get("build.partitions", "partitions_singleapp.csv")
793796
env.Replace(
794797
PARTITIONS_TABLE_CSV=abspath(
795798
join(fwpartitions_dir, partitions_csv)
@@ -805,7 +808,7 @@ def find_default_component(target_configs):
805808
'"$PYTHONEXE" "%s" -q --flash-size "%s" $SOURCE $TARGET'
806809
% (
807810
join(FRAMEWORK_DIR, "components", "partition_table", "gen_esp32part.py"),
808-
env.BoardConfig().get("upload.flash_size", "detect"),
811+
board.get("upload.flash_size", "detect"),
809812
),
810813
"Generating partitions $TARGET",
811814
),
@@ -853,9 +856,8 @@ def find_default_component(target_configs):
853856
project_codemodel = get_cmake_code_model(
854857
env.subst("$PROJECT_DIR"),
855858
BUILD_DIR,
856-
["-DEXTRA_COMPONENT_DIRS:PATH=" + ";".join(extra_components)]
857-
if extra_components
858-
else [],
859+
["-DEXTRA_COMPONENT_DIRS:PATH=" + ";".join(extra_components)] +
860+
click.parser.split_arg_string(board.get("build.cmake_extra_args", ""))
859861
)
860862

861863
if not project_codemodel:

builder/main.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,21 @@ def __fetch_spiffs_size(target, source, env):
130130
env = DefaultEnvironment()
131131
platform = env.PioPlatform()
132132
board = env.BoardConfig()
133+
mcu = board.get("build.mcu", "esp32")
133134

134135
env.Replace(
135136
__get_board_f_flash=_get_board_f_flash,
136137
__get_board_flash_mode=_get_board_flash_mode,
137138

138-
AR="xtensa-esp32-elf-ar",
139-
AS="xtensa-esp32-elf-as",
140-
CC="xtensa-esp32-elf-gcc",
141-
CXX="xtensa-esp32-elf-g++",
142-
GDB="xtensa-esp32-elf-gdb",
139+
AR="xtensa-%s-elf-ar" % mcu,
140+
AS="xtensa-%s-elf-as" % mcu,
141+
CC="xtensa-%s-elf-gcc" % mcu,
142+
CXX="xtensa-%s-elf-g++" % mcu,
143+
GDB="xtensa-%s-elf-gdb" % mcu,
143144
OBJCOPY=join(
144145
platform.get_package_dir("tool-esptoolpy") or "", "esptool.py"),
145-
RANLIB="xtensa-esp32-elf-ranlib",
146-
SIZETOOL="xtensa-esp32-elf-size",
146+
RANLIB="xtensa-%s-elf-ranlib" % mcu,
147+
SIZETOOL="xtensa-%s-elf-size" % mcu,
147148

148149
ARFLAGS=["rc"],
149150

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

155156
ERASEFLAGS=[
156-
"--chip", "esp32",
157+
"--chip", mcu,
157158
"--port", '"$UPLOAD_PORT"'
158159
],
159160
ERASECMD='"$PYTHONEXE" "$OBJCOPY" $ERASEFLAGS erase_flash',
@@ -177,7 +178,7 @@ def __fetch_spiffs_size(target, source, env):
177178
ElfToBin=Builder(
178179
action=env.VerboseAction(" ".join([
179180
'"$PYTHONEXE" "$OBJCOPY"',
180-
"--chip", "esp32",
181+
"--chip", mcu,
181182
"elf2image",
182183
"--flash_mode", "$BOARD_FLASH_MODE",
183184
"--flash_freq", "${__get_board_f_flash(__env__)}",
@@ -293,7 +294,7 @@ def __fetch_spiffs_size(target, source, env):
293294
UPLOADER=join(
294295
platform.get_package_dir("tool-esptoolpy") or "", "esptool.py"),
295296
UPLOADERFLAGS=[
296-
"--chip", "esp32",
297+
"--chip", mcu,
297298
"--port", '"$UPLOAD_PORT"',
298299
"--baud", "$UPLOAD_SPEED",
299300
"--before", "default_reset",
@@ -311,7 +312,7 @@ def __fetch_spiffs_size(target, source, env):
311312
if "uploadfs" in COMMAND_LINE_TARGETS:
312313
env.Replace(
313314
UPLOADERFLAGS=[
314-
"--chip", "esp32",
315+
"--chip", mcu,
315316
"--port", '"$UPLOAD_PORT"',
316317
"--baud", "$UPLOAD_SPEED",
317318
"--before", "default_reset",

platform.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"type": "git",
1313
"url": "https://github.com/platformio/platform-espressif32.git"
1414
},
15-
"version": "1.12.1",
15+
"version": "1.12.2",
1616
"packageRepositories": [
1717
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1818
"http://dl.platformio.org/packages/manifest.json",
@@ -42,6 +42,11 @@
4242
"type": "toolchain",
4343
"version": "~2.50200.0"
4444
},
45+
"toolchain-xtensa32s2": {
46+
"type": "toolchain",
47+
"optional": true,
48+
"version": "~1.80200.0"
49+
},
4550
"toolchain-esp32ulp": {
4651
"type": "toolchain",
4752
"optional": true,
@@ -60,7 +65,7 @@
6065
"framework-espidf": {
6166
"type": "framework",
6267
"optional": true,
63-
"version": "~3.40000.0"
68+
"version": "~3.40001.0"
6469
},
6570
"framework-simba": {
6671
"type": "framework",

platform.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
class Espressif32Platform(PlatformBase):
2222

2323
def configure_default_packages(self, variables, targets):
24+
if not variables.get("board"):
25+
return PlatformBase.configure_default_packages(
26+
self, variables, targets)
27+
28+
board_config = self.board_config(variables.get("board"))
29+
mcu = variables.get("board_build.mcu", board_config.get(
30+
"build.mcu", "esp32"))
2431
if "buildfs" in targets:
2532
self.packages['tool-mkspiffs']['optional'] = False
2633
if variables.get("upload_protocol"):
@@ -29,15 +36,19 @@ def configure_default_packages(self, variables, targets):
2936
self.packages['toolchain-esp32ulp']['optional'] = False
3037
if "espidf" in variables.get("pioframework", []):
3138
for p in self.packages:
32-
if p in ("tool-cmake", "tool-ninja", "toolchain-esp32ulp"):
33-
self.packages[p]['optional'] = False
39+
if p in ("tool-cmake", "tool-ninja", "toolchain-%sulp" % mcu):
40+
self.packages[p]["optional"] = False
3441
elif p in ("tool-mconf", "tool-idf") and "windows" in get_systype():
3542
self.packages[p]['optional'] = False
3643
self.packages['toolchain-xtensa32']['version'] = "~2.80200.0"
44+
# ESP32-S2 toolchain is identical for both Arduino and ESP-IDF
45+
if mcu == "esp32s2":
46+
self.packages.pop("toolchain-xtensa32", None)
47+
self.packages['toolchain-xtensa32s2']['optional'] = False
48+
self.packages['tool-esptoolpy']['version'] = "~1.30000.0"
3749

3850
build_core = variables.get(
39-
"board_build.core", self.board_config(variables.get("board")).get(
40-
"build.core", "arduino")).lower()
51+
"board_build.core", board_config.get("build.core", "arduino")).lower()
4152
if build_core == "mbcwb":
4253
self.packages['framework-arduinoespressif32']['optional'] = True
4354
self.packages['framework-arduino-mbcwb']['optional'] = False

0 commit comments

Comments
 (0)