This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001116] Instruct lwIP to use special section for buffers andheap.


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001116

--- Comment #8 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-26 20:14:56 GMT ---
(In reply to comment #7)
> Ilia, IMO, new CDL entries in Attachment 1094 [details] look too complex. As far as I
> could understand you should manage only MEM_SECTION definition. May be to use
> something more simple in lwip_net.cdl, like below (alone option):
> 
> cdl_option CYGOPT_LWIP_MEM_SPEC_SECTION {
>     display         "Use specified section"
>     requires        CYGINT_LWIP_MEM_SECTIONING
>     active_if       CYGIMP_LWIP_MEM_ATTR_SECTION
>     default_value   0
> }
> 
> It requires one interface CYGINT_LWIP_MEM_SECTIONING which can be implemented
> in HAL (so, the option is active if that is implemented
> CYGIMP_LWIP_MEM_ATTR_SECTION will be true).

It's much simpler indeed Sergei. Below is a implementation based on your
suggestion. It uses booldata in lwip_net.cdl that is also used for
concatenation. We need concatenation because the <sect_name> supplied by HAL is
a stem not only for section attribute, but also for section boundaries
__<sect_name>_start, __<sect_name>_end provided by ld. CYGDAT_LWIP_MEM_SECTION
should be considered in conjunction with Attachment
http://bugs.ecos.sourceware.org/attachment.cgi?id=1088 to Bug 1001114 (macros
SECTION_START() and SECTION_END()).

Here is the code for review:

---- lwip_net.cdl
--------------------------------------------------------------

    cdl_option CYGDAT_LWIP_MEM_SECTION {
        display "Special memory section for lwIP buffers"
        active_if CYGDAT_LWIP_MEM_SECTION_NAME
        requires CYGDAT_LWIP_MEM_SECTION_NAME
        flavor booldata
        calculated { "\"." . CYGDAT_LWIP_MEM_SECTION_NAME . "\""}
        description "If enabled, this option will use specified
                     memory section for lwip-tcp p-buffers and heap.
                     The section name is typically provided by HAL.
                     Dependent on platform this may utilize additional
                     memory resources."
        }

---- hal_cortexm_lpc17xx_lpc1766stk.cdl
----------------------------------------

    cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
        flavor booldata
        active_if CYGPKG_NET_LWIP
        parent CYGOPT_LWIP_MEM_PLF_SPEC
        default_value { "ahb_bss" }
        display "Use this memory section for lwIP data."
        description "Enable special section for lwIP data 
                     and provide section name."                
    }

---- lwipopts.h
----------------------------------------------------------------

#ifdef CYGDAT_LWIP_MEM_SECTION
#include <cyg/infra/cyg_type.h>
#define MEM_SECTION CYGBLD_ATTRIB_SECTION(CYGDAT_LWIP_MEM_SECTION)
#else
#define MEM_SECTION
#endif

-- 
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]