Working MCF52233 example of Interniche TCP/IP stack without task-system on linux

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

Working MCF52233 example of Interniche TCP/IP stack without task-system on linux

12,451 Views
pnordby
Contributor I
The attached code contains makefile and everything needed to build an "echo example" on a linux distro. The toolchain is available for free from CodeSourcery here. I used the version named freescale-coldfire-4.1-32-m68k-elf-i686-pc-linux-gnu.tar.bz.

Simply connect to IP adress 10.10.12.247 with TCP on port 4988 (or change IP, gateway and mask in ether.c) after building code and flashing the MCU.

The code is a mix of examples from Interniche, CodeWarrior, CodeSourcery and this forum. It does NOT use the niche-task-system (it's a superloop thing with interrupts), to be able to use RAM and flash for other stuff. It was a major hazzle to remove the task stuff and make the example work from flash memory on the MCF52233 (why didn't anyone do this and share the results before now?) in linux. Details about what's from where in the attached archive:
/cpu = codesourcery and codewarrior
/net = interniche
/std = interniche
(there are more files than required for the example)

ARP packets are "transparent" outside the Interniche files. To enable more debug information, define (by removing comment signs) NPDEBUG in /net/h/ipport.h or change the first "#if 0" to "#if 1" in /net/cf_specific/ifec.c.

The Interniche mini-sockets TCP-api (partially documented in the Interniche stack) are used in the example. The file ether.c also contains the functions socket(), connect(), listen(), read() and write(). Those functions are far from complete!

If you use this code, please tell us here about improvements you make! Also, if anyone is able to compile a toolchain from source or make an interrupt driven UART in the example, I would be very interested.

Best regards,
Petter


Message Edited by Petter_ on 2007-06-05 10:26 AM
--
Attachment Removed by Alban - Breach of Interniche - FSL License - Under repackaging by bongosai to fit license requirments.
Message Edited by Alban on 2007-06-13 09:23 AM

--
Alban edit: user requested for change


Message Edited by Alban on 2007-06-25 09:24 AM
Labels (1)
0 Kudos
Reply
19 Replies

2,578 Views
pnordby
Contributor I
I have succeded in making an interrupt driven UART. Tip I picked up somewhere else in this forum: make sure interrupt priorities and levels are unique for all sources (in the INTC0_ICR and INTC1_ICR registers). All example code from Freescale, CodeSourcery and Interniche seems to have this implemented incorrectly.

Practical example of relevant part when initialising UART:
   // Initialize the UART interrupts.
   if (portno == 0) {
      MCF_INTC0_ICR13 = MCF_INTC_ICR_IL(2) | MCF_INTC_ICR_IP(3);
      MCF_INTC0_IMRL &= ~MCF_INTC_IMRL_MASK13;
   } else if (portno == 1) {
      MCF_INTC0_ICR14 = MCF_INTC_ICR_IL(2) | MCF_INTC_ICR_IP(4);
      MCF_INTC0_IMRL &= ~MCF_INTC_IMRL_MASK14;
   } else {
      MCF_INTC0_ICR15 = MCF_INTC_ICR_IL(2) | MCF_INTC_ICR_IP(5);
      MCF_INTC0_IMRL &= ~MCF_INTC_IMRL_MASK15;
   }

All ICR registers should contain unique numbers according to the reference manual.
0 Kudos
Reply

