2

I've read in many places that ARMv8A supports backwards compatible ARMv7A code (the former is now called AArch64 and the later is now called AArch32).

I'm running an ARMv8A machine (on the Raspberry Pi 4B, with the BCM2835 SoC), but I would like to write and debug GNU Assembly code written in ARMv7A language. How do I compile .S files written in ARMv7A and run it on my machine?

I was hoping that something like

    gcc MyAsmFile.S -march=armv7-a

would work, but I get the following error:

    cc1: **error**: unknown value: 'armv7-a' for '-march'
    cc1: *note*: valid arguments are: armv8-a ... armv8.6-a native; did you mean '**armv8-a**'?

Any advice would be appreciated! The reason is that I'd like to practice ARMv7A code specifically as that is what we will use at work.

3
  • 1
    Maybe you need an actual cross toolchain (gcc-arm-linux-gnueabihf possibly)? Aug 1, 2021 at 21:22
  • Thank you but how do I then run the compiled code? Is there any special flags I would need to tell gcc-arm-linux-gnuabihf that the code is written in ARMv7A but will be run on an AArch32? Or are these identical and can just run natively interchangably? Aug 6, 2021 at 13:10
  • Sorry I know nothing about that architecture really Aug 6, 2021 at 18:53

0

You must log in to answer this question.

Browse other questions tagged .