Missing ldflags.mak

Topics for the Eclipse Environment
Post Reply
tgldt
Posts: 3
Joined: Wed Jan 02, 2013 9:21 am

Missing ldflags.mak

Post by tgldt »

I recently inherited a NetBurner project and I am currently having issues compiling the code. The NBEclipse IDE is giving me an error that I am missing the ldflags.mak file. I have tried to "Rebuild All System Files", but haven't had any luck with this yet. Has anyone else seen this issue or know anything about how to solve it?
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Missing ldflags.mak

Post by rnixon »

Sounds like files may have been copied. That file should always be there on a good install. Did you install the tools yourself on the machine, or did you copy things over? A good test is to do a clean install, then use the app wizard to create a simple app, and see if it builds. That would verify the file exists.
tgldt
Posts: 3
Joined: Wed Jan 02, 2013 9:21 am

Re: Missing ldflags.mak

Post by tgldt »

I installed the tools fresh, but I copied the project from our source code repository into the workspace folder. I tried to create an example project from the TcpClientSimple, but I still received an error stating "No rule to make target C:\nburn//make/ldflags.mak".
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Missing ldflags.mak

Post by pbreed »

I do all my work from the command line, not eclipse, so I can't help you with eclipse details...
The error your getting proably says the platform variable is not set up.

The command line tools use DEFPLATFORM and PLATFORM, if you have a custom makefile its also possible that it has a PLATFORM= in it as well.

So if your project is setup for a platform you don't have installed you will likely get this error....
tgldt
Posts: 3
Joined: Wed Jan 02, 2013 9:21 am

Re: Missing ldflags.mak

Post by tgldt »

The platform is set up for the model number I'm using (MOD5282). I made sure to enter the serial number when I installed NetBurner. I tried the "make" command through the command prompt, but it gave me the same error. It looks like the "ldflags.mak" file is never found in the c:\nburn\make directory. After doing a clean install, all I see are:
last.mak
libmain.mak
libroot.mak
librules.mak
main.mak
root.mak

Does anyone know if this ldflags.mak file is generated at any point in the compilation?
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: Missing ldflags.mak

Post by Chris Ruff »

this is the contents of my ldflags.mak in my
\nburn26\mod5282\make directory
copy the below text int a file located there and named that.
good luck
Chris
p.s I have many versions of the library. 26 is recent


NBINCLUDE="$(NBROOTMINGW)/include" -I"$(NBROOTMINGW)/MOD5282/include"
LDFLAGS = -mcpu=5206e -Wl -Wl,-n -T$(PLATFORMROOT)/lib/MOD5282.ld -Wl,-R$(NBROOTMINGW)/MOD5282/lib/sys.ld
NBLIBS = $(NBROOTMINGW)/lib/MOD5282.a $(NBROOTMINGW)/lib/NetBurner.a $(NBROOTMINGW)/lib/FatFile.a $(LDEXTRA)
DBNBLIBS = $(NBROOTMINGW)/lib/DBMOD5282.a $(NBROOTMINGW)/lib/DBNetBurner.a $(NBROOTMINGW)/lib/FatFile.a $(LDEXTRA)
PLATFORMDEF=MOD5282
CPU_TYPE=MCF5282
ifndef COMPCODEFLAGS
COMPCODEFLAGS = 0xffc08000 0xFFC80000
endif
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Missing ldflags.mak

Post by pbreed »

You seem to be missing the whole MOD5282 directory....

if you are using the MOD5282 is ldflags.mak in

nburn\mod5282\make\


If you are going from the command line...

before running make try

set PLATFORM=MOD5282

You can also put that

PLATFORM=MOD5282 as the first line in your make file....


If you have inherited this project from someone then it is not totally unheard of for people to create their own platforms
so they know what devices are theirs... is there a PLATFORM= command in the project makefile, if so what is it?
Post Reply