Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43676597
arduino-esp32
提交
a807507c
A
arduino-esp32
项目概览
weixin_43676597
/
arduino-esp32
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
arduino-esp32
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a807507c
编写于
2月 06, 2023
作者:
M
Me No Dev
提交者:
GitHub
2月 06, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Backport some fixes from esp-idf-v5.1 (#7762)
上级
7f494637
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
110 addition
and
32 deletion
+110
-32
.github/scripts/install-arduino-cli.sh
.github/scripts/install-arduino-cli.sh
+46
-0
.github/scripts/on-push.sh
.github/scripts/on-push.sh
+8
-6
.github/scripts/on-release.sh
.github/scripts/on-release.sh
+4
-4
.github/scripts/sketch_utils.sh
.github/scripts/sketch_utils.sh
+47
-17
platform.txt
platform.txt
+5
-5
未找到文件。
.github/scripts/install-arduino-cli.sh
0 → 100755
浏览文件 @
a807507c
#!/bin/bash
OSBITS
=
`
arch
`
if
[[
"
$OSTYPE
"
==
"linux"
*
]]
;
then
export
OS_IS_LINUX
=
"1"
if
[[
"
$OSBITS
"
==
"i686"
]]
;
then
OS_NAME
=
"linux32"
elif
[[
"
$OSBITS
"
==
"x86_64"
]]
;
then
OS_NAME
=
"linux64"
elif
[[
"
$OSBITS
"
==
"armv7l"
||
"
$OSBITS
"
==
"aarch64"
]]
;
then
OS_NAME
=
"linuxarm"
else
OS_NAME
=
"
$OSTYPE
-
$OSBITS
"
echo
"Unknown OS '
$OS_NAME
'"
exit
1
fi
elif
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
export
OS_IS_MACOS
=
"1"
OS_NAME
=
"macosx"
elif
[[
"
$OSTYPE
"
==
"cygwin"
]]
||
[[
"
$OSTYPE
"
==
"msys"
]]
||
[[
"
$OSTYPE
"
==
"win32"
]]
;
then
export
OS_IS_WINDOWS
=
"1"
OS_NAME
=
"windows"
else
OS_NAME
=
"
$OSTYPE
-
$OSBITS
"
echo
"Unknown OS '
$OS_NAME
'"
exit
1
fi
export
OS_NAME
if
[
"
$OS_IS_MACOS
"
==
"1"
]
;
then
export
ARDUINO_IDE_PATH
=
"
$HOME
/bin"
export
ARDUINO_USR_PATH
=
"
$HOME
/Documents/Arduino"
elif
[
"
$OS_IS_WINDOWS
"
==
"1"
]
;
then
export
ARDUINO_IDE_PATH
=
"
$HOME
/bin"
export
ARDUINO_USR_PATH
=
"
$HOME
/Documents/Arduino"
else
export
ARDUINO_IDE_PATH
=
"
$HOME
/bin"
export
ARDUINO_USR_PATH
=
"
$HOME
/Arduino"
fi
if
[
!
-d
"
$ARDUINO_IDE_PATH
"
]
||
[
!
-f
"
$ARDUINO_IDE_PATH
/arduino-cli"
]
;
then
echo
"Installing Arduino CLI on
$OS_NAME
..."
mkdir
-p
"
$ARDUINO_IDE_PATH
"
curl
-fsSL
https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh |
BINDIR
=
"
$ARDUINO_IDE_PATH
"
sh
fi
.github/scripts/on-push.sh
浏览文件 @
a807507c
...
...
@@ -9,7 +9,8 @@ function build(){
local
fqbn
=
$2
local
chunk_index
=
$3
local
chunks_cnt
=
$4
local
sketches
=
$5
shift
;
shift
;
shift
;
shift
;
local
sketches
=
$*
local
BUILD_SKETCH
=
"
${
SCRIPTS_DIR
}
/sketch_utils.sh build"
local
BUILD_SKETCHES
=
"
${
SCRIPTS_DIR
}
/sketch_utils.sh chunk_build"
...
...
@@ -24,15 +25,15 @@ function build(){
${
BUILD_SKETCHES
}
${
args
}
else
for
sketch
in
${
sketches
}
;
do
args+
=
"
-s
$(
dirname
$sketch
)
"
if
[
"
$OS_IS_WINDOWS
"
==
"1"
]
;
then
local
sargs
=
"
$args
-s
$(
dirname
$sketch
)
"
if
[
"
$OS_IS_WINDOWS
"
==
"1"
]
&&
[
-d
"
$ARDUINO_IDE_PATH
/tools-builder"
]
;
then
local
ctags_version
=
`
ls
"
$ARDUINO_IDE_PATH
/tools-builder/ctags/"
`
local
preprocessor_version
=
`
ls
"
$ARDUINO_IDE_PATH
/tools-builder/arduino-preprocessor/"
`
win_opts
=
"-prefs=runtime.tools.ctags.path=
$ARDUINO_IDE_PATH
/tools-builder/ctags/
$ctags_version
-prefs=runtime.tools.arduino-preprocessor.path=
$ARDUINO_IDE_PATH
/tools-builder/arduino-preprocessor/
$preprocessor_version
"
args+
=
"
${
win_opts
}
"
s
args+
=
"
${
win_opts
}
"
fi
${
BUILD_SKETCH
}
${
args
}
${
BUILD_SKETCH
}
${
s
args
}
done
fi
}
...
...
@@ -59,7 +60,8 @@ fi
SCRIPTS_DIR
=
"./.github/scripts"
if
[
"
$BUILD_PIO
"
-eq
0
]
;
then
source
${
SCRIPTS_DIR
}
/install-arduino-ide.sh
#source ${SCRIPTS_DIR}/install-arduino-ide.sh
source
${
SCRIPTS_DIR
}
/install-arduino-cli.sh
source
${
SCRIPTS_DIR
}
/install-arduino-core-esp32.sh
FQBN_ESP32
=
"espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
...
...
.github/scripts/on-release.sh
浏览文件 @
a807507c
...
...
@@ -197,10 +197,10 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
echo
"Generating platform.txt..."
cat
"
$GITHUB_WORKSPACE
/platform.txt"
|
\
sed
"s/version=.*/version=
$ver$extent
/g"
|
\
sed
's/
runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/
/g'
|
\
sed
's/
runtime.tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/
/g'
|
\
sed
's/
runtime.tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/
/g'
|
\
sed
's/
runtime.tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf/
/g'
|
\
sed
's/
tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}
/g'
|
\
sed
's/
tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}
/g'
|
\
sed
's/
tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}
/g'
|
\
sed
's/
tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\{runtime.tools.riscv32-esp-elf-gcc.path\}
/g'
|
\
sed
's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g'
|
\
sed
's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g'
|
\
sed
's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g'
|
\
...
...
.github/scripts/sketch_utils.sh
浏览文件 @
a807507c
...
...
@@ -121,34 +121,65 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
if
[
-n
"
$ARDUINO_BUILD_DIR
"
]
;
then
build_dir
=
"
$ARDUINO_BUILD_DIR
"
elif
[
$len
-eq
1
]
;
then
build_dir
=
"
$sketchdir
/build"
# build_dir="$sketchdir/build"
build_dir
=
"
$HOME
/.arduino/build.tmp"
fi
mkdir
-p
"
$ARDUINO_CACHE_DIR
"
for
i
in
`
seq
0
$((
$len
-
1
))
`
do
if
[
$len
-ne
1
]
;
then
build_dir
=
"
$sketchdir
/build
$i
"
# build_dir="$sketchdir/build$i"
build_dir
=
"
$HOME
/.arduino/build
$i
.tmp"
fi
rm
-rf
$build_dir
mkdir
-p
$build_dir
currfqbn
=
`
echo
$fqbn
| jq
-r
--argjson
i
$i
'.[$i]'
`
sketchname
=
$(
basename
$sketchdir
)
echo
"Building
$sketchname
with FQBN=
$currfqbn
"
$ide_path
/arduino-builder
-compile
-logger
=
human
-core-api-version
=
10810
\
-fqbn
=
\"
$currfqbn
\"
\
-warnings
=
"all"
\
-tools
"
$ide_path
/tools-builder"
\
-tools
"
$ide_path
/tools"
\
-built-in-libraries
"
$ide_path
/libraries"
\
-hardware
"
$ide_path
/hardware"
\
-hardware
"
$user_path
/hardware"
\
-libraries
"
$user_path
/libraries"
\
-build-cache
"
$ARDUINO_CACHE_DIR
"
\
-build-path
"
$build_dir
"
\
$xtra_opts
"
${
sketchdir
}
/
${
sketchname
}
.ino"
if
[
-f
"
$ide_path
/arduino-cli"
]
;
then
echo
"Building
$sketchname
with arduino-cli and FQBN=
$currfqbn
"
curroptions
=
`
echo
"
$currfqbn
"
|
cut
-d
':'
-f4
`
currfqbn
=
`
echo
"
$currfqbn
"
|
cut
-d
':'
-f1-3
`
$ide_path
/arduino-cli compile
\
--fqbn
"
$currfqbn
"
\
--board-options
"
$curroptions
"
\
--warnings
"all"
\
--build-cache-path
"
$ARDUINO_CACHE_DIR
"
\
--build-path
"
$build_dir
"
\
$xtra_opts
"
${
sketchdir
}
"
elif
[
-f
"
$ide_path
/arduino-builder"
]
;
then
echo
"Building
$sketchname
with arduino-builder and FQBN=
$currfqbn
"
$ide_path
/arduino-builder
-compile
-logger
=
human
-core-api-version
=
10810
\
-fqbn
=
\"
$currfqbn
\"
\
-warnings
=
"all"
\
-tools
"
$ide_path
/tools-builder"
\
-hardware
"
$user_path
/hardware"
\
-libraries
"
$user_path
/libraries"
\
-build-cache
"
$ARDUINO_CACHE_DIR
"
\
-build-path
"
$build_dir
"
\
$xtra_opts
"
${
sketchdir
}
/
${
sketchname
}
.ino"
# $ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
# -fqbn=\"$currfqbn\" \
# -warnings="all" \
# -tools "$ide_path/tools-builder" \
# -tools "$ide_path/tools" \
# -built-in-libraries "$ide_path/libraries" \
# -hardware "$ide_path/hardware" \
# -hardware "$user_path/hardware" \
# -libraries "$user_path/libraries" \
# -build-cache "$ARDUINO_CACHE_DIR" \
# -build-path "$build_dir" \
# $xtra_opts "${sketchdir}/${sketchname}.ino"
fi
done
unset
fqbn
unset
xtra_opts
unset
options
}
function
count_sketches
(){
# count_sketches <path> [target]
...
...
@@ -294,8 +325,7 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
fi
echo
""
echo
"Building Sketch Index
$((
$sketchnum
-
1
))
-
$sketchdirname
"
args+
=
" -s
$sketchdir
$xtra_opts
"
build_sketch
$args
build_sketch
$args
-s
$sketchdir
$xtra_opts
local
result
=
$?
if
[
$result
-ne
0
]
;
then
return
$result
...
...
platform.txt
浏览文件 @
a807507c
name=ESP32 Arduino
version=2.0.6
runtime.
tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
runtime.
tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf
runtime.
tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s3-elf
runtime.
tools.riscv32-esp-elf-gcc.path={runtime.platform.path}/tools/riscv32-esp-elf
tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf
tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s3-elf
tools.riscv32-esp-elf-gcc.path={runtime.platform.path}/tools/riscv32-esp-elf
debug.server.openocd.path={runtime.platform.path}/tools/openocd-esp32/bin/openocd
debug.server.openocd.scripts_dir={runtime.platform.path}/tools/openocd-esp32/share/openocd/scripts/
...
...
@@ -27,7 +27,7 @@ tools.gen_esp32part.cmd.windows="{runtime.platform.path}/tools/gen_esp32part.exe
tools.gen_insights_pkg.cmd=python3 "{runtime.platform.path}"/tools/gen_insights_package.py
tools.gen_insights_pkg.cmd.windows="{runtime.platform.path}/tools/gen_insights_package.exe"
compiler.path={
runtime.
tools.{build.tarch}-{build.target}-elf-gcc.path}/bin/
compiler.path={tools.{build.tarch}-{build.target}-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk/{build.mcu}
compiler.prefix={build.tarch}-{build.target}-elf-
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录