From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20340 invoked by alias); 9 Oct 2014 11:33:09 -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 20330 invoked by uid 89); 9 Oct 2014 11:33:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 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; Thu, 09 Oct 2014 11:33:06 +0000 Received: from [195.20.130.1] (port=18138 helo=[10.1.7.235]) by xm21.hostsila.net with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XcByx-001a57-1S; Thu, 09 Oct 2014 14:34:07 +0300 Message-ID: <5436726C.8000703@unicore.co.ua> Date: Thu, 09 Oct 2014 11:33: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: eCos Discussion CC: John Dallaway References: <542D110B.9080002@unicore.co.ua> <542E8B41.8030905@dallaway.org.uk> In-Reply-To: <542E8B41.8030905@dallaway.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Get-Message-Sender-Via: xm21.hostsila.net: authenticated_id: o.uzenkov@unicore.co.ua X-IsSubscribed: yes Subject: [ECOS] redboot on STM3240G-EVAL board X-SW-Source: 2014-10/txt/msg00005.txt.bz2 Hello All, I am working with redboot on stm3240g_eval board. I need redboot to load an image from flash for execution but it does not work for me yet. These are my steps: 1. Build app.elf for ROM startup and test app.bin that it works on the board. It does, I can see text in terminal when it starts. So the app works. code: int main (void) { diag_printf( "HELLO\n" ); while (1); return 0; } 2. Build redboot for ROM startup and flash it at 0x08000000. It works as well. RedBoot(tm) bootstrap and debug environment [ROM] ... Platform: ST STM3240G-EVAL (Cortex-M4) RAM: 0x64000000-0x64200000 [0x64005d30-0x641dd000 available] 0x20000000-0x2001f000 [0x20000000-0x2001f000 available] 0x10000000-0x10010000 [0x10000000-0x10010000 available] FLASH: 0x08000000-0x080fffff, 4 x 0x4000 blocks, 1 x 0x10000 blocks, 7 x 0x20000 blocks RedBoot> 3. Do "fis init -f" All is well too. RedBoot> fis init -f About to initialize [format] FLASH image system - continue (y/n)? y *** Initialize FLASH Image System ... Erase from 0x08020000-0x080dffff: ...... ... Erase from 0x080e0000-0x080fffff: . ... Program from 0x641e0000-0x64200000 to 0x080e0000: . RedBoot> 4. Build app.elf now for RAM startup. 5. Transfer app.elf to redboot via serial xmodem I transfer it to external ram first. RedBoot> load -r -m xmodem -b 0x64010000 6. Create fis entry for the app RedBoot> fis create -b 0x64010000 -f 0x08040000 app now see if it is there: all is well ... RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0x08000000 0x08000000 0x00020000 0x00000000 app 0x08040000 0x64010000 0x00020000 0x64010000 FIS directory 0x080E0000 0x080E0000 0x0001F000 0x00000000 RedBoot config 0x080FF000 0x080FF000 0x00001000 0x00000000 7. Load app image and start it RedBoot> fis load app RedBoot> go $T080f:00000164;0d:e8cf1d64; I do not know what that means. Probably memory corruption. Can you see what I am doing wrong? I would appreciate any help on this, as I am running out of ideas now. Thanks in advance. Oleg -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss