Skip to content

Commit 4726c9e

Browse files
committed
[fix] 更新BSP配置
1 parent d01b58d commit 4726c9e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

bsp/xuantie/smartl/e901/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ E901+ 处理器体系结构的主要特点如下:
8787

8888
<img src="figures/2.scons.png" alt="env" style="zoom: 95%;" />
8989

90+
如果期望进一步减小固件的大小,添加下述编译参数使用minilibc库可以有效降低固件大小。
91+
92+
```
93+
-specs=minilibc.specs
94+
```
95+
9096
生成可执行文件,可以直接在命令行启动qemu或者配置vscode脚本借助vscode强大的插件进行图形化调试,qemu的相关命令可以查看玄铁qemu的[用户手册](https://www.xrvm.cn/community/download?id=4397435198627713024),下述是启动qemu的命令,在powershell或命令行可直接执行下述命令,注意qemu需要导出至环境变量或者使用绝对路径。
9197

9298
```shell

bsp/xuantie/smartl/e901/rtconfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@
6464
)
6565

6666
CFLAGS = DEVICE + ' -g -Wall -Wno-unused-function -Wformat -Wformat-security -Warray-bounds -Wuninitialized \
67-
-Wreturn-type -Wcomment -Wswitch -Wparentheses -specs=minilibc.specs -MP -MMD -Os -Wpointer-arith \
67+
-Wreturn-type -Wcomment -Wswitch -Wparentheses -MP -MMD -Os -Wpointer-arith \
6868
-Wno-undef -ffunction-sections -fdata-sections -fno-inline-functions -fno-builtin \
6969
-fno-strict-aliasing -Wno-char-subscripts -Wno-unused-but-set-variable ' + GLOBAL_DEFINES
7070

7171
AFLAGS = DEVICE + ' -g -Wall -Wno-unused-function -Wformat -Wformat-security -Warray-bounds -Wuninitialized \
72-
-Wreturn-type -Wcomment -Wswitch -Wparentheses -specs=minilibc.specs -MP -MMD -Os -Wpointer-arith \
72+
-Wreturn-type -Wcomment -Wswitch -Wparentheses -MP -MMD -Os -Wpointer-arith \
7373
-Wno-undef -ffunction-sections -fdata-sections -fno-inline-functions -fno-builtin \
7474
-fno-strict-aliasing -Wno-char-subscripts -Wno-unused-but-set-variable ' + ' -MP -MMD -D"Default_IRQHandler=SW_handler" ' + GLOBAL_DEFINES
7575

76-
LFLAGS = DEVICE + ' -MP -MMD -Wl,-zmax-page-size=1024 -Wl,-Map=yoc.map -Wl,-zmax-page-size=1024 -Wl,-Map=yoc.map -Wl,--whole-archive -Wl,--no-whole-archive -specs=minilibc.specs -nostartfiles -Wl,--gc-sections '
76+
LFLAGS = DEVICE + ' -MP -MMD -Wl,-zmax-page-size=1024 -Wl,-Map=yoc.map -Wl,-zmax-page-size=1024 -Wl,-Map=yoc.map -Wl,--whole-archive -Wl,--no-whole-archive -nostartfiles -Wl,--gc-sections '
7777
LFLAGS += ' -T ' + LINK_FILE
7878

7979
CPATH = ''

0 commit comments

Comments
 (0)