<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
First. Thanks for the work and taking the time and effort to <br>
submit it.<br>
<br>
Specifics below, but the general answer is to submit all RTEMS<br>
changes as reviewable patches to <a class="moz-txt-link-abbreviated" href="mailto:devel@rtems.org">devel@rtems.org</a>. We can<br>
then review them and get them merged. This will leave us<br>
with just the LWIP changes.<br>
<br>
Then we can review those and begin to work with that community<br>
to get them merged.<br>
<br>
<br>
<div class="moz-cite-prefix">On 8/26/2014 6:22 AM, Federico Casares
wrote:<br>
</div>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,<br>
<br>
In the past weeks we were working on porting the last LWIP
version to RTEMS for<br>
the LPC1768 microcontroller. Our main goal was to accomplish
this with the<br>
minimum number of changes for both projects. Fortunately, the
result was<br>
positive.<br>
<br>
Now, we are capable of providing to the community with this new
version of the<br>
RTEMS+LWIP port. In details:<br>
<br>
- RTEMS: last git revision = baa3c91ecb8a3b48ef387b938fcdb6
<div dir="ltr">e60b5bdc8a<br>
- LWIP: last git revision =
63038e03055183e3bc043711ada1de3bb907e989<br>
- LPC1768: based on MBED driver = <a moz-do-not-send="true"
href="https://github.com/mbedmicro/mbed/tree/master/libraries/net/eth/lwip-eth/arch/TARGET_NXP"
target="_blank">https://github.com/mbedmicro/mbed/tree/master/libraries/net/eth/lwip-eth/arch/TARGET_NXP</a><br>
<br>
<br>
The list of changes follows:<br>
<br>
- RTEMS OS: No changes were needed here. Despite this we will
be posting a<br>
possible improvement in the newlib maillist soon. It consist
in adding the gcc<br>
function attribute "warn_unused_result" to the pthread_*_init
functions. As a<br>
result, developers will be warned about checking the return
value. NOTE: a<br>
common error here could be not checking the return value,
assuming a successful<br>
result, and trying to, for example, lock a mutex which init
function has<br>
returned ENOMEM. (We found this exact mistake in the current
LWIP OS layer<br>
implementation for Unix)<br>
<br>
</div>
</div>
</blockquote>
FWIW the gcc C++ library adapters for threading do not check the
results from<br>
those operations. This is an open sore spot for us. <br>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">- RTEMS LPC1768_MBED BSP: We added a new section
to the linker script, so we<br>
were able to put the LWIP and driver buffers in an exact
memory location (useful<br>
when working with DMA devices).<br>
<br>
</div>
</div>
</blockquote>
This sounds like a discrete patch to submit to <a class="moz-txt-link-abbreviated" href="mailto:devel@rtems.org">devel@rtems.org</a>.<br>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">- RTEMS LPC1768_MBED Ethernet Driver: Based on an
existing driver from MBED, we<br>
ported it to RTEMS. NOTE: we will be creating our own driver
in the near future.<br>
<br>
</div>
</div>
</blockquote>
What is the license of these drivers?<br>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">- LWIP: As mentioned previously, we needed to put
all LWIP buffers in DMA memory<br>
locations. Consequently, we added the "section" attribute to
LWIP ram_heap and<br>
memp_memory buffers. Furthermore, as this is a common strategy
in embedded<br>
devices with DMA, we made it generic and we will send these
changes to the LWIP<br>
project. Additionally, we will provide some minor adds/changes
to the lwip log<br>
system and statistics system.<br>
<br>
</div>
</div>
</blockquote>
OK. Those are obviously their's to review. :)<br>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">- LWIP-contrib: Some of the changes/adds were:
fixing some issues related with<br>
posix initialization checks and allow set threads stack size.<br>
<br>
</div>
</div>
</blockquote>
What all specific to RTEMS was added? Do you want RTEMS Community
review<br>
on this?<br>
<br>
Is there a readme/howto to configure and use LWIP on RTEMS?<br>
<br>
It sounds like the port is largely BSP independent. Is this the
case?<br>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">- LWIP-test-app: A simple TCP echo server with
debugging functionality<br>
(rtems malloc statistics, rtems stack checker, lwip
statistics, driver<br>
statistics and registers dump) available.<br>
<br>
</div>
</div>
</blockquote>
Very cool! <br>
<br>
How large was the code/data/RAM use of the test application?<br>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr"><br>
As this new port is comprised of several patches and adds, it
would be great<br>
to have some advice in how to proceed. We can provide you with
the project as a<br>
whole or divided into independent patches. Also, we will need
to know which<br>
parts of the port are of RTEMS interest to be submitted.<br>
<br>
</div>
</div>
</blockquote>
RTEMS needs to nibble and digest the RTEMS stuff. That sounds pretty
easy.<br>
<br>
Then we can help or at least track and provide help getting the LWIP
port<br>
reviewed and merged by them.<br>
<blockquote
cite="mid:CALKvHS8cq+T5x-JtmRSZZ9=aALmLsyHDjLKVzmm5EpwFPRwcxA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">Regards.</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr">
<div>
<div><span style="font-family:verdana,sans-serif"><a
moz-do-not-send="true"
href="http://www.tallertechnologies.com"
target="_blank"><img moz-do-not-send="true"
alt="http://www.tallertechnologies.com"
src="http://www.tallertechnologies.com/templates/tallertechnologies/images/signature.png"
height="78" width="200"></a><br>
Casares, Federico<br>
</span></div>
<span style="font-family:verdana,sans-serif">Sr. Software
Engineer<br>
</span></div>
<span style="font-family:verdana,sans-serif">Taller
Technologies Argentina<br>
<br>
<span
style="font-size:8pt;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;background-color:transparent">San
Lorenzo 47, 3rd Floor, Office 5<br>
</span><span
style="font-size:8pt;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;background-color:transparent">Córdoba,
Argentina</span></span><br>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985</pre>
</body>
</html>