When I compile my projects from the command line, all the .s19 files end up in c:\nburn\bin. Which was fine. I would just copy them out of that folder and place in another folder. But now we want them placed in a custom place that is relative to the source code. Obviously, I could just copy them from the c:\nburn\bin location, but not everyone was installing Netburner in the same places so the scripts failed.
In the main.mak file, I see:
TARGET =$(NBROOT)/bin/$(NAME).s19
TARGETAP =$(NBROOT)/bin/$(NAME)_APP.s19
So do I just change NBROOT, but I imagine that would affect many other things I do not want to change.
I want to have the s19 output file in a custom place.
Re: I want to have the s19 output file in a custom place.
NBROOT is the root dir of the entire source tree used to build everything. For example, when I'm juggling different builds in development, I have multiple installs in different directories (creatively named '~/nndk', '~/nndk2', and '~/nndk3'). Then depending on which one I want to be building with, I change NBROOT to point to the appropriate install.
For what you want to do, you do really want to modify 'main.mak' itself to change where TARGET points or to add a line in 'last.mak' so that it will perform your copy from that step.
-Dan
For what you want to do, you do really want to modify 'main.mak' itself to change where TARGET points or to add a line in 'last.mak' so that it will perform your copy from that step.
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: I want to have the s19 output file in a custom place.
I was hoping not to change any file in the nburn folder. We like to have minimal 'oh yeah you have to change that file, I forgot' type of files in the system. So probably just copying out of the nburn/bin folder will be our best choice.
Thanks for the answer.
Thanks for the answer.
Re: I want to have the s19 output file in a custom place.
I don't know much about such features, but maybe you could write a simple copying DOS batch file and have Eclipse execute it post-build for you automatically? Try playing with:
Project menu/Properties/C Build/Settings/Build Steps tab
Project menu/Properties/C Build/Settings/Build Steps tab
Re: I want to have the s19 output file in a custom place.
I am building from the command line, not the the UI. We have 7 different "configurations" of the basically the same code. We have run out Flash program space to have all configuration in the same image file; by using #ifdefs we compile only what it is needed for a configuration. We are at about 95% flash space now. so we have a DOS batch file that changes the appropriate #define (-D MODEL_X) and recompile the files. The name is set to MODEL_X as well, so the _APP.s19's are created uniquely as well. The Batch file then copies the files from c:\nburn\bin to where we want them to go. It appears this approach is the least invasive to the NetBurner environment. We are working towards a "hands off" build environment, where the system detects source code changes and then it rebuilds the projects without any human intervention.
Re: I want to have the s19 output file in a custom place.
I don't know about automatic building, but here's how we manage specific configurations for each of our customers:
We use a Git repository to manage a set of 'core' code and then we make it a Git submodule for the customer specific repository. We customized the makefiles and store them with the repositories so no one has to remember to change anything, they just pull the code and run the makefile.
Are you trying to rebuild all of your configurations each time a file is changed?
We use a Git repository to manage a set of 'core' code and then we make it a Git submodule for the customer specific repository. We customized the makefiles and store them with the repositories so no one has to remember to change anything, they just pull the code and run the makefile.
Are you trying to rebuild all of your configurations each time a file is changed?
Re: I want to have the s19 output file in a custom place.
maxpower wrote:I am building from the command line, not the the UI. We have 7 different "configurations" of the basically the same code. We have run out Flash program space to have all configuration in the same image file; by using #ifdefs we compile only what it is needed for a configuration. We are at about 95% flash space now. so we have a DOS batch file that changes the appropriate #define (-D MODEL_X) and recompile the files. The name is set to MODEL_X as well, so the _APP.s19's are created uniquely as well. The Batch file then copies the files from c:\nburn\bin to where we want them to go. It appears this approach is the least invasive to the NetBurner environment. We are working towards a "hands off" build environment, where the system detects source code changes and then it rebuilds the projects without any human intervention.
Hello,
modify your makefile and add
TARGET := <anydirectory>/<anyname>_app.s19
and place it directly below the include $(NBROOT)/make/main.mak
For example, if you want to output to c:\temp\, you would have
TARGET := C:/temp/foo_APP.s19
BONUS:
If you are running out of stack space, try release 2.8.0 and create a ticket on support asking how to dead strip the functions. I will give you all the details. We have found that it can decrease release sizes by 20%. We anticipate this feature will be in 2.8.1 after further testing, but you can use it in 2.8.0 with guidance.
Forrest Stanley
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn