Skip to content

Commit

Permalink
Merge branch 'release/v0.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 8, 2018
2 parents a0b6ddc + 19ec4c0 commit 5db9a56
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 17 deletions.
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

# install development version
> platformio platform install https://github.com/platformio/platform-espressif32.git
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:

## 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).
2 changes: 1 addition & 1 deletion boards/esp32vn-iot-uno.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

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):
Expand Down
15 changes: 11 additions & 4 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -114,7 +115,6 @@ def _get_board_f_flash(env):

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

PROGNAME="firmware",
PROGSUFFIX=".elf"
)

Expand All @@ -124,6 +124,10 @@ def _get_board_f_flash(env):
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
#
Expand Down Expand Up @@ -161,9 +165,12 @@ def _get_board_f_flash(env):
#

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)


Expand Down
5 changes: 5 additions & 0 deletions examples/arduino-wifiscan/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 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": "0.11.1",
"version": "0.12.0",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json",
Expand Down Expand Up @@ -45,7 +45,7 @@
"framework-arduinoespressif32": {
"type": "framework",
"optional": true,
"version": "~1.3.1"
"version": "~1.4.0"
},
"framework-espidf": {
"type": "framework",
Expand Down
24 changes: 24 additions & 0 deletions platform.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 5db9a56

Please sign in to comment.