EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Best Assembler for lpc chip.

Started by ispgardner October 1, 2006
I'm new to LPC chip & my present activity is to get some experience
with this device. I acquired one of the Olimex boards with LPC2103 and
RS232 and I need help to select the tool to learn the chip. I didn't
realized that there are so many options. I appreciate the advise which
compiler is the best that meets following criteria:

- I need only assembler and loader. I would miss the point to try to
learn the nuts&bolts of the chip by using C. I'll use assembler to
write a very simple programs like blinking led or getting data from
A/D converter and etc. The best is assembler as part of complete IDE,
but I think it is asking too much.

- I have only Linux boxes (Debian). Getting Win just to learn the
chip it would be too much. Also, I prefer binary form. By average, I
found that I spend more time to compile the program than to run it. It
can be open source (preferred) or reasonably priced commercial.

I would greatly appreciate if you can help me to find the best tool
for the job.

Thanx

An Engineer's Guide to the LPC2100 Series

--- In l..., "ispgardner" wrote:
>
> I'm new to LPC chip & my present activity is to get some experience
> with this device. I acquired one of the Olimex boards with LPC2103 and
> RS232 and I need help to select the tool to learn the chip. I didn't
> realized that there are so many options. I appreciate the advise which
> compiler is the best that meets following criteria:
>
> - I need only assembler and loader. I would miss the point to try to
> learn the nuts&bolts of the chip by using C. I'll use assembler to
> write a very simple programs like blinking led or getting data from
> A/D converter and etc. The best is assembler as part of complete IDE,
> but I think it is asking too much.
>
> - I have only Linux boxes (Debian). Getting Win just to learn the
> chip it would be too much. Also, I prefer binary form. By average, I
> found that I spend more time to compile the program than to run it. It
> can be open source (preferred) or reasonably priced commercial.
>
> I would greatly appreciate if you can help me to find the best tool
> for the job.
>
> Thanx
>

It's pretty easy to build the gnu-arm package from www.gnuarm.org. It
will include the GNU assembler. All under Linux, of course.

I use that package with Eclipse as the IDE and it works very well.

However, I think you should write a few things in C just to see what
the assembly language looks like. This is NOT your average Z80
assembly language. There are a lot of twists, particularly when you
are using ARM mode because many instructions can be conditional. This
helps keep the pipeline full but it does take some thought.

The C startup file (crt.s) is written in assembly language and it is
about all I want to see. Maybe a short interrupt routine but that
would be about it.

Have fun!

Richard
--- In l..., "rtstofer" wrote:
>
> --- In l..., "ispgardner" wrote:
> >
> > I'm new to LPC chip & my present activity is to get some experience
> > with this device. I acquired one of the Olimex boards with LPC2103 and
> > RS232 and I need help to select the tool to learn the chip. I didn't
> > realized that there are so many options. I appreciate the advise which
> > compiler is the best that meets following criteria:
> >
> > - I need only assembler and loader. I would miss the point to try to
> > learn the nuts&bolts of the chip by using C. I'll use assembler to
> > write a very simple programs like blinking led or getting data from
> > A/D converter and etc. The best is assembler as part of complete IDE,
> > but I think it is asking too much.
> >
> > - I have only Linux boxes (Debian). Getting Win just to learn the
> > chip it would be too much. Also, I prefer binary form. By average, I
> > found that I spend more time to compile the program than to run it. It
> > can be open source (preferred) or reasonably priced commercial.
> >
> > I would greatly appreciate if you can help me to find the best tool
> > for the job.
> >
> > Thanx
> > It's pretty easy to build the gnu-arm package from www.gnuarm.org. It
> will include the GNU assembler. All under Linux, of course.
>
> I use that package with Eclipse as the IDE and it works very well.
>
> However, I think you should write a few things in C just to see what
> the assembly language looks like. This is NOT your average Z80
> assembly language. There are a lot of twists, particularly when you
> are using ARM mode because many instructions can be conditional. This
> helps keep the pipeline full but it does take some thought.
>
> The C startup file (crt.s) is written in assembly language and it is
> about all I want to see. Maybe a short interrupt routine but that
> would be about it.
>
> Have fun!
>
> Richard
>

Thanx for the advise. It looks like that some staff is already
pre-built for Debian. I'll try to use "as" as a part of binutils. I
have only one question; how one can download *.hex file into the board
via rs232? There is a loader from Philips, but I haven't seen anything
for Linux. Do you know about any loader for Linux? Or should I use
Wine or other emulator?

