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
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.
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.