This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
redboot on STM3240G-EVAL board
- From: Oleg Uzenkov <o dot uzenkov at unicore dot co dot ua>
- To: eCos Discussion <ecos-discuss at sourceware dot org>
- Cc: John Dallaway <john at dallaway dot org dot uk>
- Date: Thu, 09 Oct 2014 14:33:00 +0300
- Subject: redboot on STM3240G-EVAL board
- Authentication-results: sourceware.org; auth=none
- References: <542D110B dot 9080002 at unicore dot co dot ua> <542E8B41 dot 8030905 at dallaway dot org dot 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