From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19919 invoked by alias); 21 Feb 2012 21:08:28 -0000 Received: (qmail 19908 invoked by uid 22791); 21 Feb 2012 21:08:26 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from www.meduna.org (HELO meduna.org) (92.240.244.38) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Feb 2012 21:08:12 +0000 Received: from [178.143.125.248] (helo=[192.168.130.22]) by meduna.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1RzwwC-00071m-1Z for ecos-devel@ecos.sourceware.org; Tue, 21 Feb 2012 22:08:09 +0100 Message-ID: <4F4407A2.1030706@meduna.org> Date: Tue, 21 Feb 2012 21:08:00 -0000 From: Stanislav Meduna User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: ecos-devel@ecos.sourceware.org Subject: ROMRAM .. kind of Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Authenticated-User: stano@meduna.org X-Authenticator: dovecot_plain X-Spam-Score: -6.9 X-Spam-Score-Int: -68 X-Exim-Version: 4.72 (build at 12-May-2011 18:13:45) X-Date: 2012-02-21 22:08:09 X-Connected-IP: 178.143.125.248:64170 X-Message-Linecount: 40 X-Body-Linecount: 29 X-Message-Size: 1401 X-Body-Size: 1002 X-Received-Count: 1 X-Recipient-Count: 1 X-Local-Recipient-Count: 1 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2012-02/txt/msg00009.txt.bz2 Hi, I want to be able to update the RedBoot from RedBoot. So I need to copy a short code from RedBoot away into RAM, disable interrupts and run it to flash the new RedBoot, then do a verify and reboot to the new one. That code has to be linked with offsets in RAM, but needs to be stored in flash. Unfortunately I am not really a guru in GNU ld and its scripts. Is there any example on how to link a code for one address and direct the section somewhere else in the final image? I've looked up some ROMRAM setups but they look such that the code up to the RAM copy is position independent and initially simply runs from an 'incorrect' address, which does not really help me much. In the case it matters I need to do this for a Cortex-M3. Maybe my flash code can be made position independent too and I can also think of some script magic to assemble the flash image, but I would of course prefer to do this in the ld script way if possible. Thanks -- Stano