Gardner
--- In l..., "ispgardner" wrote:
>
> --- In l..., "rtstofer" wrote:
> >
> > --- In l..., "ispgardner" wrote:
> > >
> > > I'm new to LPC chip & my present activity is to get some experience
> > > with this device. I acquired one of the Olimex boards with
LPC2103 and
> > > RS232 and I need help to select the tool to learn the chip. I didn't
> > > realized that there are so many options. I appreciate the advise
which
> > > compiler is the best that meets following criteria:
> > >
> > > - I need only assembler and loader. I would miss the point to
try to
> > > learn the nuts&bolts of the chip by using C. I'll use assembler to
> > > write a very simple programs like blinking led or getting data from
> > > A/D converter and etc. The best is assembler as part of complete
IDE,
> > > but I think it is asking too much.
> > >
> > > - I have only Linux boxes (Debian). Getting Win just to learn the
> > > chip it would be too much. Also, I prefer binary form. By average, I
> > > found that I spend more time to compile the program than to run
it. It
> > > can be open source (preferred) or reasonably priced commercial.
> > >
> > > I would greatly appreciate if you can help me to find the best tool
> > > for the job.
> > >
> > > Thanx
> > >
> >
> > It's pretty easy to build the gnu-arm package from www.gnuarm.org. It
> > will include the GNU assembler. All under Linux, of course.
> >
> > I use that package with Eclipse as the IDE and it works very well.
> >
> > However, I think you should write a few things in C just to see what
> > the assembly language looks like. This is NOT your average Z80
> > assembly language. There are a lot of twists, particularly when you
> > are using ARM mode because many instructions can be conditional. This
> > helps keep the pipeline full but it does take some thought.
> >
> > The C startup file (crt.s) is written in assembly language and it is
> > about all I want to see. Maybe a short interrupt routine but that
> > would be about it.
> >
> > Have fun!
> >
> > Richard
> > Thanx for the advise. It looks like that some staff is already
> pre-built for Debian. I'll try to use "as" as a part of binutils. I
> have only one question; how one can download *.hex file into the board
> via rs232? There is a loader from Philips, but I haven't seen anything
> for Linux. Do you know about any loader for Linux? Or should I use
> Wine or other emulator?
>
> Gardner
>
No problem! Just get lpc21isp here:
http://sourceforge.net/projects/lpc21isp/

Richard
> via rs232? There is a loader from Philips, but I haven't seen anything
> for Linux. Do you know about any loader for Linux? Or should I use
> Wine or other emulator?

http://guest.engelschall.com/~martin/lpc21xx/isp/

Try, better than Phillips boot loader.

Best Regards,

Mukund Deshmukh.
Beta Computronics Pvt Ltd
10/1, IT Park, Parsodi,
Nagpur-440022
Cell - 9422113746
--- In l..., "ispgardner" wrote:
...
> - I need only assembler and loader. I would miss the point to try to
> learn the nuts&bolts of the chip by using C. I'll use assembler to
> write a very simple programs like blinking led or getting data from
> A/D converter and etc. The best is assembler as part of complete IDE,
> but I think it is asking too much.

I agree with Richard, you should use C.
All nuts&bots of the chip can be tightened with C code and if you look
at some of the example code provided by some companies/individuals and
in the file section if this yahoo! group you'll find there are ready to
use include files with all defines for the different peripherals that
are bolted onto the ARM.

You could have a look at
http://www.myvoice.nl/electronics/timing-programs.php
, that page
contains some code that I used to measure timing in the lpc2106 and it's
a simple start when testing your own stuff. The program contains the
lpc2xxx.h file which includes defines for the peripherals that are found
in many of the lpc21xx variants and a make environment based on the gnu
tools with lpc21isp as download tool.
Note: the environment is set to compile (and load) the program into RAM
so there is no need to reprogram the flash every time you want to try
out some code.

You will need the user manuals for the processor you use and the hitex
"The Insider's guide to the ARM7 based microcontrollers" is also a good
book to read.
All can be found from the NXP Semiconductors website (see
http://www.nxp.com/products/microcontrollers/32bit/index.html
).

Regards,

Rob

-- This must be a joke: it's easier the find the ARM book via the NXP
website than the datasheets/usermanuals of the chips [/:)]
>You will need the user manuals for the processor you use and the hitex
>"The Insider's guide to the ARM7 based microcontrollers" is also a good
>book to read.
>All can be found from the NXP Semiconductors website (see
>http://www.nxp.com/products/microcontrollers/32bit/index.html
> ).

The link to the book
http://www.hitex.co.uk/arm/lpc2000book/lpc-ARM-book_srn.pdf
Appears to be dead....

Incidentally, has anyone found a good ARM instruction set reference document?
Just a simple instruction-per-page type of thing, not a tutorial
--- In l..., Mike Harrison wrote:
>
> The link to the book
> http://www.hitex.co.uk/arm/lpc2000book/lpc-ARM-book_srn.pdf
> Appears to be dead....
>

If you start here:

http://www.hitex.co.uk/arm/lpc2000book/index.html

you have several options for obtaining the book, including reading
it online (not great, but at least it's free).

> Incidentally, has anyone found a good ARM instruction set
reference document?
> Just a simple instruction-per-page type of thing, not a tutorial
>

The standard reference is the "ARM ARM", see:

http://www.arm.com/documentation/books/1183.html

I have heard this was available free online at one stage, though I
suspect illegally.

Another good source of info is the PDF document in the ZIP file
gcc_and_ucosii.zip in the Files section of this group, which despite
its name is useful even if you don't use either tool.

If you have all three, it'll be more than enough to keep you
going....
On Sunday 08 October 2006 14:35, Brendan Murphy wrote:
> The standard reference is the "ARM ARM", see:
>
> http://www.arm.com/documentation/books/1183.html
>
> I have heard this was available free online at one stage, though I
> suspect illegally.

It's still available on arm.com, you just have to search a bit. Starting at
arm.com, four clicks to the EULA, which has an "I Agree" button that gets you
to the download link.

It's part of the resources for Connected Community -> ARM University Program,
but seems to be open to anyone.

Regards,

Dominic
--- In l..., "Brendan Murphy"
wrote:
>

> The standard reference is the "ARM ARM", see:
>
> http://www.arm.com/documentation/books/1183.html
>
> I have heard this was available free online at one stage, though I
> suspect illegally.

I counter this opinion, get it free from Altera here (13 MB):
http://www.altera.com/literature/third-party/ddi0100e_arm_arm.pdf

Excellent book, well written on subject of architecture and opcodes!

And get also this:
http://arm.com/documentation/books/4975.html

(Amazon.com $60, complements ARM ARM)

Roger

The 2024 Embedded Online Conference