Skip to content

Commit 5db9a56

Browse files
committed
Merge branch 'release/v0.12.0'
2 parents a0b6ddc + 19ec4c0 commit 5db9a56

File tree

7 files changed

+66
-17
lines changed

7 files changed

+66
-17
lines changed

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,27 @@ Espressif Systems is a privately held fabless semiconductor company. They provid
99

1010
# Usage
1111

12-
1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html)
13-
2. Install Espressif 32 development platform:
14-
```bash
15-
# install the latest stable version
16-
> platformio platform install espressif32
17-
18-
# install development version
19-
> platformio platform install https://github.com/platformio/platform-espressif32.git
12+
1. [Install PlatformIO](http://platformio.org)
13+
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:
14+
15+
## Stable version
16+
17+
```ini
18+
[env:stable]
19+
platform = espressif32
20+
board = ...
21+
...
2022
```
23+
24+
## Development version
25+
26+
```ini
27+
[env:development]
28+
platform = https://github.com/platformio/platform-espressif32.git
29+
board = ...
30+
...
31+
```
32+
33+
# Configuration
34+
35+
Please navigate to [documentation](http://docs.platformio.org/page/platforms/espressif32.html).

boards/esp32vn-iot-uno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"upload": {
2424
"flash_size": "4MB",
2525
"maximum_ram_size": 294912,
26-
"maximum_size": 1044464,
26+
"maximum_size": 1310720,
2727
"require_upload_port": true,
2828
"speed": 115200,
2929
"wait_for_upload_port": true

builder/frameworks/espidf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434

3535
FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
3636
assert FRAMEWORK_DIR and isdir(FRAMEWORK_DIR)
37-
FRAMEWORK_VERSION = platform.get_package_version(
38-
"framework-espidf")
3937

4038

4139
def parse_mk(path):

builder/main.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import re
1616
from os.path import join
1717

18-
from SCons.Script import (AlwaysBuild, Builder, Default, DefaultEnvironment)
18+
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
19+
DefaultEnvironment)
1920

2021

2122
def _get_board_f_flash(env):
@@ -114,7 +115,6 @@ def _get_board_f_flash(env):
114115

115116
SIZEPRINTCMD='$SIZETOOL -B -d $SOURCES',
116117

117-
PROGNAME="firmware",
118118
PROGSUFFIX=".elf"
119119
)
120120

@@ -124,6 +124,10 @@ def _get_board_f_flash(env):
124124
ASFLAGS=env.get("CCFLAGS", [])[:]
125125
)
126126

127+
# Allow user to override via pre:script
128+
if env.get("PROGNAME", "program") == "program":
129+
env.Replace(PROGNAME="firmware")
130+
127131
#
128132
# Framework and SDK specific configuration
129133
#
@@ -161,9 +165,12 @@ def _get_board_f_flash(env):
161165
#
162166

163167
target_elf = env.BuildProgram()
164-
if "PIOFRAMEWORK" in env:
165-
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
168+
if "nobuild" in COMMAND_LINE_TARGETS:
169+
target_firm = join("$BUILD_DIR", "${PROGNAME}.bin")
170+
else:
171+
target_firm = env.ElfToBin(join("$BUILD_DIR", "${PROGNAME}"), target_elf)
166172

173+
AlwaysBuild(env.Alias("nobuild", target_firm))
167174
target_buildprog = env.Alias("buildprog", target_firm, target_firm)
168175

169176

examples/arduino-wifiscan/platformio.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
; Please visit documentation for the other options and examples
88
; http://docs.platformio.org/page/projectconf.html
99

10+
[env:esp32dev]
11+
platform = espressif32
12+
framework = arduino
13+
board = esp32dev
14+
1015
[env:nano32]
1116
platform = espressif32
1217
framework = arduino

platform.json

Lines changed: 2 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": "0.11.1",
15+
"version": "0.12.0",
1616
"packageRepositories": [
1717
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1818
"http://dl.platformio.org/packages/manifest.json",
@@ -45,7 +45,7 @@
4545
"framework-arduinoespressif32": {
4646
"type": "framework",
4747
"optional": true,
48-
"version": "~1.3.1"
48+
"version": "~1.4.0"
4949
},
5050
"framework-espidf": {
5151
"type": "framework",

platform.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2014-present PlatformIO <[email protected]>
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from platformio.managers.platform import PlatformBase
16+
17+
18+
class Espressif32Platform(PlatformBase):
19+
20+
def configure_default_packages(self, variables, targets):
21+
if "arduino" in variables.get("pioframework"):
22+
self.packages['toolchain-xtensa32']['version'] = "~2.50200.0"
23+
return PlatformBase.configure_default_packages(
24+
self, variables, targets)

0 commit comments

Comments
 (0)