public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Oleg Uzenkov <o.uzenkov@unicore.co.ua>
To: Sergei Gavrikov <sergei.gavrikov@gmail.com>
Cc: eCos Discussion <ecos-discuss@sourceware.org>
Subject: Re: [ECOS] redboot on STM3240G-EVAL board
Date: Fri, 17 Oct 2014 09:15:00 -0000	[thread overview]
Message-ID: <5440DE3D.1030803@unicore.co.ua> (raw)
In-Reply-To: <alpine.DEB.2.00.1410161729380.3719@sg-laptop>


> 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

      reply	other threads:[~2014-10-17  9:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02  8:47 [ECOS] redboot on STM32f4-discovery board Oleg Uzenkov
2014-10-03 11:40 ` [ECOS] " John Dallaway
2014-10-04 14:27   ` "Ilija Kocho [Илија Кочо]"
2014-10-05  8:32     ` Oleg Uzenkov
2014-10-05  9:56       ` "Ilija Kocho [Илија Кочо]"
2014-10-09 15:48     ` [ECOS] " Oleg Uzenkov
2014-10-09 18:44       ` [ECOS] " John Dallaway
2014-10-09 21:12       ` [ECOS] " Sergei Gavrikov
2014-10-13 11:59         ` Oleg Uzenkov
2014-10-13 15:10           ` Sergei Gavrikov
2014-10-09 11:33   ` [ECOS] redboot on STM3240G-EVAL board Oleg Uzenkov
2014-10-09 12:36     ` Edgar Grimberg
2014-10-09 13:42       ` Oleg Uzenkov
2014-10-09 13:45     ` Sergei Gavrikov
2014-10-09 14:08       ` Oleg Uzenkov
2014-10-09 14:35         ` Sergei Gavrikov
2014-10-10  5:52           ` Oleg Uzenkov
2014-10-10  7:55             ` Sergei Gavrikov
2014-10-10  8:52               ` Oleg Uzenkov
2014-10-10 15:58                 ` Sergei Gavrikov
2014-10-15 11:50                   ` Oleg Uzenkov
2014-10-15 14:45                     ` Sergei Gavrikov
2014-10-16  8:08                       ` Oleg Uzenkov
2014-10-16 15:01                         ` Sergei Gavrikov
2014-10-17  9:15                           ` Oleg Uzenkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5440DE3D.1030803@unicore.co.ua \
    --to=o.uzenkov@unicore.co.ua \
    --cc=ecos-discuss@sourceware.org \
    --cc=sergei.gavrikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).