This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Copying flash code to RAM problem
- From: Morten Laursen <MLA at rtx dot dk>
- To: "'ecos-discuss at sources dot redhat dot com'" <ecos-discuss at sources dot redhat dot com>
- Cc: Erik Aagaard Knudsen <EAK at penell dot com>
- Date: Tue, 20 Aug 2002 09:05:47 +0200
- Subject: [ECOS] Copying flash code to RAM problem
Hi
Copying the flash code to RAM doesn't always work for me.
The RAM block to copy the code to is allocated in:
flashiodev.c:66
static char flashiodev_workspaces[1][FLASH_MIN_WORKSPACE];
This might be located on an odd address, in which case the code fails to
execute. I wonder why no one else has seen that problem. Is the alignment
different with gcc-3? (I use gcc version 3.0.2 20010924 (prerelease)
-mcpu=arm7tdmi)
Changing the line to
static long
flashiodev_workspaces[1][(FLASH_MIN_WORKSPACE+sizeof(long)-1)/sizeof(long)];
fixes the problem.
Is that the best way to ensure alignment? I couldn't find any macros that
handle alignment.
PS: Other than that I can report success with runnning the jffs2 test on an
ARM7 platform.
Venlig Hilsen / Regards
Morten
--
Morten Laursen, M.Sc.S.E.
RTX Telecom A/S - http://www.rtx.dk/
Direct phone: (+45) 96 32 24 03
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss