Page 1 of 1

Rebuilding system files

Posted: Tue Sep 17, 2013 7:28 am
by sulliwk06
I've been trying to rebuild my netburner system files so I can use multihome addressing. I tried rebuilding them through nbeclipse but had problems with java null pointer exceptions in windows 7 and a library build error when i tried in windows xp. I made sure that my platform was set in the project properties. I tried following the command line example of rebuilding system files. I work with the 5213, 5234, and 5282 and the one I'm trying to use multihome on is the 5282. So I tried make clean and make on the nburn/system folder and got an error because it was looking for includes.h in /include_nn and /MOD5213/includes. I changed DEFPLATFORM to MOD5282 and got the make clean, make, and make debug to work. then I moved to the 5282 folder and did the same thing. So I thought I was done. Went back to my project, and it appears nothing has changed. I'm using an #ifdef to see if MULTIHOME is defined now and it isn't, even though in predef.h I have uncommented the #define MULTIHOME line.

So can anybody tell me why it didn't work?

Re: Rebuilding system files

Posted: Tue Sep 17, 2013 7:53 am
by Chris Ruff
The thing about rebuilding system files is the library result files.

Take a look at your 5282 makefile and where it is pulling system libraries from, possibly

..\MOD5282\lib
and
nburn\lib


If the lib file(s) is(are) not new in the proper lib directory , then the target of your system build was not ending up in the same lib dir that your 5282 build is using

The makefiles are abstruce- to put it lightly.

keep an eye on what is new and what stays old in the source and lib directories as you fight with building system, module libfiles

Chris

Re: Rebuilding system files

Posted: Tue Sep 17, 2013 8:22 am
by sulliwk06
I checked my project properties and the linker looks for nburn/lib/mod5282.a. I went to that directory and the file was indeed updated when I ran make in the MOD5282/system folder. So is there some other predef.h file hidden somwhere that it could be using? Which library is it that contains the predef header file. Would it be the netburner.a file generated from the nburn/system make? I checked and that file was updated as well and my linker looks at that one too. From what i can see it looks like everything should be working perfectly.

Re: Rebuilding system files

Posted: Tue Sep 17, 2013 8:50 am
by sulliwk06
ok, so through some experimenting, the problem isn't with the system files not be correct, the problem is that my nbeclipse isn't correctly identifying that MULTIHOME is defined. The code runs, but nbeclipse shows it grayed out as though it is using the old files. Is there some kind of tag file that needs to be updated when you rebuild system files. I tried cleaning and rebuilding the project and that had no effect.

Re: Rebuilding system files

Posted: Wed Sep 25, 2013 10:17 am
by Lachlanp
I am looking to rebuild some system files - specifically the FAT system files to enable interrupt driven QSPI mode. Where is it described how I would rebuild the system files.

Thanks
Lachlan

Re: Rebuilding system files

Posted: Wed Sep 25, 2013 1:31 pm
by rnixon
Eclipse is just the edit environment, it may not be reading all the ifdef's correctly. When you build your code, can you look at any values to see if multihome is enabled (regardless of gray area's in eclipse)?

Re: Rebuilding system files

Posted: Thu Sep 26, 2013 5:20 am
by sulliwk06
rnixon wrote:Eclipse is just the edit environment, it may not be reading all the ifdef's correctly. When you build your code, can you look at any values to see if multihome is enabled (regardless of gray area's in eclipse)?
Yeah I got multihome enabled and the code compiles properly, now I'm just trying to get eclipse to recognize that it is defined.

Lachlanp wrote:I am looking to rebuild some system files - specifically the FAT system files to enable interrupt driven QSPI mode. Where is it described how I would rebuild the system files.
In NBEclipse at the top under the NBEcipse menu there should be options for "Rebuild All System Files" and "Rebuild Modified System Files". If that doesn't work you can build them through the command line with "make clean", "make", and "make debug" in the nburn/system folder and the folder for your mod. There were several posts I found on that method.

Re: Rebuilding system files

Posted: Thu Sep 26, 2013 2:51 pm
by tod
The pre-processor doesn't know anything about library files. Do you have an #include predef.h in YOUR code somewhere? That is not just using libraries that had it set when you compiled the libraries.

Also if you want feedback from the preprocessor directly (instead of relying on the editor to properly grey out #ifdef'd code ) you can add lines like this to any appropriate source file

Code: Select all

#ifndef MULTIHOME
#warning "MULTIHOME is not defined."
#endif
If the warning shows up in your console, then it's not defined. You can also use #error instead of #warning if you want.