EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Startup and .LD for RAM an ROM LPC2294

Started by juhap82 December 25, 2007
Could someone help me a little, please? I've been looking for the
answer everywhere with no results. I can't define the processors
startup file and RAM & ROM linker description files for Olimex LPC-
H2294 board. (and to use external memorys)
Thank you in advance for any help you can give me.

Yours sincerely,
Juhizo

An Engineer's Guide to the LPC2100 Series

----- Original Message -----
From: "juhap82"
To:
Sent: Tuesday, December 25, 2007 4:12 PM
Subject: [lpc2000] Startup and .LD for RAM an ROM LPC2294
> Could someone help me a little, please? I've been looking for the
> answer everywhere with no results. I can't define the processors
> startup file and RAM & ROM linker description files for Olimex LPC-
> H2294 board. (and to use external memorys)

What development tools are you using? You should have some basic files
defined for you.

Leon
--
Leon Heller
Amateur radio call-sign G1HSM
Yaesu FT-817ND and FT-857D transceivers
Suzuki SV1000S motorcycle
l...@btinternet.com
http://webspace.webring.com/people/jl/leon_heller/
I'm using winarm. I just don't know how to define those files so that
bootloader doesn't destruct, and code runs for eg. external flash and
uses external ram to store variables (?for example, sampled audio)
etc.

--- In l..., "Leon" wrote:
>
> ----- Original Message -----
> From: "juhap82"
> To:
> Sent: Tuesday, December 25, 2007 4:12 PM
> Subject: [lpc2000] Startup and .LD for RAM an ROM LPC2294
> > Could someone help me a little, please? I've been looking for the
> > answer everywhere with no results. I can't define the processors
> > startup file and RAM & ROM linker description files for Olimex
LPC-
> > H2294 board. (and to use external memorys)
>
> What development tools are you using? You should have some basic
files
> defined for you.
>
> Leon
> --
> Leon Heller
> Amateur radio call-sign G1HSM
> Yaesu FT-817ND and FT-857D transceivers
> Suzuki SV1000S motorcycle
> leon355@...
> http://webspace.webring.com/people/jl/leon_heller/
>
--- In l..., "juhap82" wrote:
>
> I'm using winarm. I just don't know how to define those files so that
> bootloader doesn't destruct, and code runs for eg. external flash and
> uses external ram to store variables (?for example, sampled audio)
> etc.
>

You need to understand the memory layout of your system. Given that
knowledge, you can read through the 'ld' manual to determine where the
different segments are initially loaded and where they ultimately reside.

You have 256 kB of flash at 0x00000000 and 16kB of ram at 0x40000000.
Then you have external memory (1.5 gB max) according to the memory
map on page 48 of the User Manual. So, you need to know what kind and
how much of each kind of external memory is available.

Then you specify the memory areas in the .ld file and you tell the
linker where to put code (.text), initialized ram (.data) and
unitialized ram (.bss). If code needs to be moved from internal flash
to external memory, the linker sets it up but the startup file does
the relocation. The startup file also initialized .data and clears
.bss. At a minimum, the startup code must begin at 0x00000000 even if
you have external flash.

User manual here:
http://www.keil.com/dd/docs/datashts/philips/user_manual_lpc2119_2129_2194_2292_2294.pdf

'ld' manual here:
http://www.gnu.org/software/binutils/manual/ld-2.9.1/ld.html
or here: http://www.skyfree.org/linux/references/ld.pdf

It is true that your system is more complex than, say, an LPC2106 or
lpc2148, but it might be worth looking through some of the examples in
the Files section of this group. Try helloworld_gnuarm.zip as a
simple place to start. Also see gcc_and_ucosii.zip

Richard

The 2024 Embedded Online Conference