I have a strange problem right now.
When compiling an application (in $DEVDIR/my_apps/MyAPP) I used to simply run make.
Looking at the Makefile, there is an install instruction which should cause my application to be copied
I have tried to find where FSROOT is defined and found out that it is in bsp/Make.defs. Make.defs is included by
bsp/Mach/Make.conf, and this latter is included by the Makefile itself. So $(FSROOT) should be known.
Beside this, I verified that the install instruction works (I removed my application from fs/fs/examples and
ran the install instruction inside of $DEVDIR/my_apps/MyApp . MyApp appears in $DEVDIR/fs/fs/examples.
But when I run make from $DEVDIR/my_apps/MyApp, it does not install the application.
Does anyone know what may have happened? It used to work, and I didn't modify the Makefile.
I assume your Makefile looks like this:
.PHONY: build chkconfig preconfig buildfs install clean
$(error ====== DEVDIR variable is empty, invoke this Makefile from the BSP root, or provide the path to it =====)
BIN = hello
SRCS = $(BIN).c
OBJS = $(SRCS:.c=.o)
CFLAGS += $(EXTRA_CFLAGS)
$(V)$(CC) -c $(CFLAGS) $(SRCS) -o $(OBJS) $(QOUT)
$(V)$(CC) $(LDFLAGS) -o $(BIN) $(OBJS) $(QOUT)
$(V)install -D -m 755 $(BIN) $(FSROOT)/examples/$(BIN) $(QOUT)
$(V)rm -f $(BIN) *.debug *.o core *~ $(QOUT)
If so, you can add a target like this:
all: build install
Pablo BarrantesEmbedded Software EngineerRidgeRun
Did you try
Thanks for your reply.
The problem is that the line beginning by all: already includes install.
The line is like this:
all: clean build install
clean, build and install tags do exist.
Yes, I have tried make install:
1. I have verified that my application exec code is not in fs/fs/examples (so that install has to do something)
2. I have run make install, and it replies "nothing to be done for install".
If I take the install line and run it from the terminal:
install -D -m 755 myapp $DEVDIR/fs/fs/examples/myapp
then it installs fine.
That's why I was suspecting an environment variable missing, But FSROOT is defined in
Make.defs which is included by Make.conf which is included at the beginning of the Makefile.
So the line $(V)install -D -m 755 $(BIN) $(FSROOT)/examples/$(BIN) $(QOUT)
should just work fine, but it does not.
Any hint is welcome.
I have created one .cpp application and my Makefile looks like:
#CFLAGS= -g -Wall -DVP_LINUX -fno-stack-protector
OBJECTS= ComPortIO.o NMEAParser.o GPSInfo.o RFInfo.o
# --- targets
com:ComPortIO.h ComPortIO.cpp main.cpp $(OBJECTS)
$(CXX) $(CFLAGS) -o com $(OBJECTS) main.cpp
ComPortIO.o: ComPortIO.cpp ComPortIO.h
$(CXX) $(CFLAGS) -c ComPortIO.cpp
NMEAParser.o: NMEAParser.cpp NMEAParser.h
$(CXX) $(CFLAGS) -c NMEAParser.cpp
GPSInfo.o: GPSInfo.cpp GPSInfo.h
$(CXX) $(CFLAGS) -c GPSInfo.cpp
RFInfo.o: RFInfo.cpp RFInfo.h
$(CXX) $(CFLAGS) -c RFInfo.cpp
install -D -m 755 $(BIN) $(DEVDIR)/fs/fs/examples/$(BIN)
# --- remove binary and executable files
rm -f com
rm -f ComPortIO.o
rm -f NMEAParser.o
I can build this application alone,but when I m trying to make it from DEVDIR build error is comming nd showing messge tht 'com' file is not generated. means problem in building my application.
pls help me out
The SDK build system uses the target 'build', try
all build: com