EmbDev.net

Forum: ARM programming with GCC/GNU tools Error on make: no such instruction


von Richard Mietz (Guest)


Rate this post
useful
not useful
Hello,

I have downloaded the newest WinARM(20060606). I set all the paths  and
some more for Vista as mentioned here
(http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/#winarm). I
compiled the lpc2106_blink_switch example. First it did not work but
after replacing the make (also mentioned on the page), it compiles
without error.
But when i want to compile a project from my work, which compiles
without errors on other systems, it ends with the following errors:
   - Compiling C: src/firmware/armISR.c
./ccA1baaa.s: Assembler messages:
./ccA1baaa.s:9: Error: no such instruction: `mrs %edx,cpsr'
./ccA1baaa.s:15: Error: no such instruction: `msr cpsr,%eax'
./ccA1baaa.s:16: Error: no such instruction: `mrs %eax,cpsr'
./ccA1baaa.s:30: Error: no such instruction: `mrs %edx,cpsr'
./ccA1baaa.s:36: Error: no such instruction: `msr cpsr,%eax'
./ccA1baaa.s:37: Error: no such instruction: `mrs %eax,cpsr'
./ccA1baaa.s:52: Error: no such instruction: `mrs %ecx,cpsr'
./ccA1baaa.s:61: Error: no such instruction: `msr cpsr,%eax'
./ccA1baaa.s:62: Error: no such instruction: `mrs %eax,cpsr'
make[1]: *** [bin/firmware/armISR.o] Error 1
make: *** [pacemate] Error 2

Has anyone an idea why this is happening. Is it a Vista problem or
something else.

Thanks, Richard

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
Richard Mietz wrote:
> But when i want to compile a project from my work, which compiles
> without errors on other systems, it ends with the following errors:
>    - Compiling C: src/firmware/armISR.c
> ./ccA1baaa.s: Assembler messages:
> ./ccA1baaa.s:9: Error: no such instruction: `mrs %edx,cpsr'
> ./ccA1baaa.s:15: Error: no such instruction: `msr cpsr,%eax'
> ./ccA1baaa.s:16: Error: no such instruction: `mrs %eax,cpsr'
> ./ccA1baaa.s:30: Error: no such instruction: `mrs %edx,cpsr'
> ./ccA1baaa.s:36: Error: no such instruction: `msr cpsr,%eax'
> ./ccA1baaa.s:37: Error: no such instruction: `mrs %eax,cpsr'
> ./ccA1baaa.s:52: Error: no such instruction: `mrs %ecx,cpsr'
> ./ccA1baaa.s:61: Error: no such instruction: `msr cpsr,%eax'
> ./ccA1baaa.s:62: Error: no such instruction: `mrs %eax,cpsr'
> make[1]: *** [bin/firmware/armISR.o] Error 1
> make: *** [pacemate] Error 2
>
> Has anyone an idea why this is happening. Is it a Vista problem or
> something else.

Might be an ARM/THUMB problem. armISR impliest that interrupt-handlers
are implemented in this file and if no wrapper-function is used they
have to be compiled in arm-mode. Simply not enough information: gcc
options to compile armISR.c? Source code of armISR.c?

von Richard Mietz (Guest)


Attached files:

Rate this post
useful
not useful
> Might be an ARM/THUMB problem. armISR impliest that interrupt-handlers
> are implemented in this file and if no wrapper-function is used they
> have to be compiled in arm-mode. Simply not enough information: gcc
> options to compile armISR.c? Source code of armISR.c?

Hi,

i know it compiles on other machines with windows xp, so it could be an
error of vista, right?
Here are the makefile and the sourcefile that cannot be compiled:

#----------------------------------------------------------------------- 
-------
#----------------------------------------------------------------------- 
-------

include Makefile.files

#----------------------------------------------------------------------- 
-------
#-- TODO: Define the main binary name and the (preferred: realative)
location
#--       to the Jennic SDK root path (e.g. "..") without trailing /
#----------------------------------------------------------------------- 
-------

CCP  = arm-elf-g++
CC   = arm-elf-gcc
AR   = arm-elf-ar
AS   = arm-elf-as
SIZE  = arm-elf-size

PACEMATE_FIRMWARE_PATH = isense/pacemate/firmware
SRC_PATH = src

TARGET = iSenseLibraryPacemate
OBJS_PATH    = bin/pacemate

BLDSRCS +=  $(PACEMATE_FIRMWARE_PATH)/Accu.c \
            $(PACEMATE_FIRMWARE_PATH)/armISR.c \
            $(PACEMATE_FIRMWARE_PATH)/armVIC.c \
            $(PACEMATE_FIRMWARE_PATH)/crt0.S \
            $(PACEMATE_FIRMWARE_PATH)/Demo.c \
            $(PACEMATE_FIRMWARE_PATH)/Display.c \
            $(PACEMATE_FIRMWARE_PATH)/Event.c \
            $(PACEMATE_FIRMWARE_PATH)/fonts.c \
            $(PACEMATE_FIRMWARE_PATH)/HR.c \
            $(PACEMATE_FIRMWARE_PATH)/Irq.c \
            $(PACEMATE_FIRMWARE_PATH)/Key.c \
            $(PACEMATE_FIRMWARE_PATH)/Led.c \
            $(PACEMATE_FIRMWARE_PATH)/main.c \
            $(PACEMATE_FIRMWARE_PATH)/RF.c \
            $(PACEMATE_FIRMWARE_PATH)/RS232.c \
            $(PACEMATE_FIRMWARE_PATH)/RTC.c \
            $(PACEMATE_FIRMWARE_PATH)/Router.c \
            $(PACEMATE_FIRMWARE_PATH)/Spi.c \
            $(PACEMATE_FIRMWARE_PATH)/Sys.c \
            $(PACEMATE_FIRMWARE_PATH)/syscalls.c \
            $(PACEMATE_FIRMWARE_PATH)/Timer.c \
            $(PACEMATE_FIRMWARE_PATH)/Timer1.c \
            $(PACEMATE_FIRMWARE_PATH)/Debug.c \
            $(PACEMATE_FIRMWARE_PATH)/XE1205Driver.c

#----------------------------------------------------------------------- 
-------
#-- Pacemate specifics
#----------------------------------------------------------------------- 
-------

## Create ROM-Image (final)
RUN_MODE=ROM_RUN
## Create RAM-Image (debugging)
##RUN_MODE=RAM_RUN

# Output format. (can be srec, ihex, binary)
FORMAT = ihex
#FORMAT = srec

# Debugging format.
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
DEBUG = stabs
#DEBUG = dwarf-2

MCU = arm7tdmi-s
THUMB_IW =

#----------------------------------------------------------------------- 
-------
#-- DO NOT TOUCH
#-- Set up the C compiler flags
#----------------------------------------------------------------------- 
-------

LOCAL_COMMON_FLAGS += -I$(SRC_PATH)
LOCAL_COMMON_FLAGS += -I$(PACEMATE_FIRMWARE_PATH)
LOCAL_COMMON_FLAGS += -Wall
LOCAL_COMMON_FLAGS += -DISENSE_PACEMATE
LOCAL_COMMON_FLAGS += -DNDEBUG
LOCAL_COMMON_FLAGS += -Os
LOCAL_COMMON_FLAGS += -D$(RUN_MODE)


#LOCAL_COMMON_FLAGS += -DENABLE_MALLOC_SIMPLE
#LOCAL_COMMON_FLAGS += -DENABLE_MALLOC_BMEM

#LOCAL_COMMON_FLAGS += -DTIMER_DEBUG
#LOCAL_COMMON_FLAGS += -DCLOCK_TEST

LOCAL_COMMON_FLAGS  += -Wcast-align -Wcast-qual -Wimplicit
-Wpointer-arith -Wswitch
LOCAL_COMMON_FLAGS  += -Wredundant-decls -Wreturn-type -Wshadow -Wunused

LOCAL_CPPFLAGS = -fno-exceptions -fconserve-space
-fno-implicit-inline-templates -fno-rtti

CFLAGS   += $(LOCAL_COMMON_FLAGS) -std=gnu99
CPPFLAGS += $(LOCAL_COMMON_FLAGS) $(LOCAL_CPPFLAGS)

ASMFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp
-D$(RUN_MODE)

#----------------------------------------------------------------------- 
-------
#-- DO NOT TOUCH
#-- This converts the *.c/*.cpp,*.S source file names to the output file
names in
#-- the binary folder
#----------------------------------------------------------------------- 
-------

TMP_C_OBJECTS  = $(filter %.o,$(BLDSRCS:.c=.o))
TMP_CPP_OBJECTS= $(filter %.o,$(BLDSRCS:.cpp=.o))
TMP_ASM_OBJECTS= $(filter %.o,$(BLDSRCS:.S=.o))

C_OBJECTS  =$(TMP_C_OBJECTS:%=$(OBJS_PATH)/%)
CPP_OBJECTS=$(TMP_CPP_OBJECTS:%=$(OBJS_PATH)/%)
ASM_OBJECTS=$(TMP_ASM_OBJECTS:%=$(OBJS_PATH)/%)

OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS) $(ASM_OBJECTS)

