Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esp32
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
esp32
Commits
99562378
Commit
99562378
authored
Apr 03, 2017
by
Kiogora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify script file
parent
affac0da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
13 deletions
+40
-13
getESP32.sh
getESP32.sh
+40
-13
No files found.
getESP32.sh
View file @
99562378
## This is where you want the entire toolchain to live
## This is where you want the entire toolchain to live
## You should run this script from within the destination directory, or
## You should run this script from within the destination directory, or
## redefine the BASE variable to fit your lifestyle.
## redefine the BASE variable to fit your lifestyle.
#The script here is derived from: http://esp-idf.readthedocs.io/en/latest/linux-setup.html
BASE
=
$(
pwd
)
BASE
=
$(
pwd
)
echo
echo
echo
[
getESP32.sh]: Checking
for
system prerequisites
echo
[
getESP32.sh]: Checking
for
system prerequisites
[[
$(
which pacman
)
]]
&&
sudo
pacman
-S
--needed
gcc git make ncurses flex bison gperf python2-pyserial wget 2>/dev/null
#Uncomment for archlinux
[[
$(
which apt-get
)
]]
&&
sudo
apt-get
install
git make libncurses-dev flex bison gperf python python-serial wget 2>/dev/null
#[[ $(which pacman) ]] && sudo pacman -S --needed gcc git make ncurses flex bison gperf python2-pyserial wget 2>/dev/null
#Uncomment for ubuntu
[
$(
which apt-get
)
]
&&
sudo
apt-get
install
git make libncurses-dev flex bison gperf python python-serial wget 2>/dev/null
#
#
Get or update IDF
# Get or update IDF
echo
echo
if
[[
-d
esp-idf
]]
;
then
echo
Get or update IDF
if
[
-d
esp-idf
]
then
echo
"[getESP32.sh]: found esp-idf, updating"
echo
"[getESP32.sh]: found esp-idf, updating"
cd
esp-idf
cd
esp-idf
git pull
&&
git submodule update
--recursive
git pull
&&
git submodule update
--recursive
...
@@ -20,20 +27,39 @@ else ## not found, get it
...
@@ -20,20 +27,39 @@ else ## not found, get it
git clone
--recursive
https://github.com/espressif/esp-idf.git
git clone
--recursive
https://github.com/espressif/esp-idf.git
fi
fi
## Get binary toolchain -- this might get out of date when they change blobs:
## Get
64 bit linux
binary toolchain -- this might get out of date when they change blobs:
## Current version
Sept 29, 2016
## Current version
1.22.0-61-gab8375a-5.2.0
echo
echo
if
[[
-d
xtensa-esp32-elf
]]
;
then
echo
Get 64 bit linux binary toolchain
--
this might get out of
date
when they change blobs
echo
"[getESP32.sh]: Found binary toolchain. Moving on to template app."
if
[
-d
xtensa-esp32-elf
]
then
echo
"[getESP32.sh]: Found binary toolchain. Performing mandatory replacement"
rm
-rf
xtensa-esp32-elf
wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
tar
xvzf xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
&&
\
rm
*
.tar.gz
&&
rm
*
.tar.gz.
*
else
else
wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-59.tar.gz
wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
tar
xvzf xtensa-esp32-elf-linux64-1.22.0-59.tar.gz
&&
\
tar
xvzf xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
&&
\
rm
xtensa-esp32-elf-linux64-1.22.0-59.tar.gz
rm
xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
fi
## Perform mandatory removal of any tar files in case of an error
echo
echo
Perform mandatory removal of any
tar
files
in case
of an error
if
[
-f
*
.tar.gz
]
||
[
-f
*
.tar.gz.
*
]
then
echo
removing residual
tar
files
rm
*
.tar.gz
*
.tar.gz.
*
fi
fi
## Get demo application
## Get demo application
echo
echo
if
[[
-d
esp-idf-template
]]
;
then
echo
Get demo application
if
[
-d
esp-idf-template
]
then
echo
"[getESP32.sh]: Found esp-idf-template, updating"
echo
"[getESP32.sh]: Found esp-idf-template, updating"
cd
esp-idf-template
cd
esp-idf-template
git pull
git pull
...
@@ -48,12 +74,13 @@ fi
...
@@ -48,12 +74,13 @@ fi
## to reset these variables as necessary.
## to reset these variables as necessary.
echo
echo
echo
Setup environment variables
echo
[
getESP32.sh]: Exporting environment variables:
echo
[
getESP32.sh]: Exporting environment variables:
export
IDF_PATH
=
${
BASE
}
/esp-idf
export
IDF_PATH
=
${
BASE
}
/esp-idf
echo
[
getESP32.sh]:
export
IDF_PATH
=
${
BASE
}
/esp-idf
echo
[
getESP32.sh]:
export
IDF_PATH
=
${
BASE
}
/esp-idf
export
PATH
=
$PATH
:
${
BASE
}
/xtensa-esp32-elf/bin
export
PATH
=
$PATH
:
${
BASE
}
/xtensa-esp32-elf/bin
echo
[
getESP32.sh]:
export
PATH
=
$PATH
:
${
BASE
}
/xtensa-esp32-elf/bin
echo
[
getESP32.sh]:
export
PATH
=
$PATH
:
${
BASE
}
/xtensa-esp32-elf/bin
echo
echo
Setting up I DF
echo
[
getESP32.sh]:
cd
$BASE
/esp-idf-template and
echo
[
getESP32.sh]:
cd
$BASE
/esp-idf-template and
echo
[
getESP32.sh]:
type
make menuconfig or make flash to get going
echo
[
getESP32.sh]:
type
make menuconfig or make flash to get going
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment