FNET - TCP/IP Stack

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FNET - TCP/IP Stack

52,230 Views
butok
NXP Employee
NXP Employee

FNET TCP/IP stack: Version 0.5.0 released. 
 

FNET Home page: http://fnet.sourceforge.net/

    Please, submit your feature requests and feedbacks here:

    http://sourceforge.net/tracker/?group_id=253892&atid=1126921 

    Please, submit your bug reports here:

    http://sourceforge.net/tracker/?group_id=253892&atid=1126920

 

FNET brief information:
The FNET is a free, open source software project (under GNU GPLv3) for building embedded communication software using the Freescale processors.

 

The stack provides following protocols and services:
  * Supported platforms:
     - Reindeer - MCF5282 (M5282EVB).
     - Kirin2 - MCF52235 (M2235EVB).
     - Kirin3 - MCF52259 (M2259EVB).
     - Lasko - MCF51CN128 (TWR-MCF51CN).
     - Other Freescale platforms to be supported soon.
  * Available as:
     - Stand-alone version. No underlying RTOS is required, although it can be used with it.
  * Supported Compilers:
     - Freescale CodeWarrior for ColdFire Version 7.1.
     - Freescale CodeWarrior for Microcontrollers Version 6.2.
  * BSD-style Socket layer API
  * Protocols:
     - User Datagram Protocol (UDP).
     - Transmission Control Protocol (TCP).
     - Internet Protocol (IPv4).
     - Internet Control Message Protocol (ICMP).
     - Address Resolution Protocol (ARP).
  * Network Interfaces:
     - Ethernet interface.
     - Loopback interface.
  * Services:
     - HTTP/0.9 server. Both SSI and CGI are supported.
     - DHCP client.
     - TFTP client.
     - Static File System.
     - CFM Flash driver.
  * Tools:
     - GUI File System Generation Tool.
  * Applications:
     - TFTP Bootloader.
     - Shell Application.
  * Doxygen User Documentation.

 

 Changes in 0.5.0 (since last public version):
 - Added TFTP client.
 - Added Coldfire Flash Module (CFM) driver.
 - Added FNET TFTP Bootloader.
 - Fixed DHCP client.
 - Updated Shell Demo application. Application parameters are saved in the flash.
 - Improved Shell library. Added blocking-command and multi-word parameter features.
 - A lot of other changes and fixes.

 

Best regards,

Andrey Butok

Labels (1)
Tags (2)
225 Replies

1,557 Views
manu_00
Contributor II

Hi Butok,

I am looking forward to use FNET with FreeRTOS. I am new to RTOS and even new to TCP IP so it will be a hard time. I have your demo application running on TWR-K60N512 and it works verry well. I also have an working freeRTOS project which i designed with the help of Processor Expert. So the next step would be to integrate the FNET Stack in my FreeRTOS Project. But the fact that i am new to TCP/IP gives me a hard time... Unfortunetely i havent figured out what files i need an what files i don't need.  Could you help me out with an advise?

How do write data to the ethernet port and how can i receive data from the ethernet port?

thanks

0 Kudos
Reply

1,557 Views
butok
NXP Employee
NXP Employee

Hi Manu,


The next version of FNET (till end of this year),

will have basic support of FreeRTOS,- contributed by FNET community.


Thanks,

     Andrey Butok

0 Kudos
Reply

1,557 Views
manu_00
Contributor II

Hello Andrey,

thanks for your answer. Well, than i have to wait.

Manu

0 Kudos
Reply

1,557 Views
Jeinstei
Contributor II

Whenever I try to download/debug the FNET demo project for CW 10x on the TWR-K60 I get an error: 

 

Faile writing target address40c.

 

Expected value:: 0x0

Actual value:: 0x2

 

Any ideas what might be causing this? I haven't changed the linker file at all, but I am using a JLink that automatically changes a bit to stop security from being enabled. Am I missing some setting to turn off the security bits which is causing the error? It looks like the error is occuring there, if I'm thinking about things right.

0 Kudos
Reply

1,557 Views
butok
NXP Employee
NXP Employee

Hi,

 

1)      Try to enter the “save” shell-command,  just to check  if you are able to write to the FLASH memory on your device.

2)      target address 40c??? The srec file generated by “shell_boot” project does not have any data on 0x40c address ( this is the bootloader area). => its data should be started from 0xC000 . Did you do any modifications? Did you use “shell_boot_intflash.elf.S19” file? 

It was tested with CW10.2

 

Best regards,

Andrey Butok

0 Kudos
Reply

1,557 Views
Jeinstei
Contributor II

butok-

 

1) I can write other programs to the device, just not FNET

 

2) Even when working with the original project and just building it straight, I'm receiving the same error. I haven't changed anything in the file, and the only difference is that I'm using J-Link instead of the PE Micro debugger (as far as I can tell).

 

Oddly, I know that the IAR version loads fine, but as we're looking at using Codewarrior, it would be nice to figure out what is going on. Our Jlink is a Kwikstick v5.

