Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22f330471-1
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22f330471-1
Commits
cfb6b2b8
Commit
cfb6b2b8
authored
2 years ago
by
guozhanxin
Browse files
Options
Downloads
Patches
Plain Diff
Improve smart-env.bat
parent
dc003d21
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
smart-env.bat
+30
-4
30 additions, 4 deletions
smart-env.bat
with
33 additions
and
7 deletions
README.md
+
3
−
3
View file @
cfb6b2b8
...
...
@@ -29,7 +29,7 @@ git clone https://github.com/RT-Thread/userapps.git
### 配置工具链
在userapps
\t
ools目录下运行get_toolchain.py的脚本,会下载对应的工具链并展开到userapps
\t
ools
\g
un_gcc目录。后面的工具链名称可以是 arm |
aarch64 |
riscv64。
在userapps
\t
ools目录下运行get_toolchain.py的脚本,会下载对应的工具链并展开到userapps
\t
ools
\g
un_gcc目录。后面的工具链名称可以是 arm | riscv64。
本文以RISC-V平台为例,输入下面的命令:
...
...
@@ -37,10 +37,10 @@ git clone https://github.com/RT-Thread/userapps.git
python get_toolchain.py riscv64
```
在userapps目录下,运行smart-env.bat配置工具链路径
在userapps目录下,运行smart-env.bat配置工具链路径
,目前支持的参数可以是 arm | riscv64
```
smart-env.bat
smart-env.bat
riscv64
```
可使用set命令检查RTT_EXEC_PATH是否设置成功
...
...
This diff is collapsed.
Click to expand it.
smart-env.bat
+
30
−
4
View file @
cfb6b2b8
@set
RTT_CC
=
gcc
@set
RTT_EXEC_PATH
=
%cd%
\tools\gnu_gcc\riscv64
-linux-musleabi
_for_i686
-w
64
-mingw
32
\bin
@set
RTT_CC_PREFIX
=
riscv64
-unknown-linux-musl
-
@set
PATH
=
%RTT_EXEC_PATH%
;
%PATH%
@set
def_arch
=
arm
@if
not
"
%
1"
==
""
(
@set
def_arch
=
%
1
)
@if
%def_arch%
==
arm
(
@set
RTT_CC
=
gcc
@set
RTT_EXEC_PATH
=
%cd%
\tools\gnu_gcc\arm
-linux-musleabi
_for_i686
-w
64
-mingw
32
\bin
@set
RTT_CC_PREFIX
=
arm
-linux-musleabi
-
@set
PATH
=
%RTT_EXEC_PATH%
;
%PATH%
@copy
configs
\def_config_arm .config
)
else
if
%def_arch%
==
riscv64
(
@set
RTT_CC
=
gcc
@set
RTT_EXEC_PATH
=
%cd%
\tools\gnu_gcc\riscv64
-linux-musleabi
_for_i686
-w
64
-mingw
32
\bin
@set
RTT_CC_PREFIX
=
riscv64
-unknown-linux-musl
-
@set
PATH
=
%RTT_EXEC_PATH%
;
%PATH%
@copy
configs
\def_config_riscv64 .config
)
else
(
@echo
"ERROR:supported_arch=arm riscv64
!
"
@goto
EXIT
)
@echo
"Arch =>
%def_arch%
"
@echo
"CC =>
%RTT_CC%
"
@echo
"PREFIX =>
%RTT_CC_PREFIX%
"
@echo
"EXEC_PATH =>
%RTT_EXEC_PATH%
"
:EXIT
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment