LPC2138 and GCC

Started by Alexander Shabarshin September 29, 2005
Hello

I try to run simple circuit with LPC2138 chip. I plan to use lpc21isp utility
to flash it under Linux. Yesterday I installed GCC-4.0.1 from gnuarm.com, BUT
I did not find lpc2138.h, startup.S and .ld files to build code for FLASH and
RAM of LPC2138 chip. Please, give me some advice where better to download
these things? Sample code for LPC21xx with Makefile for GCC may be helpful
too. Thanks!

Alexander



An Engineer's Guide to the LPC2100 Series

Alexander Shabarshin wrote:

> to flash it under Linux. Yesterday I installed GCC-4.0.1 from
> gnuarm.com, BUT
> I did not find lpc2138.h, startup.S and .ld files to build code for
> FLASH and
> RAM of LPC2138 chip.

Those files are not part of the GCC environment but chip specific.

If you'd like to run code from RAM (as I do) to test some simple things,
the lpc21isp
program may not suit your needs (I got a 1.28 version and that one
definitely did not
support downloading and running to RAM).

On my website you will find an updated version that does download code
(up to 64 kB
should go but I was not able to write programs larger than 16 kB up to
now :-)) to
RAM and execute from there.
You will also find some test programs, these include startup code and a
link.ld file
that link the code to address 0x4000,0200. When the progam starts it
will copy the
vectors (loaded at 0x4000,0200) to 0x4000,0000 which is then remapped to
0x0000,0000
where the vectors should be.
I specifically skipped the memory below 0x4000,0200 because this is used
by the bootrom,
as is stated in the user manual.

Regards,

Rob - http://www.myvoice.nl/electronics/



Alexander Shabarshin wrote:

> to flash it under Linux. Yesterday I installed GCC-4.0.1 from
> gnuarm.com, BUT
> I did not find lpc2138.h, startup.S and .ld files to build code for
> FLASH and
> RAM of LPC2138 chip.

Those files are not part of the GCC environment but chip specific.

If you\'d like to run code from RAM (as I do) to test some simple things,
the lpc21isp
program may not suit your needs (I got a 1.28 version and that one
definitely did not
support downloading and running to RAM).

On my website you will find an updated version that does download code
(up to 64 kB
should go but I was not able to write programs larger than 16 kB up to
now :-)) to
RAM and execute from there.
You will also find some test programs, these include startup code and a
link.ld file
that link the code to address 0x4000,0200. When the progam starts it
will copy the
vectors (loaded at 0x4000,0200) to 0x4000,0000 which is then remapped to
0x0000,0000
where the vectors should be.
I specifically skipped the memory below 0x4000,0200 because this is used
by the bootrom,
as is stated in the user manual.

Regards,

Rob - http://www.myvoice.nl/electronics/



> I try to run simple circuit with LPC2138 chip. I plan to use lpc21isp
utility
> to flash it under Linux. Yesterday I installed GCC-4.0.1 from gnuarm.com,
BUT
> I did not find lpc2138.h, startup.S and .ld files to build code for FLASH
and
> RAM of LPC2138 chip. Please, give me some advice where better to download
> these things?

Try here: http://www.gnuarm.com/gnuarm-3.4-headers.zip >Sample code for LPC21xx with Makefile for GCC may be helpful
> too. Thanks!


Take a look at the LPC2106 demo included in the FreeRTOS.org download.
Startup, linker and makefiles included. Batch files are provided for the
various builds (ROM, RAM, ARM, THUMB).

Regards,
Richard. http://www.FreeRTOS.org



Hello

--- In lpc2000@lpc2..., "FreeRTOS Info" <nospam@F...> wrote:
>
> Try here: http://www.gnuarm.com/gnuarm-3.4-headers.zip

There only general lpc2000.h is suitable for LPC2138 I think

I hope to find chip specific lpc2138.h (actually it is not too
difficult to implement it by datasheet, but startup and linker scripts
are much harder for me)

Alexander


Hello

--- In lpc2000@lpc2..., Michael Anburaj <embeddedeng@y...> wrote:
> I am releasing LPC sample applications (files derived
> from ARM uCOS-II LPC port) supporting both LPC210x &
> 213x families -- GCC & ADS tools.
>
> It is a very slim as of now. But, you will find all
> that you need in it.
>
> download:
> http://www.geocities.com/michaelanburaj/downloads/lpc_1.00.zip

Thanks! I will try it


Hello

--- In lpc2000@lpc2..., Michael Anburaj <embeddedeng@y...> wrote:
> I am releasing LPC sample applications (files derived
> from ARM uCOS-II LPC port) supporting both LPC210x &
> 213x families -- GCC & ADS tools.
>
> It is a very slim as of now. But, you will find all
> that you need in it.
>
> download:
> http://www.geocities.com/michaelanburaj/downloads/lpc_1.00.zip

Thanks! I will try it