Skip to content

Commit b66daa5

Browse files
authored
Merge branch 'master' into master
2 parents 444eff2 + 8eecfd2 commit b66daa5

File tree

708 files changed

+66522
-29565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

708 files changed

+66522
-29565
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
21
tools/xtensa-esp32-elf
32
tools/dist
43
tools/esptool
54
tools/esptool.exe
5+
tools/mkspiffs/mkspiffs
6+
tools/mkspiffs/mkspiffs.exe
7+
.DS_Store

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "libraries/BLE"]
2+
path = libraries/BLE
3+
url = https://github.com/nkolban/ESP32_BLE_Arduino.git

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ os:
1010
script:
1111
#- set -e
1212
- echo -e "travis_fold:start:sketch_test_env_prepare"
13+
- pip install pyserial
1314
- wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
1415
- tar xf arduino.tar.xz
1516
- mv arduino-nightly $HOME/arduino_ide
@@ -18,7 +19,9 @@ script:
1819
- mkdir espressif
1920
- cd espressif
2021
- ln -s $TRAVIS_BUILD_DIR esp32
21-
- cd esp32/tools
22+
- cd esp32
23+
- git submodule update --init --recursive
24+
- cd tools
2225
- python get.py
2326
- export PATH="$HOME/arduino_ide:$TRAVIS_BUILD_DIR/tools/xtensa-esp32-elf/bin:$PATH"
2427
- which arduino

Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ menu "Arduino Configuration"
33
config ENABLE_ARDUINO_DEPENDS
44
bool
55
select LWIP_SO_RCVBUF
6+
select ETHERNET
7+
select WIFI_ENABLED
8+
select ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
9+
select MEMMAP_SMP
610
default "y"
711

812
config AUTOSTART_ARDUINO
@@ -62,6 +66,16 @@ config ARDUHAL_LOG_COLORS
6266
Enable ANSI terminal color codes in bootloader output.
6367
In order to view these, your terminal program must support ANSI color codes.
6468

69+
config ARDUHAL_ESP_LOG
70+
bool "Forward ESP_LOGx to Arduino log output"
71+
default "n"
72+
help
73+
This option will redefine the ESP_LOGx macros to Arduino's log_x macros.
74+
To enable for your application, add the follwing after your includes:
75+
#ifdef ARDUINO_ARCH_ESP32
76+
#include "esp32-hal-log.h"
77+
#endif
78+
6579
endmenu
6680

6781
config AUTOCONNECT_WIFI

Makefile.projbuild

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
BOOT_APP_BIN_OFFSET := 0xe000
2+
BOOT_APP_BIN_ROOT := $(call dequote,$(COMPONENT_PATH))
3+
BOOT_APP_BIN_PATH := $(call dequote,$(abspath $(BOOT_APP_BIN_ROOT)/$(subst $(quote),,tools/partitions/boot_app0.bin)))
4+
5+
ifndef CONFIG_PARTITION_TABLE_CUSTOM
6+
PARTITION_TABLE_CSV_PATH = $(call dequote,$(abspath $(BOOT_APP_BIN_ROOT)/$(subst $(quote),,tools/partitions/default.csv)))
7+
endif
8+
9+
BOOT_APP_BIN_FLASH_CMD = $(ESPTOOLPY_SERIAL) write_flash $(BOOT_APP_BIN_OFFSET) $(BOOT_APP_BIN_PATH)
10+
ESPTOOL_ALL_FLASH_ARGS += $(BOOT_APP_BIN_OFFSET) $(BOOT_APP_BIN_PATH)
11+
12+
CPPFLAGS += -DARDUINO=10800 -DESP32=1 -DARDUINO_ARCH_ESP32=1
13+
14+
boot-app0:
15+
@echo "Rebooting to APP0"
16+
$(BOOT_APP_BIN_FLASH_CMD)
117

README.md

Lines changed: 21 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -2,142 +2,47 @@
22

