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

Developer

Forums

Forums:

Hi

I hit this tool issue in VS .NET with BREW (v2.0) addins - toolbar icon to generate ARM compiler make file. It generated a makefile which didn't work "out-of-box", because of "Applet Specific Rules"

#----------------------------------------------------------------------------
# Applet Specific Rules
#----------------------------------------------------------------------------

RULE1 = c:\PROGRA~1\BREWSD~1.1\src
{$(RULE1)}.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE1)\$(SRC_FILE)
@echo ---------------------------------------------------------------

RULE2 = c:\DOCUME~1\ROB~1\DOC~1\VISUAL~1\BrewApps\STICC~1
{$(RULE2)}.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE2)\$(SRC_FILE)
@echo ---------------------------------------------------------------
#
If you look inside SDK\Examples for pre-generated makefiles, you'll see that, for example, NetDiagnostics.mak has that section empty. Problem here was that nmake processed this section first (instead of "C code inference rules") but "SRC_FILE" was nowhere defined (SRC_C_FILE and SRC_CPP_FILE were defined in the makefile), and so armcc failed to compile AEEAppGen.o (couldn't find .c file).

Maybe a bug in the tool, or I did something wrong? Anyway, after having that section commented out, mod file got created just fine.

I had a simliar problem. The way the file comes out of the Addin, I get this error message:
Serious error: C3052E: couldn't read file 'c:\BREWv11\src\.c'
Commenting the block didn't work for me - the command line says it can't find DATAIN~1.o, where DATAIN~1.cpp is one of my class definition files.
So instead of commenting the block, I changed it to
#----------------------------------------------------------------------------
# Applet Specific Rules
#----------------------------------------------------------------------------
RULE1 = c:\PROGRA~1\BREWSD~1.1\src
{$(RULE1)}.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE1)\$(SRC_C_FILE)
@echo ---------------------------------------------------------------
RULE2 = c:\DOCUME~1\ROB~1\DOC~1\VISUAL~1\BrewApps\STICC~1
{$(RULE2)}.cpp.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE2)\$(SRC_CPP_FILE)
@echo ---------------------------------------------------------------
#
If I only change the SRC_C_FILE part, the "Serious error" mentioned above goes out, and I get Could not open DATAIN~1.o, same as ehwn I comment the block.
Anyway, changing both SRC_C_FILE and SRC_CPP_FILE it doesn't complain about not finding the .o file, but it returns a bunch of error messages while reading the cpp source. Stuff like ilegal type for operand ->, or misplaced { at top level...
I'm guessing my change to the make file wasn't exactly the right thing to do, cause my source code is definetely ok, it compiles on VC++ and runs on the emulator perfectly.
If anyone have any suggestions, please!
Cheers!
Markus

I had a simliar problem. The way the file comes out of the Addin, I get this error message:
Serious error: C3052E: couldn't read file 'c:\BREWv11\src\.c'
Commenting the block didn't work for me - the command line says it can't find DATAIN~1.o, where DATAIN~1.cpp is one of my class definition files.
So instead of commenting the block, I changed it to
#----------------------------------------------------------------------------
# Applet Specific Rules
#----------------------------------------------------------------------------
RULE1 = c:\PROGRA~1\BREWSD~1.1\src
{$(RULE1)}.c.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE1)\$(SRC_C_FILE)
@echo ---------------------------------------------------------------
RULE2 = c:\DOCUME~1\ROB~1\DOC~1\VISUAL~1\BrewApps\STICC~1
{$(RULE2)}.cpp.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE2)\$(SRC_CPP_FILE)
@echo ---------------------------------------------------------------
#
If I only change the SRC_C_FILE part, the "Serious error" mentioned above goes out, and I get Could not open DATAIN~1.o, same as ehwn I comment the block.
Anyway, changing both SRC_C_FILE and SRC_CPP_FILE it doesn't complain about not finding the .o file, but it returns a bunch of error messages while reading the cpp source. Stuff like ilegal type for operand ->, or misplaced { at top level...
I'm guessing my change to the make file wasn't exactly the right thing to do, cause my source code is definetely ok, it compiles on VC++ and runs on the emulator perfectly.
If anyone have any suggestions, please!
Cheers!
Markus

Well, personnaly i dont use the arm makefile generator, but rather write everything by myself: the generator sounds to use 8.3 filenames (doh!)...
Moreover, why using armcc for cpp files, i prefer using armcpp..
And you should be aware that visual studio < .net 2003 have alot of incompatibilities with the iso c++, so you make obviously get some errors..
/kUfa

Well, personnaly i dont use the arm makefile generator, but rather write everything by myself: the generator sounds to use 8.3 filenames (doh!)...
Moreover, why using armcc for cpp files, i prefer using armcpp..
And you should be aware that visual studio < .net 2003 have alot of incompatibilities with the iso c++, so you make obviously get some errors..
/kUfa

kUfa wrote:Moreover, why using armcc for cpp files, i prefer using armcpp..
Thanks, I had completely overlooked that...
RULE2 = c:\DOCUME~1\ROB~1\DOC~1\VISUAL~1\BrewApps\STICC~1
{$(RULE2)}.cpp.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCPP) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE2)\$(SRC_CPP_FILE)
@echo ---------------------------------------------------------------
Off to the Apploader! :)

kUfa wrote:Moreover, why using armcc for cpp files, i prefer using armcpp..
Thanks, I had completely overlooked that...
RULE2 = c:\DOCUME~1\ROB~1\DOC~1\VISUAL~1\BrewApps\STICC~1
{$(RULE2)}.cpp.o:
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
$(ARMCPP) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE2)\$(SRC_CPP_FILE)
@echo ---------------------------------------------------------------
Off to the Apploader! :)

unless your code is in a different dir to the makefile then

.c.o:        $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(SRC_FILE)

should work fine. (instead of the RULE2)

unless your code is in a different dir to the makefile then

.c.o:        $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(SRC_FILE)

should work fine. (instead of the RULE2)