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

Ouverte
#207 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
50/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
c

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
C
Étoiles
1
Forks
2
Merge moyen
20 h 55 min
PR mergées (30 j)
73

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de EmbLinkOs/EmbCC

Toutes les issues de EmbLinkOs/EmbCC

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.