From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20883 invoked by alias); 17 Oct 2014 09:15:53 -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 20869 invoked by uid 89); 17 Oct 2014 09:15:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,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; Fri, 17 Oct 2014 09:15:47 +0000 Received: from [195.20.130.1] (port=62888 helo=[10.1.7.235]) by xm21.hostsila.net with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1Xf3ej-000F8w-MS; Fri, 17 Oct 2014 12:17:05 +0300 Message-ID: <5440DE3D.1030803@unicore.co.ua> Date: Fri, 17 Oct 2014 09:15: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 CC: eCos Discussion References: <542D110B.9080002@unicore.co.ua> <542E8B41.8030905@dallaway.org.uk> <5436726C.8000703@unicore.co.ua> <543696C4.2040201@unicore.co.ua> <5437742F.7020908@unicore.co.ua> <54379E39.4070804@unicore.co.ua> <543E5F88.2050002@unicore.co.ua> <543F7CFC.5010104@unicore.co.ua> In-Reply-To: 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: Re: [ECOS] redboot on STM3240G-EVAL board X-SW-Source: 2014-10/txt/msg00026.txt.bz2 > On Thu, 16 Oct 2014, Oleg Uzenkov wrote: > >> Thanks Sergei! >> >> I can confirm that loading and running .bin files works now )) >> >> For someone with the same problem here is a piece of information: >> >> 1. From objdump command below we see that .rom_vectors section >> address is 0x64008000 and .text section starts at 0x64008110. > ... > > To be more precise, .text begins itself from 'reset_vector' address (it > is public label). See arch's target.ld and vectors.S sources. > >> 2. Check Entry point address with readelf command. In my case Entry >> point address: 0x64008111 > ... > > It is strange value as 0x64008111 is odd address, but 'reset_vector' > address for your arch should be aligned on 2-bytes boundary. I believe > that entry address is 0x64008110 or some even address. Try in GDB > > (gdb) load > (gdb) print $pc > (gdb) print reset_vector > > or disassembly > > % arm-eabi-objdump -d app.elf | more > > I think you see 0x64008110. Yes, I you are right, this is what I see: arm-none-eabi-gdb -b 115200 app.elf (gdb) target remote /dev/ttyUSB0 (gdb) load (gdb) print $pc $1 = (void (*)()) 0x64008110 However, when I do: >go 0x640008110 in RedBoot it does not work! it only works if I do: >go 0x640008111 I agree it is strange. It should be even address. Do you know if it is possible to use gdb with binaries? Only I was unable to do it. arm-none-eabi-gdb -b 38400 ./app.bin (gdb) target remote /dev/ttyUSB0 (gdb) load app.bin "app.bin" is not an object file: File format not recognized Perhaps, it can only works with ELF that contains symbols, where as .bin file is stripped of them. Oleg >> 3. Now load .bin >> >> RedBoot> load -m x -r -b 0x64008000 >> CRaw file loaded 0x64008000-0x6400df27, assumed entry at 0x64008000 >> xyzModem - CRC mode, 191(SOH)/0(STX)/0(CAN) packets, 5 retries >> RedBoot> >> >> 4. Now run binary with: >> RedBoot> go 0x64008111 > Just wondering, 'go 0x640008110' does not work? > > 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