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

Aperta
#207 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
C
Stelle
1
Fork
2
Merge medio
20h 55m
PR unite (30g)
73

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EmbLinkOs/EmbCC

Tutte le issue di EmbLinkOs/EmbCC

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.