public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
@ 2011-01-16  8:53 ` bugzilla-daemon
  2011-01-16 19:53 ` bugzilla-daemon
                   ` (53 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-16  8:53 UTC (permalink / raw)
  To: ecos-patches

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

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ecos-patches@ecos.sourcewar
                   |                            |e.org, john@dallaway.org.uk
          Component|lwIP                        |Patches and contributions

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
  2011-01-16  8:53 ` [Bug 1001116] Instruct lwIP to use special section for buffers and heap bugzilla-daemon
@ 2011-01-16 19:53 ` bugzilla-daemon
  2011-01-16 21:11 ` bugzilla-daemon
                   ` (52 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-16 19:53 UTC (permalink / raw)
  To: ecos-patches

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

Sergei Gavrikov <sergei.gavrikov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergei.gavrikov@gmail.com

--- Comment #1 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-16 19:52:58 GMT ---
(In reply to comment #0)
> Created an attachment (id=1082)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1082) [details]
> lwIP patch for special memory section.

Hi Ilija,

I am not seeing a diff for lwip_net.cdl in your patch (I wonder about your
CYGOPT_LWIP_MEM_SPEC_SECTION and CYGOPT_LWIP_MEM_SECTION_ATTR).

Sergei

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
  2011-01-16  8:53 ` [Bug 1001116] Instruct lwIP to use special section for buffers and heap bugzilla-daemon
  2011-01-16 19:53 ` bugzilla-daemon
@ 2011-01-16 21:11 ` bugzilla-daemon
  2011-01-17  9:47 ` bugzilla-daemon
                   ` (51 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-16 21:11 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #2 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-16 21:10:48 GMT ---
Created an attachment (id=1086)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1086)
Special lwIP section CDL snippet.

