This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Unable to convert R52 sample project from Arm Compiler for Embedded to GCC

Hi,

In order to introduce my issue, my goal is to get 2 similar projects, one compiled by Arm Compiler for Embedded 6 and the other by GCC,  both on a FVP Cortex R-52 target.

I chose to build the project on the example available when installing Arm Development Studio named startup_Cortex-R52.

Concerning the Arm Compiler part I have no issues, project works fine as I did not change anything. So I tried to build my second project, compiled by GCC based on the startup_Cortex-R52 example.

I added the GCC 10.3.1 toolchain to Arm Developement Studio and choosed this toolchain in the Tool Chain Editor of my project. I have also set up my project by giving these options in project properties for both GCC Compiler and Assembler : -mcpu=cortex-r52 -mfpu=neon-fp-armv8 -mfloat-abi=hard

Errors occur when I try to build the project and specially in the startup.s file are related to Assembler messages :

I am wondering why I faced this issues as the target is the same and Assembler language too.

If someone can help me to resolve this issue I would be grateful.

Regards, Enzo

Parents
  • Hi Enzo

    The startup_Cortex-R52 example can be compiled with arm-none-eabi-gcc in the same way as armclang, i.e.:
    arm-none-eabi-gcc -mcpu=cortex-r52 -mfpu=neon-fp-armv8 -mfloat-abi=hard -x assembler-with-cpp -mthumb -g -c startup.s

    Note that you'll need to

    1) Change line 523 from
    ANDS r0, r0, 0xF
    to
    ANDS r0, r0, #0xF
    (gcc seems stricter than armclang here)

    and

    2) Comment out line 550 (which anyway isn't needed):
    //    .size Reset_Handler, . - Reset_Handler

    Hope this helps

    Stephen

Reply
  • Hi Enzo

    The startup_Cortex-R52 example can be compiled with arm-none-eabi-gcc in the same way as armclang, i.e.:
    arm-none-eabi-gcc -mcpu=cortex-r52 -mfpu=neon-fp-armv8 -mfloat-abi=hard -x assembler-with-cpp -mthumb -g -c startup.s

    Note that you'll need to

    1) Change line 523 from
    ANDS r0, r0, 0xF
    to
    ANDS r0, r0, #0xF
    (gcc seems stricter than armclang here)

    and

    2) Comment out line 550 (which anyway isn't needed):
    //    .size Reset_Handler, . - Reset_Handler

    Hope this helps

    Stephen

Children