This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: place thread stack into CCM memory on STM32
- From: Sergei Gavrikov <sergei dot gavrikov at gmail dot com>
- To: Oleg Uzenkov <o dot uzenkov at unicore dot co dot ua>
- Cc: eCos Discussion <ecos-discuss at sourceware dot org>
- Date: Fri, 17 Oct 2014 17:25:22 +0300 (FET)
- Subject: Re: place thread stack into CCM memory on STM32
- Authentication-results: sourceware.org; auth=none
- References: <543FCF93 dot 4090209 at unicore dot co dot ua> <54410554 dot 5040001 at unicore dot co dot ua>
On Fri, 17 Oct 2014, Oleg Uzenkov wrote:
> Ok, it appears that it is possible to specify
> __attribute__((section("<name>"))) for class's member methods.
Really?
https://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html says
You may use the section attribute with initialized or uninitialized
global variables.
IMO, your C++ style (rejected) is not very good. Look, please, on the
eCos kernel's tests in C++ (those *.cxx tests are examples to follow).
In a fact that C++ coding style is something likes EC++. I would say it
is Embedded C++ style from eCos gurus.
Find kernel/current/tests/testaux.hxx and tests/*.cxx code.
On 64K aside. I would try to "move" eCos heap (__heap1) in .ccm segment.
Then all dynamic stuff will be live in .ccm segment. Benefits: 1) you
will get more space for eCos program (code+data) ~120K; 2) you will get
64K room for all dynamically allocated objects (just allocate the
buffers for thread's stacks); 3) no mess with 'section' attribute.
Drawback(s): 1) if you won't use 'new' or 'malloc' (will you?) then .ccm
will be waste. I seems for me (not tested, I have no STM target) you have
only to re-define the heap's size in mlt*h (set it 64K) and move __heap1
label in mlt*ldi (put __heap1 after .ccm section). Well, this is just an
idea, perhaps, I miss something and it will not work, but you can try
it.
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss