From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20217 invoked by alias); 24 Oct 2014 09:13:18 -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 20208 invoked by uid 89); 24 Oct 2014 09:13:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f173.google.com Received: from mail-lb0-f173.google.com (HELO mail-lb0-f173.google.com) (209.85.217.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 24 Oct 2014 09:13:16 +0000 Received: by mail-lb0-f173.google.com with SMTP id 10so2233004lbg.18 for ; Fri, 24 Oct 2014 02:13:13 -0700 (PDT) X-Received: by 10.112.63.70 with SMTP id e6mr1459788lbs.93.1414141993135; Fri, 24 Oct 2014 02:13:13 -0700 (PDT) Received: from sg-pc.belvok.com ([86.57.137.251]) by mx.google.com with ESMTPSA id eg2sm1657339lbb.29.2014.10.24.02.13.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 24 Oct 2014 02:13:12 -0700 (PDT) Date: Fri, 24 Oct 2014 09:13:00 -0000 From: Sergei Gavrikov To: Sergei Gavrikov cc: eCos Discussion In-Reply-To: Message-ID: References: <544618E5.90101@unicore.co.ua> <54479031.9080106@unicore.co.ua> <5447C1D0.3070906@unicore.co.ua> <544918B9.7000601@unicore.co.ua> <544A0349.9020702@unicore.co.ua> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Subject: Re: [ECOS] small custom bootloader to start an app stored in flash X-SW-Source: 2014-10/txt/msg00046.txt.bz2 On Fri, 24 Oct 2014, Sergei Gavrikov wrote: > On Fri, 24 Oct 2014, Oleg Uzenkov wrote: > > > Redboot is a great piece of software. It is just I found that when you > > enable some important features like FIS support, Redboot reserves > > extra space in RAM memory. > > The size of this reserved extra space in RAM equals to the size of the > > largest section size in Flash. In case of stm32f407 it is 128KB. > > Internal RAM is 128KB. As John Dallaway pointed out there is very > > little sense in using Redboot without enough of external RAM on > > stm32f4 devices. For example for Kinetis it is a different story, the > > flash sections are uniform and quite small. > > > > For small systems external RAM chip significantly adds up to the cost > > of a device. > > I understand John's point and agree with him. But, he told about using > debug infrastructure of RedBoot (debugging eCos applications in RAM). > But, RedBoot is *debug* and *bootstrap* environment for eCos. I pointed > on another side of RedBoot, *bootstrap*. You can quite run eCos [ROM] > builds from FIS. Those [ROM] applications may utilize all RAM (128K + > 64K) on your target. On start ROM application just does overlay RedBoot > memory. You saw that yesterday with Rainer's approach (exec). If you > cannot manage run [ROM] applications with RedBoot command 'go', just > implement one new command for RedBoot, e.g. 'xip' (as RedBoot already > uses 'exec' name to run Linux kernel). RedBoot will let you to use > FLASH I/O, load any images, use start scripts, etc., etc. Of course it > is my opinion only. For clarity. If you have no idea how to burn big images on FLASH using only 128K RAM (and it is possible and without RedBoot load-into-flash feature which needs extra memory, 128K) see below a "way". Split source binary on 64K chunks, gzip the chunks (you told about GPRS modem) and upload those chunks with RedBoot. After uploading the next part write it on FLASH with 0x10000 offset. Host split -b 64K app.bin gzip xa* Target load -m x -d -r ... fis write ... Of course, the process can be automated with Expect. 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