33
[![Build Status](https://travis-ci.org/espressif/arduino-esp32.svg?branch=master)](https://travis-ci.org/espressif/arduino-esp32)
44

5-
## Need help or have a question? Join the chat at [![https://gitter.im/espressif/arduino-esp32](https://badges.gitter.im/espressif/arduino-esp32.svg)](https://gitter.im/espressif/arduino-esp32?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
### Need help or have a question? Join the chat at [![https://gitter.im/espressif/arduino-esp32](https://badges.gitter.im/espressif/arduino-esp32.svg)](https://gitter.im/espressif/arduino-esp32?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
66

7+
## Contents
78
- [Development Status](#development-status)
8-
- [Installation Instructions](#installation-instructions):
9-
+ [Using Arduino IDE](#using-through-arduino-ide)
10-
+ [Windows](https://github.com/espressif/arduino-esp32/blob/master/doc/windows.md)
11-
+ [Mac OS](#instructions-for-mac)
12-
+ [Debian/Ubuntu](#instructions-for-debianubuntu-linux)
13-
+ [Decoding Exceptions](#decoding-exceptions)
14-
+ [Using PlatformIO](#using-platformio)
15-
+ [Using as ESP-IDF component](#using-as-esp-idf-component)
9+
- [Installation Instructions](#installation-instructions)
10+
- [Decoding Exceptions](#decoding-exceptions)
11+
- [Issue/Bug report template](#issuebug-report-template)
1612
- [ESP32Dev Board PINMAP](#esp32dev-board-pinmap)
1713

1814
## Development Status
1915
Most of the framework is implemented. Most noticable is the missing analogWrite. While analogWrite is on it's way, there are a few other options that you can use:
20-
- 16 channels [LEDC](https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-ledc.h) which is PWM
21-
- 8 channels [SigmaDelta](https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-sigmadelta.h) which uses SigmaDelta modulation
22-
- 2 channels [DAC](https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-dac.h) which gives real analog output
16+
- 16 channels [LEDC](cores/esp32/esp32-hal-ledc.h) which is PWM
17+
- 8 channels [SigmaDelta](cores/esp32/esp32-hal-sigmadelta.h) which uses SigmaDelta modulation
18+
- 2 channels [DAC](cores/esp32/esp32-hal-dac.h) which gives real analog output
2319

2420
## Installation Instructions
2521

26-
### Using through Arduino IDE
27-
28-
###[Instructions for Windows](doc/windows.md)
29-
30-
#### Instructions for Mac
31-
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
32-
- Open Terminal and execute the following command (copy->paste and hit enter):
33-
34-
```bash
35-
mkdir -p ~/Documents/Arduino/hardware/espressif && \
36-
cd ~/Documents/Arduino/hardware/espressif && \
37-
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
38-
cd esp32/tools/ && \
39-
python get.py
40-
```
41-
- Restart Arduino IDE
42-
43-
#### Instructions for Debian/Ubuntu Linux
44-
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
45-
- Open Terminal and execute the following command (copy->paste and hit enter):
46-
47-
```bash
48-
sudo usermod -a -G dialout $USER && \
49-
sudo apt-get install git && \
50-
mkdir -p ~/Arduino/hardware/espressif && \
51-
cd ~/Arduino/hardware/espressif && \
52-
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
53-
cd esp32/tools/ && \
54-
python get.py
55-
```
56-
- Restart Arduino IDE
22+
- Using Arduino IDE
23+
+ [Instructions for Windows](docs/arduino-ide/windows.md)
24+
+ [Instructions for Mac](docs/arduino-ide/mac.md)
25+
+ [Instructions for Debian/Ubuntu Linux](docs/arduino-ide/debian_ubuntu.md)
26+
+ [Instructions for Fedora](docs/arduino-ide/fedora.md)
27+
+ [Instructions for openSUSE](docs/arduino-ide/opensuse.md)
28+
- [Using PlatformIO](docs/platformio.md)
29+
- [Building with make](docs/make.md)
30+
- [Using as ESP-IDF component](docs/esp-idf_component.md)
5731

5832
#### Decoding exceptions
5933

6034
You can use [EspExceptionDecoder](https://github.com/me-no-dev/EspExceptionDecoder) to get meaningful call trace.
6135

62-
### Using PlatformIO
63-
64-
[PlatformIO](http://platformio.org) is an open source ecosystem for IoT
65-
development with cross platform build system, library manager and full support
66-
for Espressif ESP32 development. It works on the popular host OS: Mac OS X, Windows,
67-
Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
68-
69-
- [What is PlatformIO?](http://docs.platformio.org/page/what-is-platformio.html)
70-
- [PlatformIO IDE](http://platformio.org/platformio-ide)
71-
- Quick Start with [PlatformIO IDE](http://docs.platformio.org/page/ide/atom.html#quick-start) or [PlatformIO Core](http://docs.platformio.org/page/core.html)
72-
- [Integration with Cloud and Standalone IDEs](http://docs.platformio.org/page/ide.html) -
73-
Cloud9, Codeanywehre, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM and Visual Studio
74-
- [Project Examples](https://github.com/platformio/platform-espressif32/tree/develop/examples)
75-
- [Using "Stage" (Git) version of Arduino Core](http://docs.platformio.org/page/platforms/espressif32.html#using-arduino-framework-with-staging-version)
76-
77-
### Building with make
78-
79-
[makeEspArduino](https://github.com/plerup/makeEspArduino) is a generic makefile for any ESP8266/ESP32 Arduino project.
80-
Using make instead of the Arduino IDE makes it easier to do automated and production builds.
36+
#### Issue/Bug report template
37+
Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as [for reference](https://github.com/espressif/arduino-esp32/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3A%22for%20reference%22%20).
8138

82-
### Using as ESP-IDF component
83-
- Download and install [esp-idf](https://github.com/espressif/esp-idf)
84-
- Create blank idf project (from one of the examples)
85-
- in the project folder, create a folder called components and clone this repository inside
39+
Finally, if you're sure no one else had the issue, follow the [ISSUE_TEMPLATE](docs/ISSUE_TEMPLATE.md) while reporting any issue.
8640

87-
```bash
88-
mkdir -p components && \
89-
cd components && \
90-
git clone https://github.com/espressif/arduino-esp32.git arduino && \
91-
cd .. && \
92-
make menuconfig
93-
```
94-
- ```make menuconfig``` has some Arduino options
95-
- "Autostart Arduino setup and loop on boot"
96-
- If you enable this options, your main.cpp should be formated like any other sketch
97-
98-
```arduino
99-
//file: main.cpp
100-
#include "Arduino.h"
101-
102-
void setup(){
103-
Serial.begin(115200);
104-
}
105-
106-
void loop(){
107-
Serial.println("loop");
108-
delay(1000);
109-
}
110-
```
111-
112-
- Else you need to implement ```app_main()``` and call ```initArduino();``` in it.
113-
114-
Keep in mind that setup() and loop() will not be called in this case.
115-
If you plan to base your code on examples provided in [esp-idf](https://github.com/espressif/esp-idf/tree/master/examples), please make sure move the app_main() function in main.cpp from the files in the example.
116-
117-
```arduino
118-
//file: main.cpp
119-
#include "Arduino.h"
120-
121-
extern "C" void app_main()
122-
{
123-
initArduino();
124-
pinMode(4, OUTPUT);
125-
digitalWrite(4, HIGH);
126-
//do your own thing
127-
}
128-
```
129-
- "Disable mutex locks for HAL"
130-
- If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
131-
- "Autoconnect WiFi on boot"
132-
- If enabled, WiFi will start with the last known configuration
133-
- Else it will wait for WiFi.begin
134-
- ```make flash monitor``` will build, upload and open serial monitor to your board
13541

13642
## ESP32Dev Board PINMAP
13743

138-
![Pin Functions](doc/esp32_pinmap.png)
44+
![Pin Functions](docs/esp32_pinmap.png)
13945

14046
## Hint
14147

14248
Sometimes to program ESP32 via serial you must keep GPIO0 LOW during the programming process
143-

0 commit comments

Comments
 (0)