From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19211 invoked by alias); 21 Oct 2014 11:02:05 -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 19193 invoked by uid 89); 21 Oct 2014 11:02:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail.chez-thomas.org Received: from mail.mlbassoc.com (HELO mail.chez-thomas.org) (65.100.170.105) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Oct 2014 11:02:03 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 1998) id 3821FF811D7; Tue, 21 Oct 2014 05:02:02 -0600 (MDT) Received: from [192.168.1.114] (zeus [192.168.1.114]) by mail.chez-thomas.org (Postfix) with ESMTP id 09294F81188; Tue, 21 Oct 2014 05:02:01 -0600 (MDT) Message-ID: <54463D4B.9090000@mlbassoc.com> Date: Tue, 21 Oct 2014 11:02:00 -0000 From: Gary Thomas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: ecos-discuss@ecos.sourceware.org References: <544618E5.90101@unicore.co.ua> In-Reply-To: <544618E5.90101@unicore.co.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [ECOS] small custom bootloader to start an app stored in flash X-SW-Source: 2014-10/txt/msg00032.txt.bz2 On 2014-10-21 02:27, Oleg Uzenkov wrote: > Hello Everyone, > > I would like to make a small custom bootloader (not considering RedBoot) that would implement a simple function of checking a flag (some bytes in memory) and then jumping to one of > the applications stored in internal flash. > > Something like this: > > internal flash memory: > > ------------------ 0x08000000 > | bootloader | > | | > ------------------ > |_____ | > |flag | | > ------------------ > | | > | | > ------------------ > | app1 | > | | > ------------------ > | app2 | > | | > ------------------ > | | > | | > -------------- > > Basically, if flag is true then start app1 else start app2. > > I suppose bootloader would be a simple eCos app with ROM startup. Applications in flash probably should also be built for ROM startup. > When the jump is made app's .data and .bss sections should be copied into RAM... > > Any ideas how to make a jump to start an app? May be some sample code showing how to do it in eCos? May be someone has done it already? > > I would appreciate any help on this. You've already mentioned the answer - RedBoot! RedBoot is just another eCos application which does all the things you are considering. I can understand not wanting to include RedBoot in your design (although it can be extremely useful, especially during development), but looking through the sources you'll find guidance on all the topics you are looking for. Good luck -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss