From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15643 invoked by alias); 16 Oct 2014 14:01:03 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 15625 invoked by uid 89); 16 Oct 2014 14:01:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_20,RCVD_IN_SORBS_WEB autolearn=no version=3.3.2 X-HELO: xm21.hostsila.net Received: from xm21.hostsila.net (HELO xm21.hostsila.net) (80.91.189.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 16 Oct 2014 14:00:57 +0000 Received: from [195.20.130.1] (port=37497 helo=[10.1.7.235]) by xm21.hostsila.net with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1Xeld7-002vtv-Ms for ecos-discuss@sourceware.org; Thu, 16 Oct 2014 17:02:13 +0300 Message-ID: <543FCF93.4090209@unicore.co.ua> Date: Thu, 16 Oct 2014 14:01:00 -0000 From: Oleg Uzenkov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: eCos Discussion Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Get-Message-Sender-Via: xm21.hostsila.net: authenticated_id: o.uzenkov@unicore.co.ua X-IsSubscribed: yes Subject: [ECOS] place thread stack into CCM memory on STM32 X-SW-Source: 2014-10/txt/msg00024.txt.bz2 Hi Everyone, STM32 controllers have CCM (Closely Coupled Memory) memory which acts as RAM. At present I do not use it. But I would like to. I am developing eCos application in C++. I have something like this in the header file: class A : { public: A (); virtual ~A (); .. protected: cyg_thread _thread; char _thread_stack [CYGNUM_HAL_STACK_SIZE_TYPICAL] __attribute__((section(".ccm"))); ... As you can see, I want to place thread stack into CCM section (using __attribute__((section(""))). But I do not know how to do it in a correct way. Please help! :-) The Memory layout file I use has got: .. SECTIONS { SECTIONS_BEGIN USER_SECTION (ccm, ccm, 0x10000000, LMA_EQ_VMA) .. And cortexm.ld file has got a macro for USER_SECTION: #define USER_SECTION(_name_, _region_, _vma_, _lma_) \ ._name_ _vma_ : _lma_ \ { __ ## _name_ ## _start = ABSOLUTE (.); \ *(._name_*) \ __ ## _name_ ## _end = ABSOLUTE (.); } \ > _region_ When I compile the project I get an error: error: section attribute not allowed for '_thread_stack' Do I specify attribute in the correct place? My be I cannot do it for class members but only for global variables? I would appreciate any help on this. Oleg ... -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss