From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2095 invoked by alias); 27 Jan 2011 18:24:53 -0000 Received: (qmail 2086 invoked by uid 22791); 27 Jan 2011 18:24:53 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Jan 2011 18:24:48 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PiWWR-0000dq-JR for ecos-discuss@sources.redhat.com; Thu, 27 Jan 2011 19:24:43 +0100 Received: from dsl.comtrol.com ([64.122.56.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jan 2011 19:24:43 +0100 Received: from grant.b.edwards by dsl.comtrol.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jan 2011 19:24:43 +0100 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Thu, 27 Jan 2011 22:01:00 -0000 Message-ID: References: <2815371.163.1296147619546.JavaMail.neratec@martin-lucid32> <917898.171.1296149053545.JavaMail.neratec@martin-lucid32> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: slrn/pre0.9.9-102 (Linux) X-IsSubscribed: yes 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 Subject: [ECOS] Re: Different section placement for kernel and application X-SW-Source: 2011-01/txt/msg00091.txt.bz2 On 2011-01-27, Martin R??sch wrote: > I'm trying to figure out how to run the eCos kernel from ROM and run > the application (the main() function) from RAM on the STM32 Eval > Board. Is it possible to place the text, data and rodata sections > from the target library to a different memory address (i.e. flash) > than the sections of the application in the image? No, that's not possible in any general/useful sense without major changes to the way eCos is designed and built. The way eCos is built there is no logical separation between the kernel and the application. They're both just C/C++ functions that are linked together to form a single executable ELF file. In theory, you could apply section attributes to all of the kernel functions (or all of the application functions) so that you could separate them at link time into different output sections. But, that wouldn't really be useful, since the linkage between the two output would require that they always be updated together in the target board. I _suspect_ what you're really asking about is some sort of position-independent API between kernel, libraries, and application so that you can update one without updating the others -- something akin to the Unix syscall API or the Unix shared library mechanism that allows kernel, application, and libraries to be changed independently. -- Grant Edwards grant.b.edwards Yow! Is this going to at involve RAW human ecstasy? gmail.com -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss