GCC und Cortex-M mit -march -mtune oder -mcpu?

#7051738
Lesenswert?

guten Abend,

wie sagt man dem GCC, für welchen Cortex-M er Code erzeugen soll? 
Scheinbar funktionieren -march oder -mcpu beide, aber es gibt doch 
bestimmt eine offiziell empfohlene Methode?

Bei ARM steht irgendwo fettgedruckt sowas wie "always use -mcpu". Leider 
weiß ich bei ARM nie so genau, von welcher CPU sie gerade schreiben. 
Oder von welchem Compiler. Oder wie veraltet der Text ist. Die Doku bei 
gnu.org sagt mir auch nur, dass beides geht.
Gast #7051789
Lesenswert?

mcpu=name[+extension…]

    This specifies the name of the target ARM processor. GCC uses this 
name to derive the name of the target ARM architecture (as if specified 
by -march) and the ARM processor type for which to tune for performance 
(as if specified by -mtune). Where this option is used in conjunction 
with -march or -mtune, those options take precedence over the 
appropriate part of this option.


Laut doku ja

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren