Page 1 of 1
How to create a makefile
Posted: Fri Jun 13, 2014 10:01 am
by SeeCwriter
Some posts I've seen infer that project makefiles can be automatically created by the NNDK. If true, I have yet to locate that feature. Does it exist, or do I need to hand craft a makefile for my project?
Steve
Re: How to create a makefile
Posted: Fri Jun 13, 2014 11:31 am
by dciliske
Uh... I'm not sure if you can create one after the fact automagically. If you want to make one from the get go, there's an option to create a "makefile project". Also, if you want to not use Eclipse at all (if that's the route you're trying to take), there's a utility called NBAppwizard that will setup the basic application and makefile in a directory.
If you have any other questions, feel free to ask, and I'll try to answer. If you haven't noticed, I really like our make system as it means I get to use my nice friendly editor Vim
-Dan
Re: How to create a makefile
Posted: Fri Jun 13, 2014 1:22 pm
by SeeCwriter
I want to use SlickEdit instead of Eclipse to write my programs, and I know SlickEdit can run make on projects. Otherwise I have to open Elclipse every time I want to compile.
Steve
Re: How to create a makefile
Posted: Fri Jun 13, 2014 2:18 pm
by dciliske
Ahh... You and Paul can have fun (That's Paul's editor as well). I'd say start with the NBAppWizard to create the template makefile (or just copy one from an example you started with) into a new directory and populate the file from there. If you have any questions about what certain parts of it do, or how to get something to work that is not clear, go ahead and post them.
Also, to build/run the project from the command line you'll want to use the following commands:
make - builds the project
make load - builds the project and loads it onto the module using Autoupdate
make debug - builds the debug version of the project
make loaddebug - builds the debug version and loads it onto the module
-Dan
Re: How to create a makefile
Posted: Fri Jun 13, 2014 5:06 pm
by tod
I don't know much about SlickEdit but I do know they have an Eclipse plug-in. Might get you the automated build system and your editor of choice.
Re: How to create a makefile
Posted: Sun Jun 15, 2014 9:40 am
by rnixon
There is a section in the programmers guide:
21 Command Line Mode
You have two options for code development using the NetBurner Tools. The first is the IDE discussed earlier. The second is using the make utility from a command prompt. Typical reasons for choosing the command prompt mode are that some developers simple prefer this method, or you may have a favorite editor/IDE that you prefer over the NetBurner IDE. Most editors can invoke an external compiler to build the project.
This section will detail how to write, compile, and download a program using the command line tools. The details of the make utility “makefile” will also be covered. Traditionally called the “Hello World” program, our “Template Program” will specify a minimal code base from which you can write your future applications. The objective of this template program is to print the characters “Hello World” out the debug port of your NetBurner device. In addition, this template program will enable network services so that it can be downloaded over a network connection instead of through a serial port or a BDM (Background Debug Mode) port.
"make" builds the app
"make load" builds the app and downloads all in one step
Re: How to create a makefile
Posted: Mon Jun 16, 2014 8:16 pm
by pbreed
Most of the examples have a working makefile....
Pretty simple...
If you want to make it work with one specific platform
add
PLATFORM=PK70
or whatever.. instead of PK70 as the first line in the makefile...
Paul