public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Oleg Uzenkov <o.uzenkov@unicore.co.ua>
To: eCos Discussion <ecos-discuss@sourceware.org>
Cc: John Dallaway <john@dallaway.org.uk>
Subject: [ECOS] redboot on STM3240G-EVAL board
Date: Thu, 09 Oct 2014 11:33:00 -0000	[thread overview]
Message-ID: <5436726C.8000703@unicore.co.ua> (raw)
In-Reply-To: <542E8B41.8030905@dallaway.org.uk>

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

  parent reply	other threads:[~2014-10-09 11:33 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   ` Oleg Uzenkov [this message]
2014-10-09 12:36     ` [ECOS] redboot on STM3240G-EVAL board 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

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=5436726C.8000703@unicore.co.ua \
    --to=o.uzenkov@unicore.co.ua \
    --cc=ecos-discuss@sourceware.org \
    --cc=john@dallaway.org.uk \
    /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).