#----------------------------------------------------------------------- 
-------
#-- DO NOT TOUCH
#-- Build rules for the main application
#----------------------------------------------------------------------- 
-------

all: buildlibs buildbin

debug:
  @echo -e
"\n--------------------------------------------------------------------- 
----\
  \n   Sources    : $(BLDSRCS) \
  \n   AsmSources : $(ASMSRCS) \
  \n   Objects    : $(OBJECTS) \
  \n   AsmObjects : $(ASMOBJS) \
  \n   Libfiles   : $(LIBFILE) \
  \n---------------------------------------------------------------------- 
---"

buildbin: lib/pacemate/$(TARGET).a

buildlibs:

#----------------------------------------------------------------------- 
-------
#-- DO NOT TOUCH
#-- Build rules for the .c files
#----------------------------------------------------------------------- 
-------

$(OBJS_PATH)/%.o: $(SRC_PATH)/%.cpp
  @echo "   - Compiling C++ (Pacemate): $<"
  mkdir -p `dirname $@`
  $(CCP) $(CPPFLAGS) -MMD -c $< -o $@
  mv $(@:%.o=%.d) $(@:%.o=%.P)

$(OBJS_PATH)/%.o: $(SRC_PATH)/%.c
  @echo "   - Compiling C (Pacemate): $<"
  mkdir -p `dirname $@`
  $(CC) $(CFLAGS) -MMD -c $< -o $@
  mv $(@:%.o=%.d) $(@:%.o=%.P)

