NNDK Release 2.8.0 (April 2016)

Discussion to talk about software related topics only.
User avatar
Forrest
Posts: 288
Joined: Wed Apr 23, 2008 10:05 am

NNDK Release 2.8.0 (April 2016)

Post by Forrest »

NNDK 2.8.0 beta release is now out and available for download on the NetBurner tools download page. Please report any issues in this thread or directly to support by submitting a new ticket at http://support.netburner.com.

Release 2.8.0 is a major update and includes a dual IPv4/IPv6 TCP/IP stack and an updated GCC compiler.

Information

IPv4/IPv6
In order to implement the dual stack and provide the best compatibility with previous releases, IP addresses are now C++ objects. This will require minor code modifications in applications that stored IP addresses as unsigned long integers. See new dual stack help documentation located in /nburn/docs/IPv6/IPv6DualStackMode.pdf for further help in updating source code.

GCC5.2
GCC5.2 includes new optimizations which will help increase code speed and decrease size. It also enables additional warnings and errors to help debug your code. You may find that code that compiled and ran in GCC4.2 now has new warnings and/or error messages. These error messages will need to be addressed in order to run your application under GCC5.2.

NBEclipse
Applications built for NBEclipse 2.7.5 or below may get unexpected linker errors due to the new GCC5.2 compiler. This can be resolved by creating a new project and importing the source from the old project, much like importing an example. This will import the new settings required for build projects in GCC5.2

Code: Select all

# Release 2.8.0 (April 2016)
## New in this release
* Compiler
	* Updated GCC from 4.2 -> 5.2
		* NOTE: Compiler is stricter and may elevate previous warnings to errors
		* Added processor specific optimization to platform libraries and examples.
* Examples
	* Added IPv6 examples
	* Added GPIO Pins class example
	* Used new multipart form capability to modify PostApplicationUpdate example to remove the requirement for a large memory block and now uses malloc to allocate only the binary size required
* IP
	* Added support for IPv6
		* Dual stack (IPv6/IPv4) or IPv4 only mode
			See IPv6 transition guide for help and information (/nburn/docs/IPv6)
		* All network calls use the IPADDR object
			This object can hold either IPv4 or IPv6
			DWORD as an IP address is no longer valid
* MOD5441X
	* Added toggle() function to Pins class
* OSX
	* Added support for network debugging
	* IPv6 link local web page addresses are broken on all BSD derived systems. This is a client side BSD/OSX bug that has not been addressed by Apple. See transition guide for workaround.
* System
	* All source converted to C++
		* Allows removal of all extern "C" declarations.
		* C++ web calls use CPPCALL instead of FUNCTIONCALL
		* FUNCTIONCALL and extern "C" will still be supported
		* UC/OS object structures now have member functions (example: mySem.pend())
	* Fixed platform case consistency across system headers
	* Multipart form post now supports callback for a single large file.
* Tools
	* Added support for building all pctools under visual studios 2012

## Corrections in this release
* System
	* Fixed multicast leave error.
	* GatherRandom only gather entropy on received data. Use RandomValid() to verify GetRandomX() results are seeded and valid
	* Most s*printf() in library were changed to sn*printf(). This is recommended practice for security and reliability
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by ecasey »

I am trying to compile code for a MOD5282 in 2.8.0 that works in 2.7.5. I created a new project and imported the source files. I get the compile error:

Code: Select all

In file included from C:\nburn/include/utils.h:34:0,
                 from ..\OneWire\ds2480.h:40,
                 from ..\OneWire\owtrnu.c:43:
C:\nburn/include/nettypes.h:68:4: error: expected specifier-qualifier-list before 'inline'
    inline bool IsNull() {return ((phywadr[2]==0) && (phywadr[1]==0) && (phywadr[0]==0)); };
    ^
It seems to be trying to tell me that it doesn't recognize "inline" as a type, which is a bit odd.

The next error is:

Code: Select all

C:\nburn/include/nettypes.h:75:8: error: unknown type name 'bool'
 inline bool operator==(const MACADR &i, const MACADR &j)
        ^
Again, very strange.

I tried reloading 2.8.0, but it didn't help. I even recompiled the library files; no change.

Any advice?

Ed
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by pbreed »

Does something in the your header files mess with the definition of bool?
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by ecasey »

The header files don't touch bool.
It looks like a broken link to a config.h or c++config.h file. I can't find where it would bring those in. That should link to stdbool.h and pick up the definition.
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by pbreed »

This is now ALL C++
C++ defines bool as a type.....natively....
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by ecasey »

The utils.h file is connected to c source files through the common header. It looks like the compiler is trying to process it as c-code where bool is not a native type.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: NNDK Release 2.8.0 (April 2016)

Post by dciliske »

You'll need to rename the 'owtrnu.c' file to 'owtrnu.cpp' if your using Eclipse. If you're using a makefile, you can just push it over to the CXXSRCS instead of the CSRCS.

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by pbreed »

Missed that...

2.8 is supposed to be C++ only.....
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by ecasey »

Now it makes sense. Beyond converting the .c to .cpp extensions, I had to chase down a few other errors and lots of new warnings, but it now compiles.

Next issue:
GCC5.2 includes new optimizations which will help increase code speed and decrease size.
I compiled the same code for a MOD5282 under 2.7.5 and 2.8.0 (after adjusting for C++ only) and got a 29% increase in size with 2.8.0.
That was "optimized more (-O2)" for both. Even "optimized for size (-Os)" (2.8.0 only), it was 27% larger.
It went over the size limit. Here is the compiler/linker final output for both.

Code: Select all

[2.7.5]
GapGapBlock starts at 2000000 
Block ends at 20db1c8 
Block size= 876K
Execution starts at 2000000 
compressed 897480 bytes into 447741 bytes
Code CheckSum= b06d595a
Struct CheckSum= 8dd3722f
S records output with a base address of ffc08000
S records output with a final address of ffc75515
About to write S7...
******************************Build summary ******************************
Used 447765 bytes of 491520 available flash (91.10%)
Used 1686608 bytes of 8388608 available ram (20.11%)
NNDK release tag version:2.7.5
Build complete for project LakeMonitor-BME
Time consumed: 2984  ms.  

[2.8.0]
Used 579746 bytes of 491520 available flash (117.95%)
GapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGapGap
Block starts at 2000000 
Block ends at 2118d28 
Block size= 1123K
Execution starts at 2003bc0 
compressed 1150248 bytes into 579722 bytes
Code CheckSum= 9b11ee93
Struct CheckSum= a328c249
S records output with a base address of ffc08000
S records output with a final address of ffc958a2
Build error occurred, build is stopped
Time consumed: 23516  ms.  
Is this expected behavior or am I doing something else wrong?
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: NNDK Release 2.8.0 (April 2016)

Post by pbreed »

This is probably all the IPV6 stuff.....


in predef.h (I'm still at home not at the office so this is from memory)
There should be a #define for IPV4 only..
Try changing that and recompiling EVERY Thing....

I also need to hunt down the GAP messages in compcode...

Paul
Post Reply