This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

Linux/AM3358: Exact flags for gcc compiler to specify cpu / architecture / fpu

Intellectual 660 points

Replies: 10

Views: 323

Part Number: AM3358

Tool/software: Linux

Hi,

I am working with a Beaglebone Black and SDK 05_01_00_11.

I am trying to find out the right compiler flags. More concretely, I am thinking on the flags related to specification of cpu, machine architecture and fpu.

The default configuration of SDK compiler is:

-march = armv7-a

-marm [disabled]

-mcpu [default]

-mtune=cortex-a9

-mfpu=vfpv3-d16

As the AM3358 is Cortex-A8 and has a NEON coprocessor, I think that the right configuration when doing cross-compilation should be:

-march = armv7-a

-marm [enabled]

-mcpu = cortex-a8

-mtune=cortex-a8

-mfpu=neon

Am I right?

Thanks in advance,

  Miguel

  • Hi Miguel,

    The GCC compiler that is coming with AM335x PSDK Linux has the below flags:

    -march=armv7-a -marm -mfpu=neon -mtune=cortex-a8


    Check below pointers for more info:

    software-dl.ti.com/.../Foundational_Components_Kernel_Drivers.html
    software-dl.ti.com/.../Overview_Getting_Started_Guide.html

    processors.wiki.ti.com/.../Linux_Training:Introduction_to_Cross_Compiling
    processors.wiki.ti.com/.../Build_OpenSwan_for_Sitara

    Regards,
    Pavel



  • In reply to Pavel Botev:

    Hi Pavel,

    Thanks for yor answer.

    When I execute:
    $arm-Linux-gnueabihf-gcc -Q --help=target

    I get the following:

    The following options are target specific:
    ...
    -march= armv7-a
    -marm [disabled]
    ...
    -mcpu= [default]
    ...
    -mfpu= vfpv3-d16
    ...
    -mtune= cortex-a9
    ...

    Which differst from your answer. Am I doing something wrong?

    Best Regards,
    Miguel
  • In reply to Miguel S:

    Miguel,

    Can you please provide me full console log of your boot process plus what you have in user space. You can put that log in txt file and attach that txt file here in the forum.

    Provide me also the steps you are doing to setup the Linaro toolchain on your host PC.

    Regards,
    Pavel



  • In reply to Pavel Botev:

    7317.console.txtHi Pavel,

    The console log is attached.  Regarding the user space, I have just flashed my BBB with the prebuilt image from SDK:tisdk-rootfs-image-am335x-evm.tar.xz

    On the other, my issue is related to the gcc cross-compiler on my host (Ubuntu VM).  So, I am not sure why it is necessary the console log.

    Thanks again,

      Miguel

  • In reply to Miguel S:

    Miguel,

    Sorry for misunderstanding, I need also console log from your Ubuntu host machine.

    Regards,
    Pavel



  • In reply to Pavel Botev:

    console_host_Ubuntu.txt

    Ok, here it is the console log of the Ubuntu host when booting.

    Regards,

      Miguel

  • In reply to Miguel S:

    Miguel,

    The GCC Linaro compiler arm-linux-gnueabihf- is common for AM335x/AM437x/AM57x/AM65x devices, thus the output of "arm-Linux-gnueabihf-gcc -Q --help=target" should not be an issue.

    Just make sure you are aligned with below guidelines:

    software-dl.ti.com/.../Overview_Getting_Started_Guide.html

    Regards,
    Pavel



  • In reply to Pavel Botev:

    Pavel,

    So, as the compiler is common for AM335x/AM437x/AM57x/AM65x devices, what I understand is that cross-compilation for each one should be done with different flags, just to specify the particularities of each one. Right?
    And my guess is that, for AM3358, I should set:

    -march=armv7-a -marm -mfpu=neon -mcpu=cortex-a8 -mtune=cortex-a8

    Is all this right?

    Regards,
    Miguel
  • In reply to Miguel S:

    Miguel,

    Yes, that looks correct.

    Regards,
    Pavel



  • In reply to Pavel Botev:

    Hi Pavel,

    OK. Thanks for your support.

    Best Regards,

      Miguel

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.