Compiling for ARM Mode

Asked by Salman Arif

Hi,

I am trying to to use `arm-none-eabi-gcc` from this toolchain to compile some assembly code for ARM mode. However, I keep getting the error "Target CPU does not support ARM mode." Could you guide me in the right direction so I may be able to compile for ARM mode?

I have tried adding the `-marm` flag to the command, but that does not seem to be the right thing to do. Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#1

Hi Salman,

Adding -marm *is* the right thing to do but the toolchain default to architectures not supporting ARM instruction set. You should therefore also add -march=armv7-r.

Best regards.

Can you help with this problem?

Provide an answer of your own, or ask Salman Arif for more information if necessary.

To post a message you must log in.