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
#7051741
abc schrieb: > https://stackoverflow.com/questions/42718572/gcc-mtune-vs-march-vs-mcpu Danke, aber ist das noch aktuell? 5 Jahre sind eine lange Zeit... Und ist wirklich Cortex-A == Cortex-M? Nur weil das für ARM alles dasselbe ist, muss das ja nicht für den GCC und die binutils gelten.
Gast
#7051789
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.