2,578 Views
pnordby
Contributor I
Petter: Thanks for the support. The UDP thing I mentioned is OK in this and your code (I'm feeling a bit schizophrenic when refering to you).

Alban (or any moderator): Am I allowed to release the code like this? The licensing terms from Interniche, CodeSourcery and Freescale seems a bit complicated.

In case anyone wonder (and I am allowed to): my changes are all public domain, but feedback on code in cpu, net or std folders would be appreciated here.
0 Kudos
Reply

2,578 Views
Alban
Senior Contributor II
Hello,

I don't know about other providers.
From Freescale, software is available under a certain license as you mention.
If Freescale software you want to publish is available at no charge (for instance through Application Note software or Engineering Bulletin) it would require to be distributed under Freescale license. Which require a click through license at least to show acceptance of terms.

If you have written code inspired (which means not the same) from Freescale code available for free, Freescale responsibility is in no way to be engaged and you will therefore have ownership and responsibility of such code, so you can post it.

If the code is available for a fee, you cannot distribute the code.

In any case, if you publish GPL code, you will need to include the GPL license + the source code of all project if you want to create a distribution.

Does that address your question ?

Cheers,
Alban.
0 Kudos
Reply

2,578 Views
pnordby
Contributor I
Thanks for your detailed reply, Alban. I hope this will be sufficient.

There is no click through license, as none of the files posted require a graphical user interface. With that said, I have not removed any license information from files used from other places. All source code was available as examples in the CodeWarrior package, and on the web-sites from CodeSourcery and Freescale. My work is public domain.

In an attempt to comply: If you download and use this software -you accept the terms specified in the text based license information included in the archive (specifically /net/h/license.h and the top of each applicable source code file).

Best regards,
Petter

--
Alban edit: user requested for change


Message Edited by Alban on 2007-06-25 09:22 AM
0 Kudos
Reply

2,578 Views
Alban
Senior Contributor II
Hello Petter and all,

I was notified that the attachment was breaching the license agreement between FSL and Interniche.
The file has been removed while another moderator is investigating on an alternative way to ditribute your code (like a license click-through, for instance).

Regards,
Alban.
0 Kudos
Reply

2,578 Views
mccPaul
Contributor I
Hi Alban
 
I suppose that there is no chance that the Nichelite demo could be put into a source repository so that all of the bugs that have been found could be fixed?
 
Whatever happens, please can you agitate for a good long-term solution that allows us to modify (fix?) and distribute FreeScale examples. It is fine to provide a FreeScale Nichelite demo that only builds with CodeWarrior and only targets mcf52235, but I have a version that builds with Eclipse and GCC and targets mcf5282. Presumably the community would benefit from having access to this?
 
Cheers,
 
Paul.
0 Kudos
Reply

2,578 Views
Alban
Senior Contributor II
Thread Split:


To continue the more general topic please, follow the links.

Cheers,
Alban.
0 Kudos
Reply

2,578 Views
Petter_fupp
Contributor I
The example code is now available here:
http://neppe.no/2007/06/mcf52235-tcp-ip-stack-for-gnu/
The comment field will stay open.

Sorry for the norwegian fields in the bottom. Here is a translation, if you would like to leave a message:
Navn = Name
Epost = Email (will not be published)
Nettside = Website
Varsle meg på epost ... = Send me an email on new comments
Send kommentar = Send comment

...I hope Freescale, Codesourcery and Interniche are ok with this.

Cheers,
Petter



Message Edited by Petter_ on 2007-06-28 08:02 PM
0 Kudos
Reply

2,578 Views
Petter_fupp
Contributor I
The code referred to above has been removed due to Interniche license restrictions.
0 Kudos
Reply

2,578 Views
Alban
Senior Contributor II
Hi Petter,

If your full project is available, you could send it to be properly licensed and it would be distributed via the website. The requirement is a click-through license.

Our MCF Moderator, Macl would check content before it is put online.

Cheers,
Alban

0 Kudos
Reply

2,578 Views
Petter_fupp
Contributor I
I think I sent the project to you already. Could you please provide the link to the click-through license for the example TCP/IP stack in this thread then?
0 Kudos
Reply

2,578 Views
coldmike
Contributor I
Hi Petter,
 
I'm in need of your help getting a simple tcp/udp client working without the tasking system.  Is there a way you can guide me to an answer?
 
regards,
Michael
 
michael@quaint.co.za
0 Kudos
Reply

2,578 Views
Petter_fupp
Contributor I
I guess we need to wait for the URL. I'm so sorry for the inconvenience.
0 Kudos
Reply

2,578 Views
Alban
Senior Contributor II
Hello,

I reminded to system owner that we've been waiting for a couple of months !
Now I am back I will follow up tightly so we FINALLY get this file online.

I can only apologize for this frustrating delay.
The URL will be posted ASAP.
Best Regards,
Alban.
0 Kudos
Reply

2,578 Views
rd
Contributor I
Hello,
are there any news about the url?

To free RAM space I need to convert my project from task-system to superloop and the working example would be very helpful. Any help?

Thank you,
best regards,
Roberto
0 Kudos
Reply

2,578 Views
Alban
Senior Contributor II
Hello,

It is true you sent it. I will ask for an update.
As there was the Legal Department involved, the resolution became slooow.

Alban.
0 Kudos
Reply

2,578 Views
Petter
Contributor II
Thanks for sharing this with us Petter. I've been struggling with the same ting and got a head start when I got this kit from Petter. I highly recommend using this as a starting point if you use Code CodeSourcery Lite under Linux as a development platform for the MCF5223x.
0 Kudos
Reply

2,578 Views
pnordby
Contributor I
After extracting the toolchain from CodeSourcery and making the bin directory available in path, you should be able to compile everything by typing make in the folder where the code is extracted (if not: try to install the package build-essential in your distro).
0 Kudos
Reply

2,578 Views
Alban
Senior Contributor II
Hello Petter and Many thanks for your contribution!

I'm placing this post on the top so users can benefit from your work.

This thread stays open, of course, for everyone to comment on the project and their use of it.

Cheers,
Alban.
0 Kudos
Reply