FNET - TCP/IP Stack

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

FNET - TCP/IP Stack

45,255 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

873 Views
butok
NXP Employee
NXP Employee

 

Hi Peter

The oficial FNET project does not support CW10, so far => so no real help from me with CW10.

But you may look at ANs which use FNET with CW10:

1)      http://switch.dl.sourceforge.net/project/fnet/fnet/AN/FNET_and_MQX%20Rev%201.4.pdf

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

Hope you will find an information you are missing.

Best regards,
Andrey Buok

0 Kudos

873 Views
JimDon
Senior Contributor III

I can't say if this is you exact problem, but in CW include files that are not a part of the workspace folder need to be pathed to.

In project properties/C/C++ General/Paths and Symbols "Includes" tab / C Source files you can add an include path, and it can be relative ../.. will get just above the workspace.

0 Kudos

873 Views
PEGE
Contributor I

The includes works all fine. i got the problem in the asm files (fnet_ucosII_isr.asm).

 

In this file i get the error that he cant include the  fnet_comp_asm.h file.

0 Kudos

869 Views
JimDon
Senior Contributor III

"In this file i get the error that he cant include the  fnet_comp_asm.h file."

So the includes DON'T work fine?

If you go the where I said, there is a section for assembler includes as well.

 

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

FNET Version 1.2.0 released (http://fnet.sourceforge.net):

- Added support of the CodeWarrior Development Studio v10.2

  for TWR-K60N512 (Kinetis) and M52259EVB (Kirin3) projects.
- Added support of mulicast-group joining & leaving to the socket interface.
- Added Internet Group Management Protocol (IGMP) version 1 and 2.
- Added new socket options:
      * IP_MULTICAST_TTL changes IP "time to live" (TTL) value for outgoing

         multicast datagrams.
      * IP_ADD_MEMBERSHIP joins the socket to the supplied multicast group

        on the specified interface.
      * IP_DROP_MEMBERSHIP drops membership to the given multicast

         group and interface.
- Added new configuration parameters:
      * FNET_CFG_CPU_ETH_PROMISCUOUS enables/disables the Ethernet

         interface promiscuous mode.
      * FNET_CFG_CPU_ETH_FULL_DUPLEX enables/disables the Ethernet

         interface full duplex mode.
      * FNET_CFG_MULTICAST enables/disables the multicast group support.
      * FNET_CFG_MULTICAST_MAX defines the maximum number of unique

         multicast memberships may exist at the same time in the whole system.
      * FNET_CFG_MULTICAST_SOCKET_MAX defines the maximum number

         of multicast memberships may exist at the same time per one socket.
      * FNET_CFG_IGMP enables/disables the Internet Group Management

         Protocol (IGMP) support.
      * FNET_CFG_IGMP_VERSION defines version of the Internet Group

        Management Protocol (IGMP).  
      * FNET_CFG_LOOPBACK_MULTICAST enables/disables the local loopback

        of multicast datagrams.
      * FNET_CFG_LOOPBACK_BROADCAST enables/disables the local loopback

         of broadcast datagrams.
      * Old FNET_CFG_LOOP_xxx parameters renamed to FNET_CFG_LOOPBACK_xxx.
- Added possibility to choose default multicast interface for outgoing multicast packets,

   for hosts with several network interfaces, in FNET Throughput Benchmark tool.
- Fixed issues in Kinetis Flash and UART drivers.
- Many other minor changes/fixes.

 

Thank you,

Andrey Butok

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

FNET 1.2.2 released (http://fnet.sourceforge.net):

- Fixed wrong behavior, using CodeWarrior 10.2 Final Release for Kinetis platform. 
- Fixed value of MII speed register, which may be cause of wrong PHY-address detection and wrong connection status. 
- Removed the remaining platform-independent Ethernet logic from FEC driver. 
- Deleted "useless" length and pad fields from the socket-address structure. 
- The connect() function now returns FNET_OK instead of the FNET_ERR_AGAIN error (which is actually is not error). 
- Added "cookie" parameter to the timer-event handler. 
- Other internal changes.

 

FNET1.2.1 change log:
- Added new configuration parameters:
      * FNET_CFG_IP_OPTIONS enables/disables processing of IP options. 
      * FNET_CFG_TCP_URGENT enables/disables TCP urgent data processing. 
- Done different code-size optimizations. 
- Enabled the multicast functionality for the Kinetis FEC driver. 
- Moved the loopback logic from FEC driver to the Networking layer. 
- Renamed fnet_ip_addr_t to fnet_ip4_addr_t. 
- Added FNET_IP4_ADDR_STR_SIZE and FNET_MAC_ADDR_STR_SIZE that define maximum size of null-terminated ASCII string representing IPv4 and MAC address. 
- Deleted not thread-safe fnet_strok() function. It is recommended to use fnet_strtok_r() instead of it. 
- Added "FNET Demo Applications" and "Standard library API" chapters to the User Documentation.

 

P.S.
        Starting implementation of IPv6.

 

Thank you,
Andrey Butok

0 Kudos

870 Views
albertolubeiro
Contributor III

Hi Andrey,

I´m using CW10.2 and I want to add FNET Stack to my proyect. I have read the documentation "How to Add FNET Stack to an existing project" and that´s what I have done, but when I build I have a lot of errors.

I don´t now what to do. Can yo help me?

Best regards

Alberto

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

Hi Alberto,

The documentation is talking mainly about how to add FNET to classical CW.

Most probably CW 10.2 requires additional actions.

You can be more concrete – and will try to help, if it is not your project-specific issue.

Best regards,

Andrey

0 Kudos

870 Views
albertolubeiro
Contributor III

Hi Andrey,

First of all, thanks for your response.

I know the documentation is mainly of classical CW, but also explain what to do with CW10.2. For example at point 7.

Otherwise I haven´t found any other documentation but this. If you know where i can found some more, please tell me.

To make a probe, I have created a new proyect. A basic proyect and after compile without warnings and erros, I have added de FNET Stack, like it is said in the documentation.

About the errors, i have around 300, but many of them make reference obout it can´t open some files, for example fnet_config.h.

Any information you need, please ask me.

Thank again!

Best regards

Alberto

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

Hi Alberto,

It is clear, the compiler is not able to find header files.

Be sure to add paths to all header files, in project settings.

The information on the bottom of the NOTE section of http://fnet.sourceforge.net/manual/how_to_add_fnet.html

Best regards,

Andrey

0 Kudos

870 Views
albertolubeiro
Contributor III

Hi Andrey,

I had already added paths to all header files in proyect settings and nothing. Later i did it again but putting them in the same order as it says in the tutorial and i got zero errors.

Once this is made, i have put the initialization code in main.c and now i have three errors relationated whith this line of code in the function "fnet_init_static":     return fnet_init(&init_params);

The errors are:

1- Link failed

2- mingw32-make:***[proyect.afx]Error1

3- Undefined:"__VECTOR_RAM"

Any idea of what is happening?

Best regards

Alberto

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

Set FNET_CFG_CPU_VECTOR_TABLE to your RAM –vector-table address in the fnet_user_config.h file.

0 Kudos

870 Views
albertolubeiro
Contributor III

Hi Andrey,

FNET_CFG_CPU_VECTOR_TABLE is already defined in fnet_cpu_config.h

Can you explain a little more please? maybe an example?

Thanks.

Alberto

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

This is the configuration parameter that is predefined in fnet_cpu_config.h to the default value __VECTOR_RAM (which is placed in linker file of all demo applications).

Set it to your application specific value or add __VECTOR_RAM to the linker file.

If you still have any issues/questions please look at working CW10 demo applications provided with FNET.

0 Kudos

870 Views
joelesco
Contributor III

Hi Andrey,

I want to configure FNET_CFG_CPU_VECTOR_TABLE but i'm using CW 10.5 with PE. I saw your demo code and the linker file on it. In my case with PE the ProcessorExpert.ld cannot be change to add the default value __VECTOR_RAM. Could you explain me how can i do to add the value __VECTOR_RAM to my project ?

Thanks a lot Andrey

0 Kudos

870 Views
albertolubeiro
Contributor III

Hi andrey,

May be it is a silly question but i know nothing about ethernet

I have added fnet stack to my proyect and also i have put the initialization code "fnet_cpu_irq_enable" and "fnet_init_static" in main function. It´s makes without errors. My next step is to make a ping but i dont know wath to do.

I don´t know what functions should i use and how. Can you help me?

Thanks a lot

Best regards.

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

Hi Alberto,

If I understand well, you want to send ping-requests via FNET.

Current version of FNET is answering on ICMP ping/echo requests, but does not have user API which will allow sending of ICMP-echo requests from user applications.

Now I am working on implementation of RAW Socket API,  that will be used by new PING service.

So the next version of FNET will allow the sending & handling echo request & reply messages from user applications.

Regards,

Andrey

0 Kudos

870 Views
albertolubeiro
Contributor III

Hi Andrey,

I really apreciate your help.

I have a board with the ethernet hardware and i have to implement the ethernet software. So if i can´t send a ping whit this version of FNET, what can i do to start playing with ethernet?

When do you think that version will be available?

Thanks a lot

Best regards

0 Kudos

870 Views
butok
NXP Employee
NXP Employee

Hi Alberto,


>> what can i do to start playing with ethernet?


You have all source codes – you are free to play with it as you want.


>>.When do you think that version will be available?


No promises and no concrete plans.

It is "hobby" project => It hardly depends on mood, wish and free time.


Regards,

     Andrey

0 Kudos

870 Views
albertolubeiro
Contributor III

Hi Andrey,

Last question.

>>You have all source codes – you are free to play with it as you want.

If I understand well all that i need is inside the "fnet_stack" folder and I don´t need to use anythin off another folder ¿do I?

If I can´t make a ping what could I do. Something easy to implement to see that it works.


Please be patient, I don´t know where to start and i don´t have additional help.


Thanks and best regards.

Alberto


0 Kudos

870 Views
butok
NXP Employee
NXP Employee

Hi Alberto,

You can start from the beginning :smileywink:

Demo application “Quick Start”:

http://fnet.sourceforge.net/manual/quick_start.html

It gives you good overview what it is possible to do. After that, you can reuse and/or adopt the functionality you need for your application. If you are curious how it works inside – you have the source code.

If you need additional functionality that is not provided by the User API, you are free to change/add a missing functionality.

Just try, try and try – this way you get an experience.

Thanks,

Andrey

0 Kudos