0 Kudos
Reply

1,557 Views
butok
NXP Employee
NXP Employee

If I understand well, you are able to load FNET project via Jlink, using IAR.

But you are not able to do the same ( with Jlink) using CW10.

I am using OSBDM (miniUSB) with CW10.2 (not Jlink), so FNET CW.10 demos do not have Debug targets with Jlink (only OSBDM). You can try it - it works (but slower than Jlink).

No help from me with CW10 + Jlink => please ask Freescale Support.

0 Kudos
Reply

1,557 Views
Jeinstei
Contributor II

Still no luck with anything, but I'm beginning to think it is something else. I'm being told that my device is secure when the registers say otherwise. I'll check in with Freescale support as something is weird here.

 

I appreciate the help.

0 Kudos
Reply

1,557 Views
butok
NXP Employee
NXP Employee

Just FYI.

        The "FNET Throughput Benchmark tool" is open-source now (originally was provided with FNET as the utility application)

        The FBENCH project home-page is http://fbench.sourceforge.net

 

FBENCH 2.0.0 released (http://fbench.sourceforge.net):
- First open-source version.

- Added IPv6 support.

- Removed the IPv4 TOS parameter, as it is not functional with Windows .NET.

- Many other internal changes.

 

Best regards,

Andrey Butok

0 Kudos
Reply

1,556 Views
LightElf
Contributor I

Hello Andrey!

Have you any  plans for Kinetis support within FNet?

0 Kudos
Reply

1,556 Views
butok
NXP Employee
NXP Employee

Hi

 

>> Have you any  plans for Kinetis support within FNet?

 

Yes. Support of the Kinetis is the number one in my plan.

 

BTW:

The FNET is the open project and any contribution to it is very welcome.

 

Best regards,

Andrey Butok

0 Kudos
Reply

1,556 Views
butok
NXP Employee
NXP Employee

 FNET version 0.9.3 released (http://fnet.sourceforge.net):
- Fixed stuck issue that may occur during receiving of broadcast UDP datagrams.

- Fixed buffer corruption issue that may occur when the internal static heap buffer has relatively small size.

- Improved stability of nebuf. management.

- FEC Frame buffers and descriptors are allocated statically (before in internal heap). Existing applications should reduce value of the FNET_CFG_HEAP_SIZE in user-configuration file by the value that equals summary size of buffers statically allocated in Ethernet driver. Roughly [NEW_VALUE]=[OLD_VALUE]-(FNET_CFG_MCF_ETH_TX_BUFS_MAX+FNET_CFG_MCF_ETH_RX_BUFS_MAX)* FNET_CFG_ETH_MTU.

- Renamed FNET_CFG_MCF_SERIAL_PORT_DEFAULT to FNET_CFG_CPU_SERIAL_PORT_DEFAULT.

- Added the FNET_CFG_TELNET_SOCKET_BUF_SIZE user-configuration option that defines size of the socket RX & TX buffer used by the Telnet server.

- Added OS folder where it will be placed all OS-specific code.

- Added uCOS-II specific ISR handler.

- Added FNET_CFG_OS and FNET_CFG_OS_operation_system_type set of user-configuration options that define a currently used OS. For this moment there is FNET_CFG_OS_UCOSII only.

- Added "Free heap" information to the Shell-example "info" command.

- Other minor changes/fixes.

 

Special thanks to Steve Quinlan, Jon Elliot and Paul Arnold for contribution.

 

PS: Any information about project(s) where the FNET is used is appreciated.

Please send the information directly to me. This information is for internal use only and can help the FNET project to get more resources from Freescale.

 

Best regards,

Andrey Butok

0 Kudos
Reply

1,556 Views
LightElf
Contributor I

Hello Andrey!

 

It seems like you are working on Kinetis support. Have you sorted out endianess-related  issues?

0 Kudos
Reply

1,556 Views
butok
NXP Employee
NXP Employee

Hi Elf

 

>>It seems like you are working on Kinetis support. Have you sorted out endianess-related  issues?

 

Not yet. I am only at the beginning. 

Unfortunately I have to do it in my free time, till I find big customer for it. If you are the serious customer who wants Kinetis support in the FNET ASAP - please contact me.

 

Thanks,

Andrey

0 Kudos
Reply

1,556 Views
LightElf
Contributor I

Unfortunately no, I am not a big customer. And have no Kinetis projects in the near future. But I am have some coldfire-based designs, as well as some ARM-based designs and want to share single code base (RTOS+IP) across all platforms. I think FreeRTOS+FNET can be a solution (now I use FreeRTOS with self-made UDP stack).

0 Kudos
Reply

1,556 Views
butok
NXP Employee
NXP Employee

 FNET version 1.0.0 released (http://fnet.sourceforge.net):

- Added Kinetis (ARM Cortex-M4) - MK60N512 support.

- Added support of the IAR Embedded Workbench for ARM compiler, version 6.1.

- Added standard FNET demo applications for the TWR-K60N512 board, including the FNET on-chip Bootloader.

- Added support of little-endian platforms, defined by FNET_CFG_CPU_LITTLE_ENDIAN.

- Added set of functions and macroses that convert values between host and network byte order (like fnet_ntohs(), fnet_htonl() and etc. ).

- Added common on-chip Flash memory driver for Kinetis (FTFL) and ColdFire (CFM) modules.

- Added support of 16 bits and 24 bits addressing in the S-record file format for the FNET Bootloader.

- Added common FEC driver for Kinetis and ColdFire platform.- Improved response of the Telnet server.

- Added the fnet_telnet_close_session() function, which closes the currently active session of the Telnet Server.

- Added the fnet_println() function that prints formatted text to the stream and terminates it by line separator string.

- Added fnet_serial_flush() function that sends/flushes data from the internal stream buffer to the stream client, it has meaning only for buffered streams.

- Applied optimized version of the IP checksum calculation and the fnet_memcpy() function.

- A lot of the FNET_CFG_MCF_xxxx parameters, which are common to all platforms, were renamed to FNET_CFG_CPU_xxxx.

- Many other changes and fixes.

 

Best regards,

Andrey Butok

0 Kudos
Reply

1,556 Views
butok
NXP Employee
NXP Employee

 FNET version 1.1.0 released (http://fnet.sourceforge.net):

- Added the DNS client/resolver service. 

- Added the DNS-server address support to the DHCP client service and to the network interface.

- Added the "dns" resolver command to the FNET Shell demo-application. 

- Other minor changes/fixes. 

 

Best regards,

Andrey Butok

0 Kudos
Reply

1,560 Views
butok
NXP Employee
NXP Employee

 FNET version 1.1.2 released (http://fnet.sourceforge.net):

- FNET Throughput Benchmark tool:  

    * Added "IP Don`t Fragment" option.

    * Added "IP Time to Live" option.

    * Added "Timeout" option (in seconds) for sending.

      User is able to choose to stop the sending after the number of sent

      messages or after the timeout.

    * Added possibility of joining of a UDP Multicast group by the receiver.

    * Added "refresh" button that updates "Local IP address" combo-box,

       in case a network interface enabled/disabled during work of application.  

    * Added acknowledge packet, at the end of UDP data transfer session,

       which contains amount of received data. It helps to determine the amount

       of data was received and lost during UDP transfer.

    * Throughout value in Bytes/sec was replaced by Kbits/sec.

    * Other minor improvements in user interface.

- Added the FNET_CPU_INSTRUCTION_ADDR() macro that sets Thumb bit

  of an address for Kinetis entry point (and does nothing for ColdFire).

   It is used by the FNET boot-loader and fixes issue caused by SREC files

   generated by CodeWarrior for Kinetis.

- Fixed issue in MCF52235 initialization for UART number 2.

- Fixed potential issue in initialization of the DNS client application.

- Fixed potential issue in the fnet_str_to_mac() function.

- Fixed the "strict ANSI C" CW compiler errors.

- Fixed some GCC compiler errors and warnings (even if GCC is not supported).

- Other minor changes/fixes.

 

Thank you,

Andrey Butok

0 Kudos
Reply

1,560 Views
butok
NXP Employee
NXP Employee

FYI:

New AN “Ethernet Bootloader for MCU”:

http://www.freescale.com/files/microcontrollers/doc/app_note/AN4367.pdf

 

I have not found any reference to FNET in the text,

but based on source code examples, it is used the FNET Bootloader :smileywink:

 

Best regards,

Andrey Butok

0 Kudos
Reply

1,556 Views
FridgeFreezer
Senior Contributor I

I just thought I'd post up and congratulate Andrey on an excellent piece of software - if the rest of Freescale's stuff worked as well as this they'd probably rule the world!

 

I downloaded it, ran the installer, compiled it, programmed my EVB, ran the code and it all just worked perfectly. I have never had any other piece of code from FS that has done that. Hell, even codewarrior itself didn't work 1st time...

 

All I have to do now is read a lot of stuff about TCP/IP networking so I understand what's going on.

 

Can anyone point me to a demo where you could do something very basic, turn an LED on/off via a webpage or telnet command, the included demos are excellent but I like to start really simple with "hello world" :smileyvery-happy:

0 Kudos
Reply

1,560 Views
butok
NXP Employee
NXP Employee

Hi FridgeFreezer,

 

Thank you very much for the good feedback. It gives me more enthusiasm to continue to develop the FNET project.

The FNET can be even much better than it is, and I still hope, that “right” people finally will understand importance of this project for Freescale & its customers, and will provide proper support to it.

 

BTW:

I have just discovereda small article concerning FNET.

There’s a stack for that: FNET makes TCP/IP protocol available to embedded systems”By Tom Thompson:

http://blogs.freescale.com/2011/08/03/there%E2%80%99s-a-stack-for-that-fnet-makes-tcpip-protocol-ava...

 

Thank you,

Andrey Butok

0 Kudos
Reply