From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16101 invoked by alias); 13 Oct 2014 11:59:48 -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 16090 invoked by uid 89); 13 Oct 2014 11:59:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,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; Mon, 13 Oct 2014 11:59:45 +0000 Received: from [195.20.130.1] (port=12532 helo=[10.1.7.235]) by xm21.hostsila.net with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XdeJ4-000n74-EA; Mon, 13 Oct 2014 15:00:54 +0300 Message-ID: <543BBEAB.8040000@unicore.co.ua> Date: Mon, 13 Oct 2014 11:59: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: Sergei Gavrikov , John Dallaway CC: eCos Discussion References: <542D110B.9080002@unicore.co.ua> <542E8B41.8030905@dallaway.org.uk> <543003B9.20300@siva.com.mk> <5436AE5C.6060401@unicore.co.ua> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Get-Message-Sender-Via: xm21.hostsila.net: authenticated_id: o.uzenkov@unicore.co.ua X-IsSubscribed: yes Subject: Re: [ECOS] redboot on STM32f4-discovery board X-SW-Source: 2014-10/txt/msg00019.txt.bz2 Hi, I have got redboot working on my board (with no external ram). When I set (CYGBLD_REDBOOT_LOAD_INTO_FLASH == 1) I get such response: RAM: 0x20000000-0x2001f000 [0x200039c8-0x1fff3000 available] 0x10000000-0x10010000 [0x10000000-0x10010000 available] FLASH: 0x08000000-0x0807ffff, 4 x 0x4000 blocks, 1 x 0x10000 blocks, 3 x 0x20000 blocks RedBoot> *Note* invalid RAM range ([0x200039c8-0x1fff3000 available]). When I set (CYGBLD_REDBOOT_LOAD_INTO_FLASH == 0) I get: RAM: 0x20000000-0x2001f000 [0x20003998-0x20013000 available] 0x10000000-0x10010000 [0x10000000-0x10010000 available] FLASH: 0x08000000-0x0807ffff, 4 x 0x4000 blocks, 1 x 0x10000 blocks, 3 x 0x20000 blocks RedBoot> *RAM range is valid* It looks like CYGBLD_REDBOOT_LOAD_INTO_FLASH functionality occupies 0x20013000−0x1fff3000=0x20000 (this is actually the size of a flash block (at the end on stm32f407, 128K)). This is the Flash geometry I am using: #define STM32_FLASH_SIZE (512*1024) #define STM32_FLASH_BLOCK_INFO { { { 16*1024, 4 } , { 64*1024, 1 }, { 128*1024, 3} } } #define STM32_FLASH_NUM_BLOCK_INFOS 3 It looks like a lot of RAM is used by CYGBLD_REDBOOT_LOAD_INTO_FLASH functionality. Or does it depend on flash block size it is mapped to? Can I shift it to occupy a smaller block of flash (for example 4th from the end - 64K)? BTW, what occupies the memory from 0x20013000 to 0x2001f000? I do not have CYGOPT_REDBOOT_FIS enabled. It is usually FIS that occupies the end of flash address map, but as I said it is disabled. With best wishes, Oleg > On Thu, 9 Oct 2014, Oleg Uzenkov wrote: > >> But, without Flash Image System I do not see how to use redboot to >> load and store and run images. > Even for builds (CYGOPT_REDBOOT_FIS == 0) you can manage FLASH using > absolute FLASH addresses and FIS sub-commands: erase and write. > > When you make RedBoot work smoothly on your target, then you can try to > load images directly to FLASH if you enable > > cdl_option CYGBLD_REDBOOT_LOAD_INTO_FLASH { > user_value 1 > }; > > eCos is designed with XIP (eXecute In Place) in mind and you can use > RedBoot 'go' command to execute ROM image from specified place of FLASH. > > For simple applications it would be enough just to shift *rom* ORIGIN > address and *rom_vectors* address in `target.ld' file and re-link ROM > application, then with the option above it is possible to load and run > such ROM image as > > load -m > go > > I call that it worked on my target (load-into-flash-and-go). However, > you need to inspect and may be fix HAL startup files for such "FLASH" > builds. > > 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