$(OBJS_PATH)/%.o: $(SRC_PATH)/%.S
  @echo "   - Assembling (Pacemate): $<"
  mkdir -p `dirname $@`
  $(CC) $(ASMFLAGS) -c $< -o $@

#----------------------------------------------------------------------- 
-------
#-- DO NOT TOUCH
#-- Linker
#----------------------------------------------------------------------- 
-------

lib/pacemate/$(TARGET).a: $(OBJECTS)
  rm -f lib/pacemate/$(TARGET).a
  $(AR) r lib/pacemate/$(TARGET).a $(OBJECTS)

#----------------------------------------------------------------------- 
-------
#--
#----------------------------------------------------------------------- 
-------

clean:
  rm -f $(OBJECTS)

#----------------------------------------------------------------------- 
-------
#-- End
#----------------------------------------------------------------------- 
-------

.PRECIOUS: %.o %.or32
#.PHONY: all buildbin debug buildlibs
.PHONY: all buildbin debug
.SUFFIXES:


#----------------------------------------------------------------------- 
-------
# Dependency lists
#----------------------------------------------------------------------- 
-------
-include $(BLDSRCS:%.c=$(OBJS_PATH)/%.P)
-include $(BLDSRCS:%.cpp=$(OBJS_PATH)/%.P)

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.