Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: LPC2294, gcc-code won't work

2005-08-29 by mahlerweb

--- In lpc2000@yahoogroups.com, "jf_richard69" <jf.richard@r...> 
wrote:
> --- In lpc2000@yahoogroups.com, "mahlerweb" <peter.mahler@w...> 
wrote:
> > --- In lpc2000@yahoogroups.com, "mahlerweb" <peter.mahler@w...> 
wrote:
> > > --- In lpc2000@yahoogroups.com, "David Hawkins" <dwh@o...> 
wrote:
> > > > 
> > > > 
> > > > > since friday, i try to make some simple examples work on a 
> > > LC2294, 
> > > > > (Olimex LPC-E2294) The examples work fine on a LPC2106 and 
a 
> > 2194.
> > > > > The LPC2294-Example from the Olimex-Web-page also works 
without 
> > > > > problems, compiled by an IAR-Comiler. 
> > > > > 
> > > > > Has anyone an idea ???    
> > > > 
> > > > The startup code sets up stacks etc. You need to make sure 
that
> > > > the startup code and the linker script has a memory map that
> > > > is consistent with your device.
> > > > 
> > > > Dave
> > > 
> > > Thanks Dave,
> > > 
> > > i use different linker-scripts for 2106 and 2194, the startup-
code 
> > is 
> > > the same. IMO the LPC2294 should work with the same linker-
script 
> > as 
> > > LPC2194, or are there some more differences between these two 
> > > devices ??? 
> > > 
> > > Is there anybody who can show me a working gcc project on 
> > > LPC2294 ???   
> > > 
> > > Thanks, 
> > > 
> > > Peter
> > 
> > 
> > Hello,
> > 
> > i think i got it work!!! The problem was, that the Boot0 and 
Boot1 
> > pin at LPC2294 were connected to ground, so the examples and 
linker-
> > scripts, designed for internal flash memory, couldn't start.
> > 
> > Thanks,
> > 
> > Peter
> 
> Hi Peter,
> 
> Im trying to make a simple led flasher working on my board using 
GCC &
> a 2292, but anything I try, it does not work. The board and led
> flasher code as been validated with crossstudio and are working
> properly but I am unable to make it work with only GCC and a 
makefile.
> The problem seems to be either in the startup code or the linker 
script. 
> 
> Would that be possible to take a peek at your linker script and
> startup code? Are you able to make an interruption work with it?
> 
> To facilitate my work, I really need to get my code to compile with
> gnu environment.
> 
> Thanks,
> 
> Jean-Francois


Hi Jean-Francios,

sorry for the late answer, but i was out for several days.

I use the startup-code and linker-script from the freeRTOS-
ARM7_LPC2106_GCC Example and modified the linker script from the 2106-
rom (....i do my work always in rom ...) 
main changes (extram and extflash are only used in my project) :

__ram_size__  = 16K;


MEMORY 
{
	flash	: ORIGIN = 0, LENGTH = 120K
	ram		: ORIGIN = 0x40000000, LENGTH = 16K
	extflash : ORIGIN = 0x80000000, LENGTH = 0x80000
	extram	: ORIGIN = 0x81000000, LENGTH = 0x100000
}
__ram_size__  = 16K;


MEMORY 
{
	flash	: ORIGIN = 0, LENGTH = 120K
	ram		: ORIGIN = 0x40000000, LENGTH = 16K
	extflash : ORIGIN = 0x80000000, LENGTH = 0x80000
	extram	: ORIGIN = 0x81000000, LENGTH = 0x100000
}


__STACK_SIZE_FIQ__ = 0x100;
__STACK_SIZE_IRQ__ = 0x100;
__STACK_SIZE_SUPERVISOR__ = 0x4;
__STACK_SIZE_ABORT__ = 0x4;
__STACK_SIZE_UNDEFINED__ = 0x4;

__stack_end__ = 0x40000000 + __ram_size__ - 4 - __STACK_SIZE_FIQ__ - 
	__STACK_SIZE_IRQ__ - __STACK_SIZE_SUPERVISOR__ - 
__STACK_SIZE_ABORT__ -
	__STACK_SIZE_UNDEFINED__;
__stack_end_undefined__ = 0x40000000 + __ram_size__ - 4 - 
__STACK_SIZE_FIQ__ - 
	__STACK_SIZE_IRQ__ - __STACK_SIZE_SUPERVISOR__ - 
__STACK_SIZE_ABORT__;
__stack_end_abort__ = 0x40000000 + __ram_size__ - 4 - 
__STACK_SIZE_FIQ__ - 
	__STACK_SIZE_IRQ__ - __STACK_SIZE_SUPERVISOR__;
__stack_end_supervisor__ = 0x40000000 + __ram_size__ - 4 - 
__STACK_SIZE_FIQ__ - 
	__STACK_SIZE_IRQ__;
__stack_end_irq__ = 0x40000000 + __ram_size__ - 4 - 
__STACK_SIZE_FIQ__;
__stack_end_fiq__ = 0x40000000 + __ram_size__ - 4;

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.