This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
redboot & S29GL256P: illegal memory access?
- From: "Johan Coosemans" <jcoosema at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 24 Nov 2008 16:13:08 +0100
- Subject: [ECOS] redboot & S29GL256P: illegal memory access?
Dear all,
I'm working on a custom board with a freescale imx27 and a Spansion
S29GL256P flash. In redboot, I cannot initialize the flash. In fact,
all erase operations give the same error:
++... Read from 0x07ee0000-0x07f00000 at 0xc1fe0000: .
... Read from 0x07ed3000-0x07ed4000 at 0xc1fff000: .
**Warning** FLASH configuration checksum error or invalid key
Use 'fconfig -i' to [re]initialize database
...
RAM: 0x00000000-0x07f00000, [0x00024cb0-0x07ed1000] available
FLASH: 0xc0000000 - 0xc2000000, 256 blocks of 0x00020000 bytes each.
RedBoot> fis init
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xc1fe0000-0xc2000000:
** command abort - illegal memory access?
RedBoot>
I traced the error to the file 'flash_am29xxxxx.inl', in which there
is a function 'norflash_erase_block'
that contains:
// Send erase block command - six step sequence
*f_s1 = FLASH_Setup_Code1;
*f_s2 = FLASH_Setup_Code2;
*f_s1 = FLASH_Setup_Erase;
*f_s1 = FLASH_Setup_Code1;
*f_s2 = FLASH_Setup_Code2;
*b_v = FLASH_Block_Erase;
state = *b_v;
This last line causes the illegal memory access error.
I started from the BSP that freescale provides for their ads devel
board, containing an S29WS256N memory. To switch to the S29GL256P i
did some modifications:
1. I added the support for the S29GL256 (from the newer ecos
releases), into the flash_am29xxxxx_parts.inl
2. In 'hal_platform_setup.h', I replaced 'init_cs0_sync' with
'init_cs0', because the S29GL doesn't have a burst mode. Do I have to
'turn of the burst mode' at a higher software level too?
I can erase, program and read the flash with a HAB tool from freescale
(some kind of boot from serial port). I also tested the DDR, so I
believe this is no hardware problem.
What can cause this ** command abort - illegal memory access? Somehow
redboot thinks the address of the sector *b_v is unvalid?
Many thanks in advance,
Johan Coosemans
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss