avr: code is 1.6 to 1.8 times avr-gcc's size on EmbLinkRTOS's Uno images

オープン
#207 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c

調査の方向性

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 の本文から書いたものです。

説明

enhancement

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分
マージ済み PR(30日)
73

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

EmbLinkOs/EmbCC のほかの issue

EmbLinkOs/EmbCC の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。