Merge branch 'release/v0.12.0'
This commit is contained in:
@@ -9,12 +9,27 @@ Espressif Systems is a privately held fabless semiconductor company. They provid
|
||||
|
||||
# Usage
|
||||
|
||||
1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html)
|
||||
2. Install Espressif 32 development platform:
|
||||
```bash
|
||||
# install the latest stable version
|
||||
> platformio platform install espressif32
|
||||
1. [Install PlatformIO](http://platformio.org)
|
||||
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:
|
||||
|
||||
# install development version
|
||||
> platformio platform install https://github.com/platformio/platform-espressif32.git
|
||||
## Stable version
|
||||
|
||||
```ini
|
||||
[env:stable]
|
||||
platform = espressif32
|
||||
board = ...
|
||||
...
|
||||
```
|
||||
|
||||
## Development version
|
||||
|
||||
```ini
|
||||
[env:development]
|
||||
platform = https://github.com/platformio/platform-espressif32.git
|
||||
board = ...
|
||||
...
|
||||
```
|
||||
|
||||
# Configuration
|
||||
|
||||
Please navigate to [documentation](http://docs.platformio.org/page/platforms/espressif32.html).
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 294912,
|
||||
"maximum_size": 1044464,
|
||||
"maximum_size": 1310720,
|
||||
"require_upload_port": true,
|
||||
"speed": 115200,
|
||||
"wait_for_upload_port": true
|
||||
|
||||
@@ -34,8 +34,6 @@ platform = env.PioPlatform()
|
||||
|
||||
FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
|
||||
assert FRAMEWORK_DIR and isdir(FRAMEWORK_DIR)
|
||||
FRAMEWORK_VERSION = platform.get_package_version(
|
||||
"framework-espidf")
|
||||
|
||||
|
||||
def parse_mk(path):
|
||||
|
||||
+11
-4
@@ -15,7 +15,8 @@
|
||||
import re
|
||||
from os.path import join
|
||||
|
||||
from SCons.Script import (AlwaysBuild, Builder, Default, DefaultEnvironment)
|
||||
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
|
||||
DefaultEnvironment)
|
||||
|
||||
|
||||
def _get_board_f_flash(env):
|
||||
@@ -114,7 +115,6 @@ env.Replace(
|
||||
|
||||
SIZEPRINTCMD='$SIZETOOL -B -d $SOURCES',
|
||||
|
||||
PROGNAME="firmware",
|
||||
PROGSUFFIX=".elf"
|
||||
)
|
||||
|
||||
@@ -124,6 +124,10 @@ env.Append(
|
||||
ASFLAGS=env.get("CCFLAGS", [])[:]
|
||||
)
|
||||
|
||||
# Allow user to override via pre:script
|
||||
if env.get("PROGNAME", "program") == "program":
|
||||
env.Replace(PROGNAME="firmware")
|
||||
|
||||
#
|
||||
# Framework and SDK specific configuration
|
||||
#
|
||||
@@ -161,9 +165,12 @@ if env.subst("$PIOFRAMEWORK") == "arduino":
|
||||
#
|
||||
|
||||
target_elf = env.BuildProgram()
|
||||
if "PIOFRAMEWORK" in env:
|
||||
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
|
||||
if "nobuild" in COMMAND_LINE_TARGETS:
|
||||
target_firm = join("$BUILD_DIR", "${PROGNAME}.bin")
|
||||
else:
|
||||
target_firm = env.ElfToBin(join("$BUILD_DIR", "${PROGNAME}"), target_elf)
|
||||
|
||||
AlwaysBuild(env.Alias("nobuild", target_firm))
|
||||
target_buildprog = env.Alias("buildprog", target_firm, target_firm)
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
; Please visit documentation for the other options and examples
|
||||
; http://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:esp32dev]
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
board = esp32dev
|
||||
|
||||
[env:nano32]
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/platformio/platform-espressif32.git"
|
||||
},
|
||||
"version": "0.11.1",
|
||||
"version": "0.12.0",
|
||||
"packageRepositories": [
|
||||
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
|
||||
"http://dl.platformio.org/packages/manifest.json",
|
||||
@@ -45,7 +45,7 @@
|
||||
"framework-arduinoespressif32": {
|
||||
"type": "framework",
|
||||
"optional": true,
|
||||
"version": "~1.3.1"
|
||||
"version": "~1.4.0"
|
||||
},
|
||||
"framework-espidf": {
|
||||
"type": "framework",
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# Copyright 2014-present PlatformIO <contact@platformio.org>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from platformio.managers.platform import PlatformBase
|
||||
|
||||
|
||||
class Espressif32Platform(PlatformBase):
|
||||
|
||||
def configure_default_packages(self, variables, targets):
|
||||
if "arduino" in variables.get("pioframework"):
|
||||
self.packages['toolchain-xtensa32']['version'] = "~2.50200.0"
|
||||
return PlatformBase.configure_default_packages(
|
||||
self, variables, targets)
|
||||
Reference in New Issue
Block a user