Compiling CORTEX_A9_Cyclone_V_SoC_DK demo on arm ds ide throwing compiling errorr

Hi when i try to compile CORTEX_A9_Cyclone_V_SoC_DK on arm ds-5 ide ,present in our freertos demo list i am facing below error.Please help on this.

C:\Users\Tess-2052\Downloads\FreeRTOSv202012.00\FreeRTOSv202012.00\FreeRTOS\Source\portable\GCC\ARM_CA9\portASM.S:27:2: error: expected identifier or ‘(’ before ‘.’ token
27 | .eabi_attribute Tag_ABI_align_preserved, 1
| ^
C:\Users\Tess-2052\Downloads\FreeRTOSv202012.00\FreeRTOSv202012.00\FreeRTOS\Source\portable\GCC\ARM_CA9\portASM.S:60:13: error: stray ‘#’ in program
60 | SRSDB sp!, #SYS_MODE
| ^
C:\Users\Tess-2052\Downloads\FreeRTOSv202012.00\FreeRTOSv202012.00\FreeRTOS\Source\portable\GCC\ARM_CA9\portASM.S:61:7: error: stray ‘#’ in program
61 | CPS #SYS_MODE
| ^
C:\Users\Tess-2052\Downloads\FreeRTOSv202012.00\FreeRTOSv202012.00\FreeRTOS\Source\portable\GCC\ARM_CA9\portASM.S:65:2: error: unknown type name ‘LDR’
65 | LDR R2, ulCriticalNestingConst

I don’t think the project was created for ARM Developer Studio - are you sure the compiler in use is the same? (GCC).

I’m facing the same problem: the build runs fine with C files until it reaches assembly files and fails on the first character in the comments of the file as if the assembly format is unknown to the assembler (arm-altera-eabi-as.exe).

In the original Eclipse .cproject file the build tool location is

C:\DevTools\altera\14.0\embedded\host_tools\mentor\gnu\arm\baremetal\bin

This is a very old version of Altera SDK which is not even available for download, so I’m compiling with version 19.1 - its toolchain is in

C:\intelFPGA\19.1\embedded\host_tools\mentor\gnu\arm\baremetal\bin.

So I assume I’m using a newer version of the same compiler (as that used to create the demo) so it’s really strange the assembler fails to parse the file.

Is this the comments at the top of the file - before any code - or a comment within the code? What is the error message?

Building file: ../Altera_Code/HardwareLibrary/alt_interrupt_armcc.s
Invoking: GCC Assembler 10.3.1 [arm-none-eabi]
arm-none-eabi-as.exe -march=armv7-a -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp -I"C:\My\1609\FreeRTOSWithDemos\FreeRTOSv202112.00\FreeRTOS\Demo\CORTEX_A9_Cyclone_V_SoC_DK" -g --gdwarf2 -c -o "Altera_Code/HardwareLibrary/alt_interrupt_armcc.o" "../Altera_Code/HardwareLibrary/alt_interrupt_armcc.s"
../Altera_Code/HardwareLibrary/alt_interrupt_armcc.s: Assembler messages:
../Altera_Code/HardwareLibrary/alt_interrupt_armcc.s:1: Error: junk at end of line, first unrecognized character is `*'

Which looks like it does not accept ; as comment symbol. If I replace ; with // it accepts the comments but then fails on all assembly keywords with:

Error: bad instruction `preserve8'
Error: bad instruction `area VECTORS,CODE,READONLY'
Error: bad instruction `entry'
Error: bad instruction `export alt_interrupt_vector'
Error: bad instruction `import __main'
Error: bad instruction `export alt_int_handler_irq [WEAK]'
Error: bad instruction `alt_interrupt_vector'
Error: bad instruction `vectors'

Here is the file header:

;*****************************************************************************
;*
;* Copyright 2013 Altera Corporation. All Rights Reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions are met:
;*
;* 1. Redistributions of source code must retain the above copyright notice,
;* this list of conditions and the following disclaimer.
;*
;* 2. Redistributions in binary form must reproduce the above copyright notice,
;* this list of conditions and the following disclaimer in the documentation
;* and/or other materials provided with the distribution.
;*
;* 3. The name of the author may not be used to endorse or promote products
;* derived from this software without specific prior written permission.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR
;* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
;* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO
;* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
;* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
;* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
;* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
;* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
;* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
;* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;*
;*****************************************************************************/

;; This is a small stub vector put in front of the ARMCC image to support
;; interrupts.

    PRESERVE8
    AREA    VECTORS, CODE, READONLY

    ENTRY

    EXPORT alt_interrupt_vector
    IMPORT __main
    EXPORT alt_int_handler_irq [WEAK]

alt_interrupt_vector

Vectors
    LDR PC, alt_reset_addr
    LDR PC, alt_undef_addr
    LDR PC, alt_svc_addr
    LDR PC, alt_prefetch_addr
    LDR PC, alt_abort_addr

.........

@jackhab : Apologies for the late response. alt_interrupt_armcc.s should only be built when using armcc. The corresponding implementation for gcc is in the alt_interrupt.c file.