Skip to content

Commit 6ed3383

Browse files
authored
Merge pull request #100 from espressif/esp32-s3-support
Core 2.0.3
2 parents 55bc70c + 701fcad commit 6ed3383

File tree

5 files changed

+196
-20
lines changed

5 files changed

+196
-20
lines changed

Diff for: .github/scripts/update-version.sh

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
if [ ! $# -eq 3 ]; then
4+
echo "Bad number of arguments: $#" >&2
5+
echo "usage: $0 <major> <minor> <patch>" >&2
6+
exit 1
7+
fi
8+
9+
re='^[0-9]+$'
10+
if [[ ! $1 =~ $re ]] || [[ ! $2 =~ $re ]] || [[ ! $3 =~ $re ]] ; then
11+
echo "error: Not a valid version: $1.$2.$3" >&2
12+
echo "usage: $0 <major> <minor> <patch>" >&2
13+
exit 1
14+
fi
15+
16+
ESP_ARDUINO_VERSION_MAJOR="$1"
17+
ESP_ARDUINO_VERSION_MINOR="$2"
18+
ESP_ARDUINO_VERSION_PATCH="$3"
19+
ESP_ARDUINO_VERSION="$ESP_ARDUINO_VERSION_MAJOR.$ESP_ARDUINO_VERSION_MINOR.$ESP_ARDUINO_VERSION_PATCH"
20+
21+
echo "New Arduino Version: $ESP_ARDUINO_VERSION"
22+
23+
echo "Updating platform.txt..."
24+
cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platform.txt && mv __platform.txt platform.txt
25+
26+
echo "Updating package.json..."
27+
cat package.json | sed "s/.*\"version\":.*/ \"version\": \"$ESP_ARDUINO_VERSION\",/g" > __package.json && mv __package.json package.json
28+
29+
echo "Updating cores/esp32/esp_arduino_version.h..."
30+
cat cores/esp32/esp_arduino_version.h | \
31+
sed "s/#define ESP_ARDUINO_VERSION_MAJOR.*/#define ESP_ARDUINO_VERSION_MAJOR $ESP_ARDUINO_VERSION_MAJOR/g" | \
32+
sed "s/#define ESP_ARDUINO_VERSION_MINOR.*/#define ESP_ARDUINO_VERSION_MINOR $ESP_ARDUINO_VERSION_MINOR/g" | \
33+
sed "s/#define ESP_ARDUINO_VERSION_PATCH.*/#define ESP_ARDUINO_VERSION_PATCH $ESP_ARDUINO_VERSION_PATCH/g" > __esp_arduino_version.h && mv __esp_arduino_version.h cores/esp32/esp_arduino_version.h
34+
35+
exit 0

Diff for: cores/esp32/esp_arduino_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C" {
2323
/** Minor version number (x.X.x) */
2424
#define ESP_ARDUINO_VERSION_MINOR 0
2525
/** Patch version number (x.x.X) */
26-
#define ESP_ARDUINO_VERSION_PATCH 0
26+
#define ESP_ARDUINO_VERSION_PATCH 3
2727

2828
/**
2929
* Macro to convert ARDUINO version number into an integer

Diff for: docs/source/lib_builder.rst

+158-17
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,178 @@
22
Library Builder
33
###############
44

5-
How to Use Library Builder
6-
--------------------------
5+
About
6+
-----
77

8-
Espressif has provided a `tool <https://github.com/espressif/esp32-arduino-lib-builder>`_ to simplify building your own compiled libraries for use in Arduino IDE (or your favorite IDE).
9-
To generate custom libraries, follow these steps:
8+
Espressif provides a `tool <https://github.com/espressif/esp32-arduino-lib-builder>`_ to simplify building your own compiled libraries for use in Arduino IDE (or your favorite IDE).
109

10+
This tool can be used to change the project or a specific configuration according to your needs.
1111

12-
- Step 1 - Clone the ESP32 Arduino lib builder::
12+
Installing
13+
----------
14+
15+
To install the Library Builder into your environment, please, follow the instructions below.
16+
17+
- Clone the ESP32 Arduino lib builder:
18+
19+
.. code-block:: bash
1320
1421
git clone https://github.com/espressif/esp32-arduino-lib-builder
1522
16-
- Step 2 - Go to the ``esp32-arduino-lib-builder`` folder::
23+
- Go to the ``esp32-arduino-lib-builder`` folder:
24+
25+
.. code-block:: bash
1726
1827
cd esp32-arduino-lib-builder
1928
20-
- Step 3 - Run the ``update-components`` script::
29+
- Build:
30+
31+
.. code-block:: bash
32+
33+
./build.sh
34+
35+
If everything works, you may see the following message: ``Successfully created esp32 image.``
36+
37+
Dependencies
38+
************
39+
40+
To build the library you will need to install some dependencies. Maybe you already have installed it, but it is a good idea to check before building.
41+
42+
- Install all dependencies (**Ubuntu**):
43+
44+
.. code-block:: bash
45+
46+
sudo apt-get install git wget curl libssl-dev libncurses-dev flex bison gperf cmake ninja-build ccache jq
47+
48+
- Install Python and upgrade pip:
49+
50+
.. code-block:: bash
51+
52+
sudo apt-get install python3
53+
sudo pip install --upgrade pip
54+
55+
- Install all required packages:
56+
57+
.. code-block:: bash
58+
59+
pip install --user setuptools pyserial click cryptography future pyparsing pyelftools
60+
61+
Building
62+
--------
63+
64+
If you have all the dependencies met, it is time to build the libraries.
65+
66+
To build using the default configuration:
67+
68+
.. code-block:: bash
69+
70+
./build.sh
71+
72+
Custom Build
73+
************
74+
75+
There are some options to help you create custom libraries. You can use the following options:
76+
77+
Usage
78+
^^^^^
79+
80+
.. code-block:: bash
81+
82+
build.sh [-s] [-A arduino_branch] [-I idf_branch] [-i idf_commit] [-c path] [-t <target>] [-b <build|menuconfig|idf_libs|copy_bootloader|mem_variant>] [config ...]
83+
84+
Skip Install/Update
85+
^^^^^^^^^^^^^^^^^^^
86+
87+
Skip installing/updating of ESP-IDF and all components
88+
89+
.. code-block:: bash
90+
91+
./build.sh -s
92+
93+
This option can be used if you already have the ESP-IDF and all components already in your environment.
94+
95+
Set Arduino-ESP32 Branch
96+
^^^^^^^^^^^^^^^^^^^^^^^^
97+
98+
Set which branch of arduino-esp32 to be used for compilation
99+
100+
.. code-block:: bash
101+
102+
./build.sh -A <arduino_branch>
103+
104+
Set ESP-IDF Branch
105+
^^^^^^^^^^^^^^^^^^
106+
107+
Set which branch of ESP-IDF is to be used for compilation
108+
109+
.. code-block:: bash
110+
111+
./build.sh -I <idf_branch>
112+
113+
Set the ESP-IDF Commit
114+
^^^^^^^^^^^^^^^^^^^^^^
115+
116+
Set which commit of ESP-IDF to be used for compilation
117+
118+
.. code-block:: bash
119+
120+
./build.sh -i <idf_commit>
121+
122+
Deploy
123+
^^^^^^
124+
125+
Deploy the build to github arduino-esp32
126+
127+
.. code-block:: bash
128+
129+
./build.sh -d
130+
131+
Set the Arduino-ESP32 Destination Folder
132+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133+
134+
Set the arduino-esp32 folder to copy the result to. ex. '$HOME/Arduino/hardware/espressif/esp32'
135+
136+
.. code-block:: bash
137+
138+
./build.sh -c <path>
139+
140+
This function is used to copy the compiled libraries to the Arduino folder.
141+
142+
Set the Target
143+
^^^^^^^^^^^^^^
144+
145+
Set the build target(chip). ex. 'esp32s3'
146+
147+
.. code-block:: bash
148+
149+
./build.sh -t <target>
150+
151+
This build command will build for the ESP32-S3 target. You can specify other targets.
152+
153+
* esp32
154+
* esp32s2
155+
* esp32c3
156+
* esp32s3
157+
158+
Set Build Type
159+
^^^^^^^^^^^^^^
160+
161+
Set the build type. ex. 'build' to build the project and prepare for uploading to a board.
162+
163+
.. note:: This command depends on the ``-t`` argument.
21164

22-
./tools/update-components.sh`
165+
.. code-block:: bash
23166
24-
- Step 4 - Run ``install-esp-idf`` installation script (if you already have an ``$IDF_PATH`` defined, it will use your local copy of the repository)::
167+
./build.sh -t esp32 -b <build|menuconfig|idf_libs|copy_bootloader|mem_variant>
25168
26-
./tools/install-esp-idf.sh
169+
Additional Configuration
170+
^^^^^^^^^^^^^^^^^^^^^^^^
27171

28-
- Step 5 - Copy the configuration (recommended) or directly edit sdkconfig using ``idf.py menuconfig``::
172+
Specify additional configs to be applied. ex. 'qio 80m' to compile for QIO Flash@80MHz. Requires -b
29173

30-
cp sdkconfig.esp32s2 sdkconfig
174+
.. note:: This command requires the ``-b`` to work properly.
31175

32-
- Step 6 - Build::
33176

34-
idf.py build
177+
.. code-block:: bash
35178
36-
The script automates the process of building `Arduino as an ESP-IDF component <https://github.com/espressif/arduino-esp32/blob/master/docs/esp-idf_component.md>`_.
37-
Once it is complete, you can cherry pick the needed libraries from ``out/tools/sdk/lib``, or run ``tools/copy-to-arduino.sh`` to copy the entire built system.
38-
``tools/config.sh`` contains a number of variables that control the process, particularly the ``$IDF_BRANCH`` variable. You can adjust this to try building against newer versions, but there are absolutely no guarantees that any components will work or even successfully compile against a newer IDF.
179+
./build.sh -t esp32 -b idf_libs qio 80m

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "framework-arduinoespressif32",
3-
"version": "0.0.0",
3+
"version": "2.0.3",
44
"description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs",
55
"keywords": [
66
"framework",

Diff for: platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP32 Arduino
2-
version=2.0.0
2+
version=2.0.3
33

44
runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
55
runtime.tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf

0 commit comments

Comments
 (0)