Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

hai,

I am getting the following error while making mod.

NMAKE : fatal error U1077: 'E:\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pe
ntium\armlink.EXE' : return code '0x1'

I have installed elfmod2.exe also.My code is in .c instead of .cpp.So i have to use some global and static variable.Plz help me out as soon as possible.

looks like ARM licensing error; not related to static and global variables. Generate ELF file with ARM compiler and then use Elf2Mod utility to generate MOD from ELF.

looks like ARM licensing error; not related to static and global variables. Generate ELF file with ARM compiler and then use Elf2Mod utility to generate MOD from ELF.

hai Atul,
I tried as you told but still i am unable to create mod.Plz help me out.
Thnx
ami

hai Atul,
I tried as you told but still i am unable to create mod.Plz help me out.
Thnx
ami

Please mention the exact problem...were you able to generate ELF file?

Please mention the exact problem...were you able to generate ELF file?

hai Atul,
Below is my .mak file.What changes are required?
BREW_HOME =$(BREWDIR315)
ARM_HOME =$(ARM_HOME)
TARGET =invinf
OBJS = AEEAPP~1.o AEEMOD~1.o ALLOCA~1.o CLASSI~1.o ENEMYS~2.o ENEMYS~1.o FILEIS~1.o GRAPHI~1.o Jiki.o JikiShot.o ANALYZ~1.o btext.o chain.o device.o DISCHA~1.o DRAWEN~2.o DRAWEN~1.o expEnemy.o heap.o hit.o HITEFF~1.o hitEnemy.o HITENE~2.o HITENE~3.o HITENE~4.o HITENE~1.o HICAB5~1.o HIEF7F~1.o HI64DB~1.o invinf.o INVINF~1.o INVINF~2.o libsound.o MOVEEN~1.o score.o
APP_INCLUDES =-I $(BREWDIR315)\inc -I $(BREWDIR315)\inc\v3
#-------------------------------------------------------------------------------
# Target file name and type definitions
#-------------------------------------------------------------------------------
EXETYPE = elf # Target image file format
MODULE = mod # Downloadable module extension
#-------------------------------------------------------------------------------
# Target compile time symbol definitions
#
# Tells the SDK source stuffs that we're building a dynamic app.
#-------------------------------------------------------------------------------
DYNAPP = -DDYNAMIC_APP
#-------------------------------------------------------------------------------
# Software tool and environment definitions
#-------------------------------------------------------------------------------
AEESRCPATH = $(BREW_HOME)\src
AEEINCPATH = $(BREW_HOME)\inc
ARMBIN = E:\ELF2MOD\bin # ARM ADS application directory
ARMINC = $(ARM_HOME)\include # ARM ADS include file directory
ARMLIB = $(ARM_HOME)\lib # ARM ADS library directory
ARMCC = $(ARM_HOME)\armcc # ARM ADS ARM 32-bit inst. set ANSI C compiler
LD = $(ARM_HOME)\armlink # ARM ADS linker
HEXTOOL = E:\ELF2MOD\bin\elf2mod.exe # ARM ADS utility to create hex file from image
OBJ_CMD = -o # Command line option to specify output filename
#-------------------------------------------------------------------------------
# Processor architecture options
#-------------------------------------------------------------------------------
CPU = -cpu ARM7TDMI # ARM7TDMI target processor
#-------------------------------------------------------------------------------
# ARM Procedure Call Standard (APCS) options
#-------------------------------------------------------------------------------
ROPI = ropi # Read-Only(code) Position independence
INTERWRK = interwork # Allow ARM-Thumb interworking
APCS = -apcs /$(ROPI)/$(INTERWRK)/norwpi
#-------------------------------------------------------------------------------
# Additional compile time error checking options
#-------------------------------------------------------------------------------
#CHK = -fa # Check for data flow anomolies
#-------------------------------------------------------------------------------
# Compiler output options
#-------------------------------------------------------------------------------
OUT = -c # Object file output only
#-------------------------------------------------------------------------------
# Compiler/assembler debug options
#-------------------------------------------------------------------------------
DBG = -g # Enable debug
#-------------------------------------------------------------------------------
# Compiler optimization options
#-------------------------------------------------------------------------------
OPT = -Ospace -O2 # Full compiler optimization for space
#-------------------------------------------------------------------------------
# Compiler code generation options
#-------------------------------------------------------------------------------
END = -littleend # Compile for little endian memory architecture
ZA = -zo # LDR may only access 32-bit aligned addresses
CODE = $(END) $(ZA)
#-------------------------------------------------------------------------------
# Include file search path options
#-------------------------------------------------------------------------------
INC = -I. -I$(AEEINCPATH) $(APP_INCLUDES)
#-------------------------------------------------------------------------------
# Compiler pragma emulation options
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Linker options
#-------------------------------------------------------------------------------
LINK_CMD = -o #Command line option to specify output file
#on linking
ROPILINK = -ropi #Link image as Read-Only Position Independent
LINK_ORDER = -first AEEMod_Load
#-------------------------------------------------------------------------------
# HEXTOOL options
#-------------------------------------------------------------------------------
BINFORMAT = -bin
#-------------------------------------------------------------------------------
# Compiler flag definitions
#-------------------------------------------------------------------------------
CFLAGS0 = $(OUT) $(DYNAPP) $(CPU) $(APCS) $(CODE) $(CHK) $(DBG)
CFLAGS = $(CFLAGS0) $(OPT)
#-------------------------------------------------------------------------------
# Linker flag definitions
#-------------------------------------------------------------------------------
# the -entry flag is not really needed, but it keeps the linker from reporting
# warning L6305W (no entry point). The address
LFLAGS = $(ROPILINK) -rwpi -entry 0x8000#
#----------------------------------------------------------------------------
# Default target
#----------------------------------------------------------------------------
all : $(TARGET).$(MODULE)
#----------------------------------------------------------------------------
# Clean target
#----------------------------------------------------------------------------
# The object subdirectory, target image file, and target hex file are deleted.
clean :
@echo ---------------------------------------------------------------
@echo CLEAN
-del /f $(OBJS)
-del /f $(TARGET).$(EXETYPE)
-del /f $(TARGET).$(MODULE)
@echo ---------------------------------------------------------------
#============================================================================
# DEFAULT SUFFIX RULES
#============================================================================
# The following are the default suffix rules used to compile all objects that
# are not specifically included in one of the module specific rules defined
# in the next section.
# The following macros are used to specify the output object file, MSG_FILE
# symbol definition and input source file on the compile line in the rules
# defined below.
SRC_FILE = $(@F:.o=.c) # Input source file specification
OBJ_FILE = $(OBJ_CMD) $(@F) # Output object file specification
.SUFFIXES :
.SUFFIXES : .o .dep .c
#--------------------------------------------------------------------------
# C code inference rules
#----------------------------------------------------------------------------
.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(SRC_FILE)
@echo ---------------------------------------------------------------
.c.mix:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) -S -fs $(CFLAGS) $(INC) $(OBJ_FILE) $<
@echo ---------------------------------------------------------------
{$(AEESRCPATH)}.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(AEESRCPATH)\$(SRC_FILE)
@echo ---------------------------------------------------------------
#===============================================================================
# MODULE SPECIFIC RULES
#===============================================================================
APP_OBJS = $(OBJS) tigo.o
#----------------------------------------------------------------------------
# Lib file targets
#----------------------------------------------------------------------------
$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE)
@echo ---------------------------------------------------------------
@echo TARGET $@
$(HEXTOOL) $(TARGET).$(EXETYPE) $(BINFORMAT) $(TARGET).$(MODULE)
$(TARGET).$(EXETYPE) : $(APP_OBJS)
@echo ---------------------------------------------------------------
@echo TARGET $@
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LFLAGS) $(APP_OBJS) $(LINK_ORDER)