(In reply to comment #1)
> (In reply to comment #0)
> 
> I am not seeing a diff for lwip_net.cdl in your patch (I wonder about your
> CYGOPT_LWIP_MEM_SPEC_SECTION and CYGOPT_LWIP_MEM_SECTION_ATTR).
> 

Hi Sergei

You shall find one in Bug 1001114 (that inspired this feature).
Extract http://bugs.ecos.sourceware.org/attachment.cgi?id=1084 and open
lpc17xx/lpc1766stk/current/cdl/hal_cortexm_lpc17xx_lpc1766stk.cdl

Note: You may also like to see the linker script in pkgconf directory.

Here I attach a CDL snippet for reference.

Ilija

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (2 preceding siblings ...)
  2011-01-16 21:11 ` bugzilla-daemon
@ 2011-01-17  9:47 ` bugzilla-daemon
  2011-01-18  1:43 ` bugzilla-daemon
                   ` (50 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-17  9:47 UTC (permalink / raw)
  To: ecos-patches

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

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |1001114

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (3 preceding siblings ...)
  2011-01-17  9:47 ` bugzilla-daemon
@ 2011-01-18  1:43 ` bugzilla-daemon
  2011-01-18  2:00 ` bugzilla-daemon
                   ` (49 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-18  1:43 UTC (permalink / raw)
  To: ecos-patches

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

Ilija Kocho <ilijak@siva.com.mk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|1001114                     |

--- Comment #3 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-18 01:43:20 GMT ---
The dependence on Bug 1001114 is weaker than opposite. lwIP can work with this
bug applied and without Bug 1001114. Bug 1001114 on the other hand needs this
bug in orrer to utilize additional RAM for lwIP. Therefore I remove dependence
in order to resolve circular reference.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (4 preceding siblings ...)
  2011-01-18  1:43 ` bugzilla-daemon
@ 2011-01-18  2:00 ` bugzilla-daemon
  2011-01-22 18:15 ` bugzilla-daemon
                   ` (48 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-18  2:00 UTC (permalink / raw)
  To: ecos-patches

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

Ilija Kocho <ilijak@siva.com.mk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |1001114

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (5 preceding siblings ...)
  2011-01-18  2:00 ` bugzilla-daemon
@ 2011-01-22 18:15 ` bugzilla-daemon
  2011-01-22 18:21 ` bugzilla-daemon
                   ` (47 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-22 18:15 UTC (permalink / raw)
  To: ecos-patches

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

Ilija Kocho <ilijak@siva.com.mk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1082|0                           |1
        is obsolete|                            |

--- Comment #4 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-22 18:15:01 GMT ---
Created an attachment (id=1094)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1094)
lwip_net.cdl with special lwIP section CDL component.

(In reply to comment #1)
> (In reply to comment #0)
> > Created an attachment (id=1082)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1082) [details]
[details]
> > lwIP patch for special memory section.
> 
> Hi Ilija,
> 
> I am not seeing a diff for lwip_net.cdl in your patch (I wonder about your
> CYGOPT_LWIP_MEM_SPEC_SECTION and CYGOPT_LWIP_MEM_SECTION_ATTR).

Sergei

Following your question I am proposing a way to present lwIP special sections
in lwip_net.cdl. I would agree that if lwIP has this "special section feature"
the same probably has to be represented in lwIP's cdl. However, section
existence/definition is platform specific, so the section must be provided by
the platform - hence there should also be a lwIP-special-section component in
the platform cdl. I am posting platform CDL in next attachment "Special lwIP
section - sample component for platform CDL".

I would appreciate comments on this approach.

Ilija

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (6 preceding siblings ...)
  2011-01-22 18:15 ` bugzilla-daemon
@ 2011-01-22 18:21 ` bugzilla-daemon
  2011-01-22 22:06 ` bugzilla-daemon
                   ` (46 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-22 18:21 UTC (permalink / raw)
  To: ecos-patches

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

Ilija Kocho <ilijak@siva.com.mk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1086|0                           |1
        is obsolete|                            |

--- Comment #5 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-22 18:20:42 GMT ---
Created an attachment (id=1095)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1095)
Special lwIP section - sample component for platform CDL

This is a sample CDL snippet that complements attachment (id=1094).

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (7 preceding siblings ...)
  2011-01-22 18:21 ` bugzilla-daemon
@ 2011-01-22 22:06 ` bugzilla-daemon
  2011-01-24 12:46 ` bugzilla-daemon
                   ` (45 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-22 22:06 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #6 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-22 22:06:16 GMT ---
Ilija wrote:

> Following your question I am proposing a way to present lwIP special sections
> in lwip_net.cdl. I would agree that if lwIP has this "special section feature"
> the same probably has to be represented in lwIP's cdl. However, section
> existence/definition is platform specific, so the section must be provided by
> the platform - hence there should also be a lwIP-special-section component in
> the platform cdl. I am posting platform CDL in next attachment "Special lwIP
> section - sample component for platform CDL".
> 
> I would appreciate comments on this approach.

Ilia, thank you. I will take a look. It seems for me the use of all the
fragments of memory is a neat idea, especially for small memory footprint
systems. I think (and hope) we should discuss the details in the wider part and
I look forward to the expertise and knowledge other maintainers on this issue.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (8 preceding siblings ...)
  2011-01-22 22:06 ` bugzilla-daemon
@ 2011-01-24 12:46 ` bugzilla-daemon
  2011-01-26 20:15 ` bugzilla-daemon
                   ` (44 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-24 12:46 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #7 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-24 12:45:58 GMT ---
Ilia, IMO, new CDL entries in Attachment 1094 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).

For lwipopts.h I would put something like this

#if CYGOPT_LWIP_MEM_SPEC_SECTION && CYGDAT_LWIP_MEM_SECTION_NAME
#include <cyg/infra/type.h>
#define MEM_SECTION CYGBLD_ATTRIB_SECTION(CYGDAT_LWIP_MEM_SECTION_NAME)
#else
#define MEM_SECTION
#endif

CYGDAT_LWIP_MEM_SECTION_NAME can be booldata flavor option in your platform CDL
(no complex concatenation, just name -- { ".foo" }.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (9 preceding siblings ...)
  2011-01-24 12:46 ` bugzilla-daemon
@ 2011-01-26 20:15 ` bugzilla-daemon
  2011-01-27 18:54 ` bugzilla-daemon
                   ` (43 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-26 20:15 UTC (permalink / raw)
  To: ecos-patches

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.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (10 preceding siblings ...)
  2011-01-26 20:15 ` bugzilla-daemon
@ 2011-01-27 18:54 ` bugzilla-daemon
  2011-01-28 12:26 ` bugzilla-daemon
                   ` (42 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-27 18:54 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #9 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-27 18:54:02 GMT ---
"Make it as simple as you can, and no simpler" :-) But,

I would not use calculated command as you proposed

    cdl_option CYGDAT_LWIP_MEM_SECTION {
        display "Special memory section for lwIP buffers"
        default_value 0

IMO, you can do it in your CDL (HAL)

    cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
        ...
        requires { CYGDAT_LWIP_MEM_SECTION == ... }

Comments?

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (11 preceding siblings ...)
  2011-01-27 18:54 ` bugzilla-daemon
@ 2011-01-28 12:26 ` bugzilla-daemon
  2011-01-28 17:52 ` bugzilla-daemon
                   ` (41 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-28 12:26 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #10 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-28 12:26:39 GMT ---
(In reply to comment #9)
> "Make it as simple as you can, and no simpler" :-) But,
> 
> I would not use calculated command as you proposed

Why not use calculated? By using calculated value we have a single entry point
for section name. It can be further enhanced by following:

    cdl_component CYGDAT_LWIP_MEM_SECTION_NAME {
          ...
          legal_values { "ahb_bss" "ahb_0" }
          ...
    }

> 
>     cdl_option CYGDAT_LWIP_MEM_SECTION {
>         display "Special memory section for lwIP buffers"
>         default_value 0
> 
> IMO, you can do it in your CDL (HAL)
> 
>     cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
>         ...
>         requires { CYGDAT_LWIP_MEM_SECTION == ... }
> 
> Comments?

The combination that you are proposing inherently raises a conflict which I
prefer to avoid.
However I tried it and the conflict resolution offered by configtool is not
what we want - it offers CYGDAT_LWIP_MEM_SECTION_NAME = 0 ??

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (12 preceding siblings ...)
  2011-01-28 12:26 ` bugzilla-daemon
@ 2011-01-28 17:52 ` bugzilla-daemon
  2011-01-29 12:51 ` bugzilla-daemon
                   ` (40 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-28 17:52 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #11 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-28 17:52:10 GMT ---
(In reply to comment #10)
> (In reply to comment #9)
> > "Make it as simple as you can, and no simpler" :-) But,
> > 
> > I would not use calculated command as you proposed
> 
> Why not use calculated?

To be clear. I have only wanted an empty MEM_SECTION definition by default.

> By using calculated value we have a single entry point for section name.
> It can be further enhanced by following:
> 
>     cdl_component CYGDAT_LWIP_MEM_SECTION_NAME {
>           ...
>           legal_values { "ahb_bss" "ahb_0" }
>           ...
>     }

Ah, I missed that you need a choice from the list.

> > 
> >     cdl_option CYGDAT_LWIP_MEM_SECTION {
> >         display "Special memory section for lwIP buffers"
> >         default_value 0
> > 
> > IMO, you can do it in your CDL (HAL)
> > 
> >     cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
> >         ...
> >         requires { CYGDAT_LWIP_MEM_SECTION == ... }

...so, I enterred a mess when I have been pointed on the 'booldata' above.

> > Comments?
> 
> The combination that you are proposing inherently raises a conflict which I
> prefer to avoid.
> However I tried it and the conflict resolution offered by configtool is not
> what we want - it offers CYGDAT_LWIP_MEM_SECTION_NAME = 0 ??

Yes, I'm sorry, then that can be

cdl_package CYGPKG_NET_LWIP {
    ...
    cdl_option CYGSEM_LWIP_MEM_SECTION {
        display     "Relocate memory pools"
        flavor      bool
        calculated  is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
        ...
    }
}

cdl_package CYGPKG_HAL_... {
    ...
    cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
        display       "Name of section"
        flavor        data
        default_value { "\".foo\"" }
        legal_values  { "\".foo\"" "\".bar\"" "\".baz\"" }
        ...
    }
}

and the check will be simple

#if 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

Well, if HAL does not provide CYGDAT_LWIP_MEM_SECTION_NAME, that lwIP's
CYGSEM_LWIP_MEM_SECTION will be not defined and other targets (the most)
will be happy with

#define MEM_SECTION

Your target's CDL will turn on CDL option CYGSEM_LWIP_MEM_SECTION and
memory section name will be specified.

I hope I get it what you looking for.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (13 preceding siblings ...)
  2011-01-28 17:52 ` bugzilla-daemon
@ 2011-01-29 12:51 ` bugzilla-daemon
  2011-01-29 14:54 ` bugzilla-daemon
                   ` (39 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-29 12:51 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #12 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-29 12:51:18 GMT ---
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > "Make it as simple as you can, and no simpler" :-) But,
> > > 
> > > I would not use calculated command as you proposed
> > 
> > Why not use calculated?
> 
> To be clear. I have only wanted an empty MEM_SECTION definition by default.

Don't we have it since the beginning? I have done backward compatibility checks
after every substantial change.

> 
> > By using calculated value we have a single entry point for section name.
> > It can be further enhanced by following:
> > 
> >     cdl_component CYGDAT_LWIP_MEM_SECTION_NAME {
> >           ...
> >           legal_values { "ahb_bss" "ahb_0" }
> >           ...
> >     }
> 
> Ah, I missed that you need a choice from the list.

It's an outcome from our discussion. Frankly, I'm not yet sure what's more
appropriate: to restrict user choice to available sections (safe), or give more
freedom?

[SNIP]

> ...so, I enterred a mess when I have been pointed on the 'booldata' above.

IMO booldata flavor is OK for CYGDAT_LWIP_MEM_SECTION_NAME, since it provides
for user override. Someone may want to place lwIP buffers back in main memory
(if restricted resources for lwIP and application are acceptable) and use
additional memory sections for something else.

On the other hand CYGDAT_LWIP_MEM_SECTION needn't/shouldn't be booldata since
it's (non)definition depends on CYGDAT_LWIP_MEM_SECTION_NAME. I have changed to
it to data (pse see revised snippets below).

> 
> > > Comments?
> > 
> > The combination that you are proposing inherently raises a conflict which I
> > prefer to avoid.
> > However I tried it and the conflict resolution offered by configtool is not
> > what we want - it offers CYGDAT_LWIP_MEM_SECTION_NAME = 0 ??
> 
> Yes, I'm sorry, then that can be
> 
> cdl_package CYGPKG_NET_LWIP {
>     ...
>     cdl_option CYGSEM_LWIP_MEM_SECTION {
>         display     "Relocate memory pools"
>         flavor      bool
>         calculated  is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
>         ...
>     }
> }
> 

Wouldn't it be clearer in configtool if CYGSEM_LWIP_MEM_SECTION is "grayed"
when we have no memory section provided?
Hence active_if CYGDAT_LWIP_MEM_SECTION_NAME


> cdl_package CYGPKG_HAL_... {
>     ...
>     cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
>         display       "Name of section"
>         flavor        data
>         default_value { "\".foo\"" }
>         legal_values  { "\".foo\"" "\".bar\"" "\".baz\"" }
>         ...
>     }
> }
> 

Ref. discussion on booldata flavoring of CYGDAT_LWIP_MEM_SECTION_NAME above.


> and the check will be simple
> 
> #if 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
> 
> Well, if HAL does not provide CYGDAT_LWIP_MEM_SECTION_NAME, that lwIP's
> CYGSEM_LWIP_MEM_SECTION will be not defined and other targets (the most)
> will be happy with
> 
> #define MEM_SECTION
> 
> Your target's CDL will turn on CDL option CYGSEM_LWIP_MEM_SECTION and
> memory section name will be specified.
> 
> I hope I get it what you looking for.

Doesn't the same also apply to code proposed in comment #8?
However there are 2 things I would change in comment #8 code:
  - CYGSEM_LWIP_MEM_SECTION to be of flavor data
  - CYGSEM_LWIP_MEM_SECTION_NAME to be no_define (only CYGSEM_LWIP_MEM_SECTION
is needed by C code)

Also there is one point for further discussion: 
  - Concatenation or plain strings?

IMO it would depend on resolution for section related macros proposed in
http://bugs.ecos.sourceware.org/attachment.cgi?id=1088 to Bug 1001114 . 

For reference, here is a digest of all code snippets as are in my current
build:

-----------------
cdl_package CYGPKG_NET_LWIP {
      ...
        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 data
            calculated { "\"." . CYGDAT_LWIP_MEM_SECTION_NAME . "\"" }
            description "..."
        }
      ...
}
---------------
cdl_package CYGPKG_HAL_FOO_BAR {
     ...
    cdl_component CYGDAT_LWIP_MEM_SECTION_NAME {
        flavor booldata
        active_if CYGPKG_NET_LWIP
        parent CYGOPT_LWIP_MEM_PLF_SPEC
        default_value { "foo" }
        legal_values { "foo" "bar" }
        no_define
        display "..." 
    }
     ...
}
----------------
// 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

--------------

Note: Following section related macros in are stored in lpc17xx_misc.c
temporarily until the issue is resolved. If accepted, they should be stored in
some(probably architecture) HAL header.

// lpc17xx_misc.c

//===================================
// Special memory section macros
//===================================

#define SECTION_START(_name_) (__ ## _name_ ## _start)
#define SECTION_END(_name_) (__ ## _name_ ## _end)

#define SECTION_USR(_name_) \
__externC cyg_uint32 SECTION_START(_name_); \
__externC cyg_uint32 SECTION_END(_name_)

#define SECTION_CLEAR(_name_) hal_section_clear(&SECTION_START(_name_),
&SECTION_END(_name_))

#if defined(CYGDAT_LWIP_SECTION_NAME)
SECTION_USR(CYGDAT_LWIP_SECTION_NAME);
#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.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (14 preceding siblings ...)
  2011-01-29 12:51 ` bugzilla-daemon
@ 2011-01-29 14:54 ` bugzilla-daemon
  2011-01-29 19:32 ` bugzilla-daemon
                   ` (38 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-29 14:54 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #13 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-29 14:54:09 GMT ---
Hi

So far it is about the below,

(In reply to comment #12)
> (In reply to comment #11)

[snip]

> > ... that can be
> > 
> > cdl_package CYGPKG_NET_LWIP {
> >     ...
> >     cdl_option CYGSEM_LWIP_MEM_SECTION {
> >         display     "Relocate memory pools"
> >         flavor      bool
> >         calculated  is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
> >         ...
> >     }
> > }
> > 
> 
> Wouldn't it be clearer in configtool if CYGSEM_LWIP_MEM_SECTION is "grayed"
> when we have no memory section provided?
> Hence active_if CYGDAT_LWIP_MEM_SECTION_NAME

Agreed. I vote for a full control and no mess (gray for the most cases):

    cdl_option CYGSEM_LWIP_MEM_SECTION {
        ...
        flavor        bool
        default_value 0
        active_if     CYGDAT_LWIP_MEM_SECTION_NAME
        ...
    }

No calculate, no guess, the last word for a user! Even if her/his target
provides *_SECTION_NAME, he/she should decide use the feature or not.

[snip]

> Also there is one point for further discussion: 
>   - Concatenation or plain strings?

I prefer the plain strings.

> IMO it would depend on resolution for section related macros proposed in
> http://bugs.ecos.sourceware.org/attachment.cgi?id=1088 to Bug 1001114 . 
> 
> For reference, here is a digest of all code snippets as are in my current
> build:

> -----------------
> cdl_package CYGPKG_NET_LWIP {
>       ...
>         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 data
>             calculated { "\"." . CYGDAT_LWIP_MEM_SECTION_NAME . "\"" }
>             description "..."
>         }
>       ...
> }

I dislike the above as the most users will be to see in CT a strange grayed
data box like below:

- |__) Momory options
       [ab] "Special memory section for lwIP buffers."    | ".0"

What's that ".0"? That's concatenation with an absent data.

Be continue.

Thanks,
Sergei

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (15 preceding siblings ...)
  2011-01-29 14:54 ` bugzilla-daemon
@ 2011-01-29 19:32 ` bugzilla-daemon
  2011-01-29 19:49 ` bugzilla-daemon
                   ` (37 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-29 19:32 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #14 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-29 19:32:20 GMT ---
Ilija, at the least I would stop on this

- lwip_net.cdl:

    cdl_option CYGSEM_LWIP_MEM_SECTION {
        ...
        flavor         bool
        default_value  0
        active_if      CYGDAT_LWIP_MEM_SECTION_NAME
    ...
    }

- lwipopts.h:

#if 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

- mem.c, memp.c: your Attachment 1094 

My comments on lwiP config:

- cdl option-semaphore CYGSEM_LWIP_MEM_SECTION is active if other package
  provides CYGDAT_LWIP_MEM_SECTION_NAME (string) *and* if user select it.
  (It will be "grayed" for the most eCos targets in `configtool' and this
  is okay).

- above is quite enough to expand the lwIP package by applying your patch
  for lwiP sources and to *close* this bug.

- if you want to force CYGSEM_LWIP_MEM_SECTION, you can distribute one
  ECM file to import, for example, `lwip_net.ecm' under your HAL `misc'
  directory which will do it (enable the option), and users will import
  all proper settings for your target in cases if they need lwIP stack.

My thoughts about HAL config:

It seems to me you can enter some generic CDL component, for example,
component CYG{MEM, or HWR}_HAL_..._SECTION where you can manage also
generic data option (HAL, !LWIP) CYGDAT_HAL_..._SECTION_NAME. Why is
it? I think your idea to utilize all memory can be useful for other
applications too (not only lwIP package). - Right?

Now, back to our distressful CYGDAT_LWIP_NET_SECTION_NAME data option.
This option in fact should be equal CYGDAT_HAL_..._SECTION_NAME data,
if lwIP package has been added (active_if CYGPKG_NET_LWIP).

Just now I would not refer to Bug 1001114 here again if we just want to
get new lwIP option to manage the placement of memory pools, in fact, to
have a way for new definition, MEM_SECTION. Let's apply it and go ahead.

What do you/others think?

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (16 preceding siblings ...)
  2011-01-29 19:32 ` bugzilla-daemon
@ 2011-01-29 19:49 ` bugzilla-daemon
  2011-01-29 20:15 ` bugzilla-daemon
                   ` (36 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-29 19:49 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #15 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-29 19:48:52 GMT ---
(In reply to comment #13)
> Hi
> So far it is about the below,
> >   - Concatenation or plain strings?
> 
> I prefer the plain strings.

If we do not keep the other macros that depend on CYGDAT_LWIP_MEM_SECTION_NAME
then I'll be happy with plain strings. If we keep them then the concatenation
is a convenience.

Note: (my error in last CDL proposal) If we keep the macros,
CYGDAT_LWIP_MEM_SECTION_NAME can't have no_define flag.

> > IMO it would depend on resolution for section related macros proposed in
> > http://bugs.ecos.sourceware.org/attachment.cgi?id=1088 to Bug 1001114 . 
> > 
> > For reference, here is a digest of all code snippets as are in my current
> > build:
> 
> > -----------------
> > cdl_package CYGPKG_NET_LWIP {
> >       ...
> >         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 data
> >             calculated { "\"." . CYGDAT_LWIP_MEM_SECTION_NAME . "\"" }
> >             description "..."
> >         }
> >       ...
> > }
> 
> I dislike the above as the most users will be to see in CT a strange grayed
> data box like below:
> 
> - |__) Momory options
>        [ab] "Special memory section for lwIP buffers."    | ".0"
> 
> What's that ".0"? That's concatenation with an absent data.

Thanks for remarks, you're right, this is ugly and looks awkward.
A way to improve:

  calculated { CYGDAT_LWIP_MEM_SECTION_NAME ? 
             "\"." . CYGDAT_LWIP_MEM_SECTION_NAME . "\"" : "none" }

or equivalent with plain strings:

  calculated { CYGDAT_LWIP_MEM_SECTION_NAME ? 
             CYGDAT_LWIP_MEM_SECTION_NAME : "none" }

Note: Even if we end up with plain strings I would rather keep
CYGDAT_LWIP_MEM_SECTION data than bool. IMO "none" is rather descriptive.

Comments?

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (17 preceding siblings ...)
  2011-01-29 19:49 ` bugzilla-daemon
@ 2011-01-29 20:15 ` bugzilla-daemon
  2011-01-30 10:37 ` bugzilla-daemon
                   ` (35 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-29 20:15 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #16 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-29 20:14:59 GMT ---
It seem we've been working in parallel. You can skip my previous post (comment
#15).

(In reply to comment #14)
> Ilija, at the least I would stop on this
> 
> - lwip_net.cdl:
> 
>     cdl_option CYGSEM_LWIP_MEM_SECTION {
>         ...
>         flavor         bool
>         default_value  0
>         active_if      CYGDAT_LWIP_MEM_SECTION_NAME
>     ...
>     }
> 
> - lwipopts.h:
> 
> #if 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
> 
[SNIP]
> 
> It seems to me you can enter some generic CDL component, for example,
> component CYG{MEM, or HWR}_HAL_..._SECTION where you can manage also
> generic data option (HAL, !LWIP) CYGDAT_HAL_..._SECTION_NAME. Why is
> it? I think your idea to utilize all memory can be useful for other
> applications too (not only lwIP package). - Right?
> 
> Now, back to our distressful CYGDAT_LWIP_NET_SECTION_NAME data option.
> This option in fact should be equal CYGDAT_HAL_..._SECTION_NAME data,
> if lwIP package has been added (active_if CYGPKG_NET_LWIP).
> 
> Just now I would not refer to Bug 1001114 here again if we just want to
> get new lwIP option to manage the placement of memory pools, in fact, to
> have a way for new definition, MEM_SECTION. Let's apply it and go ahead.
> 
> What do you/others think?

You're right, let's decouple this bug from Bug 1001114 and go on.
Thanks for elaborate discussion.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (18 preceding siblings ...)
  2011-01-29 20:15 ` bugzilla-daemon
@ 2011-01-30 10:37 ` bugzilla-daemon
  2011-01-30 11:50 ` bugzilla-daemon
                   ` (34 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 10:37 UTC (permalink / raw)
  To: ecos-patches

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

Sergei Gavrikov <sergei.gavrikov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1094|0                           |1
        is obsolete|                            |

--- Comment #17 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 10:37:22 GMT ---
Created an attachment (id=1107)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1107)
lwip_tcpip: Enter MEM_SECTION entity

Ilija, here is a patch which makes obsolete Attachment 1094. 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.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (19 preceding siblings ...)
  2011-01-30 10:37 ` bugzilla-daemon
@ 2011-01-30 11:50 ` bugzilla-daemon
  2011-01-30 13:00 ` bugzilla-daemon
                   ` (33 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 11:50 UTC (permalink / raw)
  To: ecos-patches

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.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (20 preceding siblings ...)
  2011-01-30 11:50 ` bugzilla-daemon
@ 2011-01-30 13:00 ` bugzilla-daemon
  2011-01-30 13:53 ` bugzilla-daemon
                   ` (32 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 13:00 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #19 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 13:00:38 GMT ---
(In reply to comment #17 and in addition to comment #18)

Sergei

IMO it is a convenience to have the CYGOPT_LWIP_MEM_PLF_SPEC as a container for
Platform specific memory settings. It would contain CYGOPT_LWIP_MEM_SECTION and
can be declared parent by platform supplied options such as
CYGOPT_LWIP_MEM_SECTION_NAME. It will group CYGOPT_LWIP_MEM_SECTION and
CYGOPT_LWIP_MEM_SECTION_NAME in configtool view. 

     cdl_component CYGOPT_LWIP_MEM_PLF_SPEC {
          display "Platform/application specific memory settings"
          ...
          cdl_option CYGOPT_LWIP_MEM_SECTION {
          }
     }

    cdl_option CYGOPT_LWIP_MEM_SECTION_NAME {
         ...
         parent CYGOPT_LWIP_MEM_PLF_SPEC
    }

Tell me if you want me to produce a patch for review.

Ilija

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (21 preceding siblings ...)
  2011-01-30 13:00 ` bugzilla-daemon
@ 2011-01-30 13:53 ` bugzilla-daemon
  2011-01-30 14:57 ` bugzilla-daemon
                   ` (31 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 13:53 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #20 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 13:53:19 GMT ---
I am reviewing the memory objects subject to MEM_SECTION:

As stated by my original proposal they are:

  In src/core/mem.c
     ram_heap[];

  In src/core/memp.c
     memp_memory[];

  In src/ecos/sys_arch.c
     var_data[];
     stack_data[];

I have reconsidered stack_data[] as it is stack and not buffer/heap and now I
would NOT place it in MEM_SECTION.

Comments?

Should we add/remove something else?
Note: my tests due to limited memory (even with MEM_SECTION enabled) were
performed with simple mode that does not employ var_data[] and stack_data[]

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (22 preceding siblings ...)
  2011-01-30 13:53 ` bugzilla-daemon
@ 2011-01-30 14:57 ` bugzilla-daemon
  2011-01-30 16:01 ` bugzilla-daemon
                   ` (30 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 14:57 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #21 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 14:57:19 GMT ---
Ilija, tonight I will take a look on your latest points (I have some
comments) and let you know about.

Sergei

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (23 preceding siblings ...)
  2011-01-30 14:57 ` bugzilla-daemon
@ 2011-01-30 16:01 ` bugzilla-daemon
  2011-01-30 17:15 ` bugzilla-daemon
                   ` (29 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 16:01 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #22 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 16:01:24 GMT ---
Maybe this will be obsolete comment, but

(In reply to comment #18)
> (In reply to comment #17)
...
> > ... 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\""
> > };
> >
...
> 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
>           ...
>      }

I disagreed with above, as for the most targets we will see *grayed* and
*checked* box in CT:

  [x] Use additional memory section

To reduse mouse traffic you can use such a trick:

    cdl_option CYGOPT_LWIP_MEM_SECTION {
        ...
        default_value { is_substr(CYGDAT_LWIP_MEM_SECTION_NAME, ".") }
        active_if     CYGDAT_LWIP_MEM_SECTION_NAME

The box will be unchecked until booldata in your HAL (CYGDAT_.*_NAME) is not
proper section name. However, this was quickly tested only. 

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

[snip]

> Below is my test case for reference and review.
> 
> Please comment.

As you have another ideas (I've seen it in your next comment), I cut the
snippets and does not comment it here.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (24 preceding siblings ...)
  2011-01-30 16:01 ` bugzilla-daemon
@ 2011-01-30 17:15 ` bugzilla-daemon
  2011-01-30 17:39 ` bugzilla-daemon
                   ` (28 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 17:15 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #23 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 17:15:31 GMT ---
(In reply to comment #19)
...
> IMO it is a convenience to have the CYGOPT_LWIP_MEM_PLF_SPEC as a container

[snip]

Why not? It seems, it makes sense.

> Tell me if you want me to produce a patch for review.
> 
> Ilija

Ilija, no need, I will fix it in my local patch queue and then upload it after
testing (it is more easy to me than re-diff new one :-)

Sergei

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (25 preceding siblings ...)
  2011-01-30 17:15 ` bugzilla-daemon
@ 2011-01-30 17:39 ` bugzilla-daemon
  2011-01-30 18:43 ` bugzilla-daemon
                   ` (27 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 17:39 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #24 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 17:38:53 GMT ---
(In reply to comment #22)
> Maybe this will be obsolete comment, but
> 
> (In reply to comment #18)
> > (In reply to comment #17)
> > Therefore i would prefer something that will not depend on ECM. One way is:
> > 
> >      cdl_option CYGOPT_LWIP_MEM_SECTION {
> >           ...
> >           default_value 1
> >           ...
> >      }
> 
> I disagreed with above, as for the most targets we will see *grayed* and
> *checked* box in CT:
> 
>   [x] Use additional memory section
> 
> To reduse mouse traffic you can use such a trick:
> 
>     cdl_option CYGOPT_LWIP_MEM_SECTION {
>         ...
>         default_value { is_substr(CYGDAT_LWIP_MEM_SECTION_NAME, ".") }
>         active_if     CYGDAT_LWIP_MEM_SECTION_NAME
> 
> The box will be unchecked until booldata in your HAL (CYGDAT_.*_NAME) is not
> proper section name. However, this was quickly tested only. 

I have noticed it, but I allowed to occur it since I have seen similar behavior
in some other CDLs.

Actually I tried something similar

     cdl_option CYGOPT_LWIP_MEM_SECTION {
         ...
         default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
         active_if     CYGDAT_LWIP_MEM_SECTION_NAME

But I'm not sure if it depends on the order the packages are processed/applied.
FYI it worked for my test case (select default template then add lwip).

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (26 preceding siblings ...)
  2011-01-30 17:39 ` bugzilla-daemon
@ 2011-01-30 18:43 ` bugzilla-daemon
  2011-01-30 19:22 ` bugzilla-daemon
                   ` (26 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 18:43 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #25 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 18:43:30 GMT ---
(In reply to comment #24)
> (In reply to comment #22)
> > Maybe this will be obsolete comment, but
> > 
> > (In reply to comment #18)
> > > (In reply to comment #17)
> > > Therefore i would prefer something that will not depend on ECM. One way
> > > is:
> > > 
> > >      cdl_option CYGOPT_LWIP_MEM_SECTION {
> > >           ...
> > >           default_value 1
> > >           ...
> > >      }
> > 
> > I disagreed with above, as for the most targets we will see *grayed* and
> > *checked* box in CT:
> > 
> >   [x] Use additional memory section
> > 
> > To reduse mouse traffic you can use such a trick:
> > 
> >     cdl_option CYGOPT_LWIP_MEM_SECTION {
> >         ...
> >         default_value { is_substr(CYGDAT_LWIP_MEM_SECTION_NAME, ".") }
> >         active_if     CYGDAT_LWIP_MEM_SECTION_NAME
> > 
> > The box will be unchecked until booldata in your HAL (CYGDAT_.*_NAME) is
> > not proper section name. However, this was quickly tested only. 
> 
> I have noticed it, but I allowed to occur it since I have seen similar
> behavior in some other CDLs.

Ilija, I have managed this with:

    cdl_component CYGOPT_LWIP_MEM_PLF_SPEC {
        display         "Platform specific memory setting"
        flavor          none
        no_define

        cdl_option CYGOPT_LWIP_MEM_SECTION {
            display         "Use additional memory section"
            flavor          bool
            calculated      { CYGDAT_LWIP_MEM_SECTION_NAME && \
                 is_substr(CYGDAT_LWIP_MEM_SECTION_NAME, ".") }
            active_if       CYGDAT_LWIP_MEM_SECTION_NAME
        ...

But the difficulty to read/understand came back :-) However, it checks
that NAME is string and at the least it looks like section name.

> Actually I tried something similar
> 
>      cdl_option CYGOPT_LWIP_MEM_SECTION {
>          ...
>          default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
>          active_if     CYGDAT_LWIP_MEM_SECTION_NAME

I will try it in CT.

> But I'm not sure if it depends on the order the packages are processed/
> applied. FYI it worked for my test case (select default template then add
> lwip).

Ilija, I tested builds/configure for the below

lwip_net.cdl:
----
    cdl_component CYGOPT_LWIP_MEM_PLF_SPEC {
        display         "Platform specific memory setting"
        flavor          none
        no_define

        cdl_option CYGOPT_LWIP_MEM_SECTION {
            display         "Use additional memory section"
            flavor          bool
            calculated      { CYGDAT_LWIP_MEM_SECTION_NAME && \
                 is_substr(CYGDAT_LWIP_MEM_SECTION_NAME, ".") }
            active_if       CYGDAT_LWIP_MEM_SECTION_NAME
        ### ... ###
    }
    }

hal_..._foo.cdl
----
    ### For test purposes ###
    cdl_option CYGHWR_HAL_MEM_SECTION_NAME {
        flavor         data
    # FIXME:
        default_value  { "\".2ram.foo\"" }
        legal_values   { "\".2ram.foo\"" "\".2ram.bar\"" }
    ### ... ###
    }

    ### For test purposes ###
    cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
        display        "Memory section attribute name"
        parent         CYGOPT_LWIP_MEM_PLF_SPEC
        active_if      CYGPKG_NET_LWIP
        flavor         booldata
        default_value  { CYGHWR_HAL_MEM_SECTION_NAME } 
    ### ... ###
    }

But I myself have argued for simplicity. Can you try it on your target?

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (27 preceding siblings ...)
  2011-01-30 18:43 ` bugzilla-daemon
@ 2011-01-30 19:22 ` bugzilla-daemon
  2011-01-30 20:12 ` bugzilla-daemon
                   ` (25 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 19:22 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #26 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 19:22:29 GMT ---
(In reply to comment #25)
> (In reply to comment #24)
> > (In reply to comment #22)

[snip]

> > > The box will be unchecked until booldata in your HAL (CYGDAT_.*_NAME)
> > > is not proper section name. However, this was quickly tested only. 
> > 
> > I have noticed it, but I allowed to occur it since I have seen similar
> > behavior in some other CDLs.
>  
> Ilija, I have managed this with:

[snip]

> But the difficulty to read/understand came back :-) However, it checks
> that NAME is string and at the least it looks like section name.
> 
> > Actually I tried something similar
> > 
> >      cdl_option CYGOPT_LWIP_MEM_SECTION {
> >          ...
> >          default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
> >          active_if     CYGDAT_LWIP_MEM_SECTION_NAME
>  
> I will try it in CT.

Ilija, I have tested it and it looks for me like "golden mean".

> > But I'm not sure if it depends on the order the packages are processed/
> > applied.  FYI it worked for my test case (select default template then
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              It's important to me and I would stay on it.

> > add lwip).

[snip]

> But I myself have argued for simplicity.

This is strong argument :-)

> Can you try it on your target?
  ^^^^^^^^^^^^^^
  Please, forget it.

Well, let's stop on this point of survey. What do you think?

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (28 preceding siblings ...)
  2011-01-30 19:22 ` bugzilla-daemon
@ 2011-01-30 20:12 ` bugzilla-daemon
  2011-01-30 20:54 ` bugzilla-daemon
                   ` (24 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 20:12 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #27 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 20:11:49 GMT ---
(In reply to comment #26)
> (In reply to comment #25)
> > (In reply to comment #24)
> > > (In reply to comment #22)
> 
> [snip]
> 
> > > > The box will be unchecked until booldata in your HAL (CYGDAT_.*_NAME)
> > > > is not proper section name. However, this was quickly tested only. 
> > > 
> > > I have noticed it, but I allowed to occur it since I have seen similar
> > > behavior in some other CDLs.
> >  
> > Ilija, I have managed this with:
> 
> [snip]
> 
> > But the difficulty to read/understand came back :-) However, it checks
> > that NAME is string and at the least it looks like section name.
> > 
> > > Actually I tried something similar
> > > 
> > >      cdl_option CYGOPT_LWIP_MEM_SECTION {
> > >          ...
> > >          default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
> > >          active_if     CYGDAT_LWIP_MEM_SECTION_NAME
> >  
> > I will try it in CT.
> 
> Ilija, I have tested it and it looks for me like "golden mean".
> 
> > > But I'm not sure if it depends on the order the packages are processed/
> > > applied.  FYI it worked for my test case (select default template then
>               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>               It's important to me and I would stay on it.
> 
> > > add lwip).
> 
> [snip]
> 
> > But I myself have argued for simplicity.
> 
> This is strong argument :-)
> 
> > Can you try it on your target?
>   ^^^^^^^^^^^^^^
>   Please, forget it.
> 
> Well, let's stop on this point of survey. What do you think?

Seems we came to conclusion. As I understand CYGSEM_LWIP_MEM_SECTION_NAME is
not in 2 steps (with CYGHWR_HAL_MEM_SECTION_NAME) but simple as before, only
enclosed in CYGOPT_LWIP_MEM_PLF_SPEC.

Something like this?

--- lwip_net.tcl ---

    cdl_component CYGOPT_LWIP_MEM_PLF_SPEC {
        display         "Platform specific memory setting"
        flavor          none
        no_define  
        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 "..."
       }
   }

--- hal...cdl example---

    cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
        flavor data
        active_if CYGPKG_NET_LWIP
        parent CYGOPT_LWIP_MEM_PLF_SPEC
        default_value { "\".ahb_bss\"" }
        legal_values { "\".ahb_bss\"" "\".ahb_0\"" }
        display "Memory section for lwIP buffers."
        description " ... Sections are provided by LPC17xx platform HAL." 
    }

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (29 preceding siblings ...)
  2011-01-30 20:12 ` bugzilla-daemon
@ 2011-01-30 20:54 ` bugzilla-daemon
  2011-01-30 21:37 ` bugzilla-daemon
                   ` (23 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 20:54 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #28 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 20:54:22 GMT ---
(In reply to comment #27)
> (In reply to comment #26)
> > Well, let's stop on this point of survey. What do you think?
> 
> Seems we came to conclusion. As I understand CYGSEM_LWIP_MEM_SECTION_NAME is
> not in 2 steps (with CYGHWR_HAL_MEM_SECTION_NAME) but simple as before, only
> enclosed in CYGOPT_LWIP_MEM_PLF_SPEC.

I've used "two step" in tested HAL (data option for HWR name and booldata for
LWIP name), but, it's your choice, and "one step" boolean option in lwip CDL:
there was CYGOPT_LWIP_MEM_SECTION in the container CYGOPT_LWIP_MEM_PLF_SPEC 
(See my comment #25) But that was before our "conclusion".

> Something like this?
> 
> --- lwip_net.tcl ---
> 
>     cdl_component CYGOPT_LWIP_MEM_PLF_SPEC {
>         display         "Platform specific memory setting"
>         flavor          none
>         no_define  
>         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 "..."
>        }
>    }

Ups, as I could understand your latest thing was

    default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
    active_if     CYGDAT_LWIP_MEM_SECTION_NAME

I'm starting to hate patch-review througout $BROWSER, I am again in a mess. Do
you *tested* this

    cdl_option CYGOPT_LWIP_MEM_SECTION {
        default_value 1
        active_if CYGDAT_LWIP_MEM_SECTION_NAME

or this one

    cdl_option CYGOPT_LWIP_MEM_SECTION {
        default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
        active_if     CYGDAT_LWIP_MEM_SECTION_NAME

Ilija, please, attach your latest and *tested* patch for review.

> --- hal...cdl example---
> 
>     cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
>         flavor data
>         active_if CYGPKG_NET_LWIP
>         parent CYGOPT_LWIP_MEM_PLF_SPEC
>         default_value { "\".ahb_bss\"" }
>         legal_values { "\".ahb_bss\"" "\".ahb_0\"" }
>         display "Memory section for lwIP buffers."
>         description " ... Sections are provided by LPC17xx platform HAL." 
>     }

I see you prefer "one step" assigned, this is your choice and this for
Bugzilla 1001114.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (30 preceding siblings ...)
  2011-01-30 20:54 ` bugzilla-daemon
@ 2011-01-30 21:37 ` bugzilla-daemon
  2011-01-30 21:38 ` bugzilla-daemon
                   ` (22 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 21:37 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #29 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 21:37:07 GMT ---
Created an attachment (id=1108)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1108)
lwip_tcpip: latest diff (for reference only)

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (31 preceding siblings ...)
  2011-01-30 21:37 ` bugzilla-daemon
@ 2011-01-30 21:38 ` bugzilla-daemon
  2011-01-30 21:42 ` bugzilla-daemon
                   ` (21 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 21:38 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #30 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 21:38:38 GMT ---
Created an attachment (id=1109)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1109)
hal: cdl snippet (for reference only)

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (32 preceding siblings ...)
  2011-01-30 21:38 ` bugzilla-daemon
@ 2011-01-30 21:42 ` bugzilla-daemon
  2011-01-30 21:53 ` bugzilla-daemon
                   ` (20 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 21:42 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #31 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 21:42:39 GMT ---
Ilija, I attached my latest things (for reference)

-  Attachment 1108
-  Attachment 1109

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (33 preceding siblings ...)
  2011-01-30 21:42 ` bugzilla-daemon
@ 2011-01-30 21:53 ` bugzilla-daemon
  2011-01-30 22:12 ` bugzilla-daemon
                   ` (19 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 21:53 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #32 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 21:53:11 GMT ---
(In reply to comment #28)
> (In reply to comment #27)
> > (In reply to comment #26)
> > > Well, let's stop on this point of survey. What do you think?
> > 
[snip]
> > Something like this?
> > 
> > --- lwip_net.tcl ---
> > 
> >     cdl_component CYGOPT_LWIP_MEM_PLF_SPEC {
> >         display         "Platform specific memory setting"
> >         flavor          none
> >         no_define  
> >         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 "..."
> >        }
> >    }
> 
> Ups, as I could understand your latest thing was
> 
>     default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
>     active_if     CYGDAT_LWIP_MEM_SECTION_NAME

Yes this is it. Sorry :( I pasted wrong snippet.

> I'm starting to hate patch-review througout $BROWSER, I am again in a mess. Do
> you *tested* this
> 
>     cdl_option CYGOPT_LWIP_MEM_SECTION {
>         default_value 1
>         active_if CYGDAT_LWIP_MEM_SECTION_NAME
> 
> or this one
> 
>     cdl_option CYGOPT_LWIP_MEM_SECTION {
>         default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
>         active_if     CYGDAT_LWIP_MEM_SECTION_NAME

I tested both, both work but the second one looks more appropriate in
configtool.

> Ilija, please, attach your latest and *tested* patch for review.
> 

Here it is, this time from editor. I deleted description from
CYGSEM_LWIP_MEM_SECTION since in your patch you have better.

--- lwip_net.cdl ---

    cdl_component CYGOPT_LWIP_MEM_PLF_SPEC {
        flavor none
        display "Platform/application specific memory settings"
        description "Platform or application specific settings such as
                     special memory section and memory constrains."

        cdl_option CYGSEM_LWIP_MEM_SECTION {
            display "Place lwIP buffers and heap in special memory section."
            flavor bool
            default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
            active_if  CYGDAT_LWIP_MEM_SECTION_NAME
            description "..."
        }                
    }

--- hal...cdl example (this was correct in previous post) ---

     cdl_option CYGDAT_LWIP_MEM_SECTION_NAME {
         flavor data
         active_if CYGPKG_NET_LWIP
         parent CYGOPT_LWIP_MEM_PLF_SPEC
         default_value { "\".ahb_bss\"" }
         legal_values { "\".ahb_bss\"" "\".ahb_0\"" }
         display "Memory section for lwIP buffers."
         description " ... Sections are provided by LPC17xx platform HAL." 
     }

--- lwipopts.h (just for completness) ----

#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

-----------------------

> I see you prefer "one step" assigned, this is your choice and this for
> Bugzilla 1001114.

Yes. If we do not need concatenation, let's keep it simple.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (34 preceding siblings ...)
  2011-01-30 21:53 ` bugzilla-daemon
@ 2011-01-30 22:12 ` bugzilla-daemon
  2011-01-30 22:26 ` bugzilla-daemon
                   ` (18 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 22:12 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #33 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 22:12:11 GMT ---
(In reply to comment #31)
> Ilija, I attached my latest things (for reference)
> 
> -  Attachment 1108 [details]
> -  Attachment 1109 [details]

In meantime I posted requested clarification. I can see you are working 2
options. I would prefer 2nd as simpler.

I can see you have already removed stack_data[], tnx.

What do you mean about var_data[]?
I am kind of undecided. Somebody else's opinion is welcome.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (35 preceding siblings ...)
  2011-01-30 22:12 ` bugzilla-daemon
@ 2011-01-30 22:26 ` bugzilla-daemon
  2011-01-30 22:37 ` bugzilla-daemon
                   ` (17 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 22:26 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #34 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-30 22:26:12 GMT ---
(In reply to comment #32)

> >     cdl_option CYGOPT_LWIP_MEM_SECTION {
> >         default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
> >         active_if     CYGDAT_LWIP_MEM_SECTION_NAME

> I tested both, both work but the second one looks more appropriate in
> configtool.

Then I apply your latest (above)

     default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
     active_if     CYGDAT_LWIP_MEM_SECTION_NAME

and this (below)

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

for my diff. Thank you for clarification and collaboration.

(In reply to comment #33)

> What do you mean about var_data[]?

It will be food for though for tommorow.

> I am kind of undecided. Somebody else's opinion is welcome.
                          ^^^^^^^^
                          That would be fine. John, if you read, what
                          is your opinion?

I hope this will be the last "pitstop".

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (36 preceding siblings ...)
  2011-01-30 22:26 ` bugzilla-daemon
@ 2011-01-30 22:37 ` bugzilla-daemon
  2011-01-31  8:52 ` bugzilla-daemon
                   ` (16 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-30 22:37 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #35 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-30 22:37:02 GMT ---
(In reply to comment #34)
> (In reply to comment #32)
> 

> 
> Then I apply your latest (above)
> 
>      default_value is_active(CYGDAT_LWIP_MEM_SECTION_NAME)
>      active_if     CYGDAT_LWIP_MEM_SECTION_NAME
> 
> and this (below)
> 
> > #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
> 
> for my diff. Thank you for clarification and collaboration.

Thanks for your effort Sergei. And sorry if I have ruined your weekend.

> 
> (In reply to comment #33)
> 
> > What do you mean about var_data[]?
> 
> It will be food for though for tommorow.

Take your time. 

> 
> > I am kind of undecided. Somebody else's opinion is welcome.
>                           ^^^^^^^^
>                           That would be fine. John, if you read, what
>                           is your opinion?
> 
> I hope this will be the last "pitstop".

Me too.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (37 preceding siblings ...)
  2011-01-30 22:37 ` bugzilla-daemon
@ 2011-01-31  8:52 ` bugzilla-daemon
  2011-01-31  9:11 ` bugzilla-daemon
                   ` (15 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31  8:52 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #36 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 08:51:53 GMT ---
(In reply to comment #35)

[snip]

> > > What do you mean about var_data[]?
> > 
> > It will be food for though for tommorow.

Personally mine. So far, I would remove it from MEM_SECTION scope

- as default size of CYGNUM_LWIP_VARMEMPOOL_SIZE is 2K (it is suitable for ~ 8
  x ((sizeof(cyg_sem_t)+sizeof(cyg_mbox)+sizeof(cyg_thread)) entities. So, it
  can be reduced to 1K via lwIP CDL. I do not belive that low memory footprint
  systems able to use 8 threads.

- as source is ecos/sys_arch.c (no lwIP core), we always can revise it without
  a pain.

If you agree with me, I can attach the final patch to sync our survey.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (38 preceding siblings ...)
  2011-01-31  8:52 ` bugzilla-daemon
@ 2011-01-31  9:11 ` bugzilla-daemon
  2011-01-31  9:56 ` bugzilla-daemon
                   ` (14 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31  9:11 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #37 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-31 09:10:41 GMT ---
(In reply to comment #36)
> (In reply to comment #35)
> 
> [snip]
> 
> > > > What do you mean about var_data[]?
> > > 
> > > It will be food for though for tommorow.
> 
> Personally mine. So far, I would remove it from MEM_SECTION scope
> 
> - as default size of CYGNUM_LWIP_VARMEMPOOL_SIZE is 2K (it is suitable for ~ 8
>   x ((sizeof(cyg_sem_t)+sizeof(cyg_mbox)+sizeof(cyg_thread)) entities. So, it
>   can be reduced to 1K via lwIP CDL. I do not belive that low memory footprint
>   systems able to use 8 threads.
> 
> - as source is ecos/sys_arch.c (no lwIP core), we always can revise it without
>   a pain.
> 
> If you agree with me, I can attach the final patch to sync our survey.

I agree. You can remove it and carry on.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (39 preceding siblings ...)
  2011-01-31  9:11 ` bugzilla-daemon
@ 2011-01-31  9:56 ` bugzilla-daemon
  2011-01-31 10:00 ` bugzilla-daemon
                   ` (13 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31  9:56 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #38 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 09:56:14 GMT ---
Created an attachment (id=1110)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1110)
lwip_tcpip.diff

lwip_tcpip: Enter MEM_SECTION entiry

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (40 preceding siblings ...)
  2011-01-31  9:56 ` bugzilla-daemon
@ 2011-01-31 10:00 ` bugzilla-daemon
  2011-01-31 11:07 ` bugzilla-daemon
                   ` (12 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 10:00 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #39 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 10:00:02 GMT ---
Ilija, this is (Attachment 1110) final patch.

 ChangeLog          |    7 +++++++
 cdl/lwip_net.cdl   |   27 +++++++++++++++++++++++++++
 include/lwipopts.h |    8 ++++++++
 src/core/mem.c     |    2 +-
 src/core/memp.c    |    2 +-
 5 files changed, 44 insertions(+), 2 deletions(-)

Let me know if it is good for you.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (41 preceding siblings ...)
  2011-01-31 10:00 ` bugzilla-daemon
@ 2011-01-31 11:07 ` bugzilla-daemon
  2011-01-31 12:00 ` bugzilla-daemon
                   ` (11 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 11:07 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #40 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-31 11:06:59 GMT ---
(In reply to comment #39)
> Ilija, this is (Attachment 1110 [details]) final patch.
> 
>  ChangeLog          |    7 +++++++
>  cdl/lwip_net.cdl   |   27 +++++++++++++++++++++++++++
>  include/lwipopts.h |    8 ++++++++
>  src/core/mem.c     |    2 +-
>  src/core/memp.c    |    2 +-
>  5 files changed, 44 insertions(+), 2 deletions(-)
> 
> Let me know if it is good for you.

Patch applied on eCos repo. and tested with LPC-1766-STK.
Appears in configtool, compiles and runs as expected.
Many thanks Sergei.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (42 preceding siblings ...)
  2011-01-31 11:07 ` bugzilla-daemon
@ 2011-01-31 12:00 ` bugzilla-daemon
  2011-01-31 17:06 ` bugzilla-daemon
                   ` (10 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 12:00 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #41 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 11:59:50 GMT ---
Ilija, thanks for your contribution, testing, and patience. Tonight,
I'll pull the patch into AnonCVS.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (43 preceding siblings ...)
  2011-01-31 12:00 ` bugzilla-daemon
@ 2011-01-31 17:06 ` bugzilla-daemon
  2011-01-31 17:39 ` bugzilla-daemon
                   ` (9 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 17:06 UTC (permalink / raw)
  To: ecos-patches

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

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned@bugs.ecos.source |sergei.gavrikov@gmail.com
                   |ware.org                    |

--- Comment #42 from John Dallaway <john@dallaway.org.uk> 2011-01-31 17:05:47 GMT ---
(In reply to comment #34)

> > I am kind of undecided. Somebody else's opinion is welcome.
>                           ^^^^^^^^
>                           That would be fine. John, if you read, what
>                           is your opinion?

Sergei, is this about whether to place var_data[] in peripheral memory or to
keep it in main memory? Is there something different about this array relative
to those you are definitely moving to peripheral memory?

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (44 preceding siblings ...)
  2011-01-31 17:06 ` bugzilla-daemon
@ 2011-01-31 17:39 ` bugzilla-daemon
  2011-01-31 18:16 ` bugzilla-daemon
                   ` (8 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 17:39 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #43 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-31 17:39:04 GMT ---
(In reply to comment #42)
> (In reply to comment #34)
> 
> > > I am kind of undecided. Somebody else's opinion is welcome.
> >                           ^^^^^^^^
> >                           That would be fine. John, if you read, what
> >                           is your opinion?
> 
> Sergei, is this about whether to place var_data[] in peripheral memory or to
> keep it in main memory? Is there something different about this array relative
> to those you are definitely moving to peripheral memory?

John,

The ones moved to peripheral memory are: memp_memory[] and ram_heap[] i.e.
arrays from which lwip allocates memory for pbufs, etc. It is what would
typically peripheral (hardware) do.

var_data[] on the other hand contains thread related data (not buffers).

At the beginning I wanted to save as much as possible, but later as I had
gained some insight I have reconsidered my view.

Other difference is that var_data[] is used in sequential mode which is not
very likely used on devices with low memory.

Please refer to comment #36 and comment #37 for our further conversation with
Sergei.

Thanks for your consideration
Ilija

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (45 preceding siblings ...)
  2011-01-31 17:39 ` bugzilla-daemon
@ 2011-01-31 18:16 ` bugzilla-daemon
  2011-01-31 18:32 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 18:16 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #44 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 18:16:42 GMT ---
(In reply to comment #43)
> (In reply to comment #42)
> > (In reply to comment #34)
> > 
> > > > I am kind of undecided. Somebody else's opinion is welcome.
> > >                           ^^^^^^^^ That would be fine. John, if
> > >                           you read, what is your opinion?
> > 
> > Sergei, is this about whether to place var_data[] in peripheral
> > memory or to keep it in main memory? Is there something different
> > about this array relative to those you are definitely moving to
> > peripheral memory?
> 
> John,
> 
> The ones moved to peripheral memory are: memp_memory[] and ram_heap[]
> i.e.  arrays from which lwip allocates memory for pbufs, etc. It is
> what would typically peripheral (hardware) do.
> 
> var_data[] on the other hand contains thread related data (not
> buffers).
> 
> At the beginning I wanted to save as much as possible, but later as I
> had gained some insight I have reconsidered my view.
> 
> Other difference is that var_data[] is used in sequential mode which
> is not very likely used on devices with low memory.
> 
> Please refer to comment #36 and comment #37 for our further
> conversation with Sergei.
> 
> Thanks for your consideration
> Ilija

I'm sorry, I was AFK. John, if you have doubts about that voluntary
reject those varibales from peripherial room (src/ecos/sys_arch.c:
stack_data[] and var_data[]), let us know, please, I pend a commit. We
discussed that a bit with Ilija and decided do not touch sys_arch.c.

Sergei

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (46 preceding siblings ...)
  2011-01-31 18:16 ` bugzilla-daemon
@ 2011-01-31 18:32 ` bugzilla-daemon
  2011-01-31 18:34 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 18:32 UTC (permalink / raw)
  To: ecos-patches

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

Sergei Gavrikov <sergei.gavrikov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1107|0                           |1
        is obsolete|                            |

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (47 preceding siblings ...)
  2011-01-31 18:32 ` bugzilla-daemon
@ 2011-01-31 18:34 ` bugzilla-daemon
  2011-01-31 18:34 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 18:34 UTC (permalink / raw)
  To: ecos-patches

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

Sergei Gavrikov <sergei.gavrikov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1108|1                           |0
           is patch|                            |
   Attachment #1108|0                           |1
        is obsolete|                            |

--- Comment #45 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 18:33:57 GMT ---
(From update of attachment 1108)
Mark as obsolete

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (48 preceding siblings ...)
  2011-01-31 18:34 ` bugzilla-daemon
@ 2011-01-31 18:34 ` bugzilla-daemon
  2011-01-31 18:59 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 18:34 UTC (permalink / raw)
  To: ecos-patches

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

Sergei Gavrikov <sergei.gavrikov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1109|0                           |1
        is obsolete|                            |

--- Comment #46 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 18:34:31 GMT ---
(From update of attachment 1109)
Mark as obsolete

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (49 preceding siblings ...)
  2011-01-31 18:34 ` bugzilla-daemon
@ 2011-01-31 18:59 ` bugzilla-daemon
  2011-01-31 20:14 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 18:59 UTC (permalink / raw)
  To: ecos-patches

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

Ilija Kocho <ilijak@siva.com.mk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1095|0                           |1
        is obsolete|                            |

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (50 preceding siblings ...)
  2011-01-31 18:59 ` bugzilla-daemon
@ 2011-01-31 20:14 ` bugzilla-daemon
  2011-01-31 21:55 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 20:14 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #47 from John Dallaway <john@dallaway.org.uk> 2011-01-31 20:13:48 GMT ---
(In reply to comment #44)

> I'm sorry, I was AFK. John, if you have doubts about that voluntary
> reject those varibales from peripherial room (src/ecos/sys_arch.c:
> stack_data[] and var_data[]), let us know, please, I pend a commit. We
> discussed that a bit with Ilija and decided do not touch sys_arch.c.

Sergei, no problem. It looks like the issue is now a non-issue.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (51 preceding siblings ...)
  2011-01-31 20:14 ` bugzilla-daemon
@ 2011-01-31 21:55 ` bugzilla-daemon
  2011-01-31 21:57 ` bugzilla-daemon
  2011-01-31 22:02 ` bugzilla-daemon
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 21:55 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #48 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 21:55:10 GMT ---
Checked-in.  Ilija, thanks for contribution.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (52 preceding siblings ...)
  2011-01-31 21:55 ` bugzilla-daemon
@ 2011-01-31 21:57 ` bugzilla-daemon
  2011-01-31 22:02 ` bugzilla-daemon
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 21:57 UTC (permalink / raw)
  To: ecos-patches

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

Sergei Gavrikov <sergei.gavrikov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |CURRENTRELEASE

--- Comment #49 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-31 21:57:38 GMT ---
Mark as RESOLVED as Attachment 1110 pulled-in AnonCVS.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Bug 1001116] Instruct lwIP to use special section for buffers and heap.
       [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
                   ` (53 preceding siblings ...)
  2011-01-31 21:57 ` bugzilla-daemon
@ 2011-01-31 22:02 ` bugzilla-daemon
  54 siblings, 0 replies; 55+ messages in thread
From: bugzilla-daemon @ 2011-01-31 22:02 UTC (permalink / raw)
  To: ecos-patches

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

--- Comment #50 from Ilija Kocho <ilijak@siva.com.mk> 2011-01-31 22:02:07 GMT ---
(In reply to comment #48)
> Checked-in.  Ilija, thanks for contribution.

Sergei, many thanks for your effort and patience.

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

^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2011-01-31 22:02 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-1001116-104@http.bugs.ecos.sourceware.org/>
2011-01-16  8:53 ` [Bug 1001116] Instruct lwIP to use special section for buffers and heap bugzilla-daemon
2011-01-16 19:53 ` bugzilla-daemon
2011-01-16 21:11 ` bugzilla-daemon
2011-01-17  9:47 ` bugzilla-daemon
2011-01-18  1:43 ` bugzilla-daemon
2011-01-18  2:00 ` bugzilla-daemon
2011-01-22 18:15 ` bugzilla-daemon
2011-01-22 18:21 ` bugzilla-daemon
2011-01-22 22:06 ` bugzilla-daemon
2011-01-24 12:46 ` bugzilla-daemon
2011-01-26 20:15 ` bugzilla-daemon
2011-01-27 18:54 ` bugzilla-daemon
2011-01-28 12:26 ` bugzilla-daemon
2011-01-28 17:52 ` bugzilla-daemon
2011-01-29 12:51 ` bugzilla-daemon
2011-01-29 14:54 ` bugzilla-daemon
2011-01-29 19:32 ` bugzilla-daemon
2011-01-29 19:49 ` bugzilla-daemon
2011-01-29 20:15 ` bugzilla-daemon
2011-01-30 10:37 ` bugzilla-daemon
2011-01-30 11:50 ` bugzilla-daemon
2011-01-30 13:00 ` bugzilla-daemon
2011-01-30 13:53 ` bugzilla-daemon
2011-01-30 14:57 ` bugzilla-daemon
2011-01-30 16:01 ` bugzilla-daemon
2011-01-30 17:15 ` bugzilla-daemon
2011-01-30 17:39 ` bugzilla-daemon
2011-01-30 18:43 ` bugzilla-daemon
2011-01-30 19:22 ` bugzilla-daemon
2011-01-30 20:12 ` bugzilla-daemon
2011-01-30 20:54 ` bugzilla-daemon
2011-01-30 21:37 ` bugzilla-daemon
2011-01-30 21:38 ` bugzilla-daemon
2011-01-30 21:42 ` bugzilla-daemon
2011-01-30 21:53 ` bugzilla-daemon
2011-01-30 22:12 ` bugzilla-daemon
2011-01-30 22:26 ` bugzilla-daemon
2011-01-30 22:37 ` bugzilla-daemon
2011-01-31  8:52 ` bugzilla-daemon
2011-01-31  9:11 ` bugzilla-daemon
2011-01-31  9:56 ` bugzilla-daemon
2011-01-31 10:00 ` bugzilla-daemon
2011-01-31 11:07 ` bugzilla-daemon
2011-01-31 12:00 ` bugzilla-daemon
2011-01-31 17:06 ` bugzilla-daemon
2011-01-31 17:39 ` bugzilla-daemon
2011-01-31 18:16 ` bugzilla-daemon
2011-01-31 18:32 ` bugzilla-daemon
2011-01-31 18:34 ` bugzilla-daemon
2011-01-31 18:34 ` bugzilla-daemon
2011-01-31 18:59 ` bugzilla-daemon
2011-01-31 20:14 ` bugzilla-daemon
2011-01-31 21:55 ` bugzilla-daemon
2011-01-31 21:57 ` bugzilla-daemon
2011-01-31 22:02 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).