This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001116] Instruct lwIP to use special section for buffers andheap.
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Sun, 30 Jan 2011 11:49:48 +0000
- Subject: [Bug 1001116] Instruct lwIP to use special section for buffers andheap.
- Auto-submitted: auto-generated
- References: <bug-1001116-13@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001116
--- Comment #18 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 11:49:45 GMT ---
(In reply to comment #17)
> Created an attachment (id=1107)
--> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1107) [details]
> lwip_tcpip: Enter MEM_SECTION entity
>
> Ilija, here is a patch which makes obsolete Attachment 1094 [details]. Build was tested
> for one ARM target, to simplify testing I used ".2ram.lwip" section attribute:
> cdl_configuration eCos {
> template lwip_eth ;
> };
> cdl_option CYGOPT_LWIP_MEM_SECTION {
> user_value 1
> };
> cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
> user_value "\".2ram.lwip\""
> };
>
> If this patch is suitable for you, let me know, please, and I will commit it.
Sergei thanks for your consideration, we're getting closer.
I have little experience with ECM and i find it as a very powerful mechanism
but i AFAIK unfortunately there is not a way for automatic import (someting
like import or include statement in CDL). IMO this may be inconvenient for
configtool users as it requires extra clicking.
Therefore i would prefer something that will not depend on ECM. One way is:
cdl_option CYGOPT_LWIP_MEM_SECTION {
...
default_value 1
...
}
If CYGDAT_LWIP_MEM_SECTION_NAME is active than recommended action will be to
use it. If not active, then CYGSEM_LWIP_MEM_SECTION is grey and it's value is
irrelevant.
As a consequence lwipopts.h shall change accordingly:
#if defined(CYGOPT_LWIP_MEM_SECTION) && CYGOPT_LWIP_MEM_SECTION
#include <cyg/infra/cyg_type.h>
# define MEM_SECTION CYGBLD_ATTRIB_SECTION(CYGDAT_LWIP_MEM_SECTION_NAME)
#else
# define MEM_SECTION
#endif
Earlier this morning I did some tests with former combination and i was about
to post when I got Mid-air collision. Below is my test case for reference and
review.
Please comment.
--- lwip_net.cdl ---
cdl_option CYGSEM_LWIP_MEM_SECTION {
display "Place lwIP buffers and heap in special memory section."
flavor bool
default_value 1
active_if CYGDAT_LWIP_MEM_SECTION_NAME
description "..."
}
--- lwipopts.h ---
#if defined(CYGSEM_LWIP_MEM_SECTION) && CYGSEM_LWIP_MEM_SECTION
#include <cyg/infra/cyg_type.h>
#define MEM_SECTION CYGBLD_ATTRIB_SECTION(CYGDAT_LWIP_MEM_SECTION_NAME)
#else
#define MEM_SECTION
#endif
--- hal...cdl ---
cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
flavor data
active_if CYGPKG_NET_LWIP
parent CYGOPT_LWIP_MEM_PLF_SPEC
default_value { "\".foo\"" }
legal_values { "\".foo\"" "\".bar\"" }
display "Memory section for lwIP buffers."
description " ... "
}
---------
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.