hai Atul,
Below is my .mak file.What changes are required?
BREW_HOME =$(BREWDIR315)
ARM_HOME =$(ARM_HOME)
TARGET =invinf
OBJS = AEEAPP~1.o AEEMOD~1.o ALLOCA~1.o CLASSI~1.o ENEMYS~2.o ENEMYS~1.o FILEIS~1.o GRAPHI~1.o Jiki.o JikiShot.o ANALYZ~1.o btext.o chain.o device.o DISCHA~1.o DRAWEN~2.o DRAWEN~1.o expEnemy.o heap.o hit.o HITEFF~1.o hitEnemy.o HITENE~2.o HITENE~3.o HITENE~4.o HITENE~1.o HICAB5~1.o HIEF7F~1.o HI64DB~1.o invinf.o INVINF~1.o INVINF~2.o libsound.o MOVEEN~1.o score.o
APP_INCLUDES =-I $(BREWDIR315)\inc -I $(BREWDIR315)\inc\v3
#-------------------------------------------------------------------------------
# Target file name and type definitions
#-------------------------------------------------------------------------------
EXETYPE = elf # Target image file format
MODULE = mod # Downloadable module extension
#-------------------------------------------------------------------------------
# Target compile time symbol definitions
#
# Tells the SDK source stuffs that we're building a dynamic app.
#-------------------------------------------------------------------------------
DYNAPP = -DDYNAMIC_APP
#-------------------------------------------------------------------------------
# Software tool and environment definitions
#-------------------------------------------------------------------------------
AEESRCPATH = $(BREW_HOME)\src
AEEINCPATH = $(BREW_HOME)\inc
ARMBIN = E:\ELF2MOD\bin # ARM ADS application directory
ARMINC = $(ARM_HOME)\include # ARM ADS include file directory
ARMLIB = $(ARM_HOME)\lib # ARM ADS library directory
ARMCC = $(ARM_HOME)\armcc # ARM ADS ARM 32-bit inst. set ANSI C compiler
LD = $(ARM_HOME)\armlink # ARM ADS linker
HEXTOOL = E:\ELF2MOD\bin\elf2mod.exe # ARM ADS utility to create hex file from image
OBJ_CMD = -o # Command line option to specify output filename
#-------------------------------------------------------------------------------
# Processor architecture options
#-------------------------------------------------------------------------------
CPU = -cpu ARM7TDMI # ARM7TDMI target processor
#-------------------------------------------------------------------------------
# ARM Procedure Call Standard (APCS) options
#-------------------------------------------------------------------------------
ROPI = ropi # Read-Only(code) Position independence
INTERWRK = interwork # Allow ARM-Thumb interworking
APCS = -apcs /$(ROPI)/$(INTERWRK)/norwpi
#-------------------------------------------------------------------------------
# Additional compile time error checking options
#-------------------------------------------------------------------------------
#CHK = -fa # Check for data flow anomolies
#-------------------------------------------------------------------------------
# Compiler output options
#-------------------------------------------------------------------------------
OUT = -c # Object file output only
#-------------------------------------------------------------------------------
# Compiler/assembler debug options
#-------------------------------------------------------------------------------
DBG = -g # Enable debug
#-------------------------------------------------------------------------------
# Compiler optimization options
#-------------------------------------------------------------------------------
OPT = -Ospace -O2 # Full compiler optimization for space
#-------------------------------------------------------------------------------
# Compiler code generation options
#-------------------------------------------------------------------------------
END = -littleend # Compile for little endian memory architecture
ZA = -zo # LDR may only access 32-bit aligned addresses
CODE = $(END) $(ZA)
#-------------------------------------------------------------------------------
# Include file search path options
#-------------------------------------------------------------------------------
INC = -I. -I$(AEEINCPATH) $(APP_INCLUDES)
#-------------------------------------------------------------------------------
# Compiler pragma emulation options
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Linker options
#-------------------------------------------------------------------------------
LINK_CMD = -o #Command line option to specify output file
#on linking
ROPILINK = -ropi #Link image as Read-Only Position Independent
LINK_ORDER = -first AEEMod_Load
#-------------------------------------------------------------------------------
# HEXTOOL options
#-------------------------------------------------------------------------------
BINFORMAT = -bin
#-------------------------------------------------------------------------------
# Compiler flag definitions
#-------------------------------------------------------------------------------
CFLAGS0 = $(OUT) $(DYNAPP) $(CPU) $(APCS) $(CODE) $(CHK) $(DBG)
CFLAGS = $(CFLAGS0) $(OPT)
#-------------------------------------------------------------------------------
# Linker flag definitions
#-------------------------------------------------------------------------------
# the -entry flag is not really needed, but it keeps the linker from reporting
# warning L6305W (no entry point). The address
LFLAGS = $(ROPILINK) -rwpi -entry 0x8000#
#----------------------------------------------------------------------------
# Default target
#----------------------------------------------------------------------------
all : $(TARGET).$(MODULE)
#----------------------------------------------------------------------------
# Clean target
#----------------------------------------------------------------------------
# The object subdirectory, target image file, and target hex file are deleted.
clean :
@echo ---------------------------------------------------------------
@echo CLEAN
-del /f $(OBJS)
-del /f $(TARGET).$(EXETYPE)
-del /f $(TARGET).$(MODULE)
@echo ---------------------------------------------------------------
#============================================================================
# DEFAULT SUFFIX RULES
#============================================================================
# The following are the default suffix rules used to compile all objects that
# are not specifically included in one of the module specific rules defined
# in the next section.
# The following macros are used to specify the output object file, MSG_FILE
# symbol definition and input source file on the compile line in the rules
# defined below.
SRC_FILE = $(@F:.o=.c) # Input source file specification
OBJ_FILE = $(OBJ_CMD) $(@F) # Output object file specification
.SUFFIXES :
.SUFFIXES : .o .dep .c
#--------------------------------------------------------------------------
# C code inference rules
#----------------------------------------------------------------------------
.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(SRC_FILE)
@echo ---------------------------------------------------------------
.c.mix:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) -S -fs $(CFLAGS) $(INC) $(OBJ_FILE) $<
@echo ---------------------------------------------------------------
{$(AEESRCPATH)}.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(AEESRCPATH)\$(SRC_FILE)
@echo ---------------------------------------------------------------
#===============================================================================
# MODULE SPECIFIC RULES
#===============================================================================
APP_OBJS = $(OBJS) tigo.o
#----------------------------------------------------------------------------
# Lib file targets
#----------------------------------------------------------------------------
$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE)
@echo ---------------------------------------------------------------
@echo TARGET $@
$(HEXTOOL) $(TARGET).$(EXETYPE) $(BINFORMAT) $(TARGET).$(MODULE)
$(TARGET).$(EXETYPE) : $(APP_OBJS)
@echo ---------------------------------------------------------------
@echo TARGET $@
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LFLAGS) $(APP_OBJS) $(LINK_ORDER)