Olimex LPC2294H external flash
2006-05-23 by litevelocity
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2006-05-23 by litevelocity
Hi, Does anyone know how to get code into the external flash of this header board, and run from there? Is it possible to use the Philips flash utility to do it, or have to use something else? Thanks, Joe
2006-05-25 by EmbeddedHub
hi, Olimex has provided the sample codes to program the external flash of LPC-H2294 at their web site. You would need to refer to the user manual of LPC221x to boot from external flash. Philips flash utility is used to program the internal flash of LPC chip. regards, Tim. http://www.embeddedhub.com/ --- In lpc2000@yahoogroups.com, "litevelocity" <litevelocity@...> wrote:
> > Hi, > > Does anyone know how to get code into the external flash of this > header board, and run from there? > > Is it possible to use the Philips flash utility to do it, or have to > use something else? > > Thanks, > > Joe >
2006-05-25 by stefano_m_a
Hi,
is it possible to save some routines into the external flash (but
boot into the internal one..) ?
I try to modify my linker script adding an output section to point
0x8000.0000 area.
I receive the following errors:
Linking: main.elf
arm-elf-gcc -mthumb -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -
DROM_RUN -O0 -Wall -Wcast-align -Wcast-qual -Wimplicit -Wpointer-
arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-
adhlns=crt0.lst -MD -MP -MF .dep/main.elf.d crt0.o lcd.o system.o
buttons.o LPC_uart.o LPC_Vic.o adc.o armVIC.o ram.o main.o --
output main.elf -nostartfiles -Wl,-Map=main.map,--cref -lc -lm -lc -
lgcc -TLPC2214-ROM.ld
ram.o: In function `RAM_read':
/cygdrive/j/Progetti/Lpc/Progetti/FlashExt/ram.c:38: relocation
truncated to fit: R_ARM_PC24 against symbol `LCDSendCommand' defined
in .text section in lcd.o
/cygdrive/j/Progetti/Lpc/Progetti/FlashExt/ram.c:47: relocation
truncated to fit: R_ARM_PC24 against symbol `LCDSendChar' defined
in .text section in lcd.o
ram.o: In function `RAM_read_rev':
/cygdrive/j/Progetti/Lpc/Progetti/FlashExt/ram.c:55: relocation
truncated to fit: R_ARM_PC24 against symbol `LCDSendCommand' defined
in .text section in lcd.o
collect2: ld returned 1 exit status
make: *** [main.elf] Error 1
ram.o is the object code defined in the linker script as:
...
.text.extFlash :
{
ram.o
} > flash_ext = 0xFF
prog :
{
*(.text)
*(.rodata)
*(.rodata*)
*(.glue_7)
*(.glue_7t)
} >flash = 0xFF
...
Thanks !
--
SM
--- In lpc2000@yahoogroups.com, "EmbeddedHub" <tim@...> wrote:
>
> hi,
>
> Olimex has provided the sample codes to program the external flash
of
> LPC-H2294 at their web site. You would need to refer to the user
> manual of LPC221x to boot from external flash.
>
> Philips flash utility is used to program the internal flash of LPC
> chip.
>
> regards,
> Tim.
> http://www.embeddedhub.com/
>
> --- In lpc2000@yahoogroups.com, "litevelocity" <litevelocity@>
> wrote:
> >
> > Hi,
> >
> > Does anyone know how to get code into the external flash of this
> > header board, and run from there?
> >
> > Is it possible to use the Philips flash utility to do it, or have
to > > use something else? > > > > Thanks, > > > > Joe > > >
2006-05-25 by Karl Olsen
---- Original Message ----
From: "stefano_m_a" <stefano_mora@...>
To: <lpc2000@yahoogroups.com>
Sent: Thursday, May 25, 2006 2:47 PM
Subject: [lpc2000] Re: Olimex LPC2294H external flash
> is it possible to save some routines into the external flash (but
> boot into the internal one..) ?
> I try to modify my linker script adding an output section to point
> 0x8000.0000 area.
> I receive the following errors:
>
> Linking: main.elf
> arm-elf-gcc -mthumb -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -
> DROM_RUN -O0 -Wall -Wcast-align -Wcast-qual -Wimplicit -Wpointer-
> arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-
> adhlns=crt0.lst -MD -MP -MF .dep/main.elf.d crt0.o lcd.o system.o
> buttons.o LPC_uart.o LPC_Vic.o adc.o armVIC.o ram.o main.o --
> output main.elf -nostartfiles -Wl,-Map=main.map,--cref -lc -lm -lc -
> lgcc -TLPC2214-ROM.ld
>
> ram.o: In function `RAM_read':
> /cygdrive/j/Progetti/Lpc/Progetti/FlashExt/ram.c:38: relocation
> truncated to fit: R_ARM_PC24 against symbol `LCDSendCommand' defined
> in .text section in lcd.o
> /cygdrive/j/Progetti/Lpc/Progetti/FlashExt/ram.c:47: relocation
> truncated to fit: R_ARM_PC24 against symbol `LCDSendChar' defined
> in .text section in lcd.o
> ram.o: In function `RAM_read_rev':
> /cygdrive/j/Progetti/Lpc/Progetti/FlashExt/ram.c:55: relocation
> truncated to fit: R_ARM_PC24 against symbol `LCDSendCommand' defined
> in .text section in lcd.o
> collect2: ld returned 1 exit status
> make: *** [main.elf] Error 1
Internal and external flash are further apart than can be spanned by a bl
instruction, so you cannot call from internal to external flash or
vice-versa with normal bl instructions. Try:
/* file1.c */
int ext_flash_function (int i) __attribute__((long_call));
int int_flash_function (void)
{
ext_flash_function(1);
}
/* file2.c */
int ext_flash_function (int i)
{
return i+i;
}
The long_call attribute tells gcc to use an indirect call when calling
ext_flash_function(). This is larger and slower, but the callee can be
anywhere in the address space.
Karl Olsen