Warnings about conflicting options

Bug #1592635 reported by emblocks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Invalid
Undecided
Unassigned

Bug Description

Hi,

Someone uses in a project the two following switches which is fine in 4.8:

-mcpu=cortex-m7 and -march=armv7e-m

the cortex-m7 is also a armv7e-m as far as I know.

5.3.1 is giving me the warnings for every file:

"warning: switch -mcpu=cortex-m7 conflicts with -march=armv7e-m switch"

why?

Revision history for this message
Andre Vieira (andre-simoesdiasvieira) wrote :

Hi emblocks,

This is because we define an extra feature for the cortex-m7. This is the FL_NO_VOLATILE feature which indicates that volatile memory should not be put in an IT block.

In our check to detect whether an -march option is compatible with a -mcpu option we check that they define the same set of features. This is why you see that warning. We advise against the use of both -mcpu and -march switches.

Best Regards,
Andre

Revision history for this message
emblocks (gnugcc) wrote :

Andre, thanks for your quick reply.

Where can we find more about that FL_NO_VOLATILE feature? Google shows nothing.

Regards
Gerard

Revision history for this message
emblocks (gnugcc) wrote :

BTW what is the preferred method? -mcpu I guess>

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

Hi,

-mcpu is the same as -march + -mtune. For instance -mcpu=cortex-m0 is the same as -march=armv6-m -mtune=cortex-m0.

Best regards.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

About FL_NO_VOLATILE, it's a GCC internal flag to represent the CPU capability. As Andre said, it drives GCC into not having any access to volatile memory inside an IT block. Other armv7e-m processor will not necessarily have this consideration.

Best regards

Changed in gcc-arm-embedded:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.