avr: code is 1.6 to 1.8 times avr-gcc's size on EmbLinkRTOS's Uno images
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 50/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c
- 领域
- compilers, performance
调研方向
Compare EmbCC and avr-gcc output for the scheduler in kernel/sched/sched.c and wait path in kernel/wait/wait.c, using the same EmbLinkRTOS sources and -Os settings described in the issue. Start by checking the corresponding generated code and size measurements; completion means identifying where the size difference comes from and reporting whether those paths explain the reported AVR image growth.
由索引模型根据 Issue 内容生成。
描述
The first AVR size numbers for EmbCC, which #184 noted were missing. EmbCC 0.1.0 builds EmbLinkRTOS's Arduino Uno conformance images 1.6 to 1.8 times as large as avr-gcc does, so 12 of the 22 overflow the ATmega328P's 32 KB of flash.
Text plus data, in bytes, the same sources (EmbLinkRTOS 0f776b5, tiny profile, checked, crash record on), both at -Os:
| Image | avr-gcc 14.4.0 | EmbCC 0.1.0 | Ratio |
|---|---|---|---|
test_fault |
11,992 | 21,578 | 1.80 |
test_time |
17,592 | 30,472 | 1.73 |
test_irq |
16,866 | 27,730 | 1.64 |
test_sched |
16,432 | 26,734 | 1.63 |
The images that no longer fit overflow the text region by 356 to 7,948 bytes (test_thread's text ends at 0x9d0c against the region's end at 0x7e00).
Getting there needed two local changes, neither in EmbCC: a workaround for the lo8/hi8 symbol cut (filed separately), and the RTOS's AVR toolchain file naming EmbCC's embcc-ar and embcc-ranlib; with macOS's ar the archives held only a BSD symbol table, which embld reports as "too small to be an object". That second one is the RTOS's to fix.
A first look at what grows would compare the two compilers' code for the scheduler (kernel/sched/sched.c) and the wait path (kernel/wait/wait.c), as §1 of #184 asks for Xtensa.
Part of #184 (AVR).
- 主要语言
- C
- 星标
- 1
- 派生
- 2
- 平均合并
- 20 小时 55 分钟
- 30 天内合并 PR
- 73
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
EmbLinkOs/EmbCC 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area: test kind: bug preview-effort: small priority: low
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
libsdl-org/SDL#16684 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
Issue-Bug Needs-Triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复