Page 1 of 4
Debug Build failure
Posted: Wed Oct 08, 2014 2:53 pm
by SeeCwriter
I have a NANO dev kit. I'm able to compile and run a release build of the SPI Example program. But I get a linker error when building a debug version about file DBNetBurner.a missing. According to the Getting Started Guide I'm supposed to just click on the green bug and a debug version is built. Is there a missing step?
Steve
Re: Debug Build failure
Posted: Wed Oct 08, 2014 3:38 pm
by tod
I don't have a NANO setup to give you a specific answer but in general:
1. Is DBNetburner.a in your nburn\lib folder?
2. If the Release build is working and debug build is not it's usually just a settings issue. You can go to the project properties Then use C/C++Build->Settings on the left and Then on the Tool Settings tab look under the GNU C/C++ Linker and click on the Libraries option. At the top of the window is a selector for Debug/Release/All. Just toggle between Debug and Release and see what is different. One obvious difference will be Release will want NetBurner.a and debug will have the DB prefix. But I know some modules use an _sc version of the libraries. If the release uses a different version then so should the debug (with the DB prefix).
- Libraries.png (93.87 KiB) Viewed 9943 times
Re: Debug Build failure
Posted: Wed Oct 08, 2014 3:54 pm
by SeeCwriter
There is no file DBNetBurner.a in directory nburn/lib. The files in the linker settings are the same name between Release and Debug with the Debug files being prefixed "DB". Otherwise, same number and same base name.
I should have said that I'm using v2.6.8. That may or may make a difference.
Steve
Re: Debug Build failure
Posted: Wed Oct 08, 2014 4:41 pm
by rnixon
From the menu toolbar: NBEclipse -> Rebuild all system files
Re: Debug Build failure
Posted: Thu Oct 09, 2014 7:45 am
by SeeCwriter
Ok, I did the Rebuild All System Files. First sign that this wouldn't work is that it only built the system files for the MOD5234. And sure enough, even though I now have a DBNetBurner.a file, the linker now fails because there is no DBNANO54415.a file.
I have 3-modules installed, MOD5234, MOD5441X, NANO54415, plus SNMP. The only module file in nburn/lib with a "DB" prefix is DBMOD5234.a.
Steve
Re: Debug Build failure
Posted: Thu Oct 09, 2014 7:57 am
by SeeCwriter
In addition to my previous post, when I compiled a different project for the NANO I get large number of errors regarding file httpinternal.cpp: undefined reference to 'default_page'. To my knowledge I don't use that file. And this project compiles without errors in v2.6.7.
Steve
Re: Debug Build failure
Posted: Thu Oct 09, 2014 9:22 am
by rnixon
This means you are calling StartHttp(), but do not have an html directory in your project. The system is trying to process your html code but you have none.
Re: Debug Build failure
Posted: Thu Oct 09, 2014 9:24 am
by rnixon
Try selecting a nano project in the project explorer window (by left clicking), then rebuild the system files. It might just be defaulting to the first platform because you don't have any selected.
SeeCwriter wrote:Ok, I did the Rebuild All System Files. First sign that this wouldn't work is that it only built the system files for the MOD5234. And sure enough, even though I now have a DBNetBurner.a file, the linker now fails because there is no DBNANO54415.a file.
I have 3-modules installed, MOD5234, MOD5441X, NANO54415, plus SNMP. The only module file in nburn/lib with a "DB" prefix is DBMOD5234.a.
Steve
Re: Debug Build failure
Posted: Thu Oct 09, 2014 1:36 pm
by SeeCwriter
I'm not seeing my response post, so I'll try again. Hopefully this is not a repeat.
I was missing the HTML sub-directory. I forgot to import it. That now works.
After doing a Rebuild All System Files after selected an NANO project I can now build a debug version of the example program. What I don't understand is why the system files didn't get rebuilt in the first place. After I installed the new IDE, I opened a command prompt and went through each platform installed and set %PLATFORM% to each module, did a "make clean" on the module system directory and the nburn/system directory, and then "make" on all system directories.
Now that I can build a debug configuration, I tried to download it to the module but got error: "Target selection failed. No connection could be made because the target machine actively refused it." I can download a release build just fine.
Steve
Re: Debug Build failure
Posted: Fri Oct 10, 2014 12:08 pm
by rnixon
Could be a few different things. I would go through the debug tutorial in the nbeclipse guide to see whats different. That was the fastest way for me.