Yahoo Groups archive

Lpc2000

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

Thread

assembly tutorials

assembly tutorials

2006-02-26 by anish n

Hi, 
 
 i am doing a project on LPC2138, we have to code in assembly.
 could any one please tell me a good assembly tutorial or some sort of
 link for that ?
 is there any linux program to upload the program to lpc2138 ???
 thanks in advance 
 bye
 
				
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[Non-text portions of this message have been removed]

Re: assembly tutorials

2006-02-26 by valdef78

--- In lpc2000@yahoogroups.com, anish n <aanishn@...> wrote:
>
> 
>  Hi, 
>  
>  i am doing a project on LPC2138, we have to code in assembly.
>  could any one please tell me a good assembly tutorial or some sort 
of
>  link for that ?
>  is there any linux program to upload the program to lpc2138 ???
>  thanks in advance 
>  bye


for tools and good infos to work with LPC on Linux, have a look here :
http://rod.info/arm.html

Re: assembly tutorials

2006-02-27 by Eric Engler

>  i am doing a project on LPC2138, we have to code in assembly.
>  could any one please tell me a good assembly tutorial or some sort of
>  link for that ?

The only open source assembler I know of is the GNU "as" assembler
(also called "gas"). This uses the standard GNU syntax, which is a
cross-platform standard used for many target processors, but
unfortunately, it does not use the ARM standard syntax you typically
find with commercial ARM assemblers.
 
If anyone knows of a different open source assembler, please tell me
about it!

Their are a number of good commercial assemblers, but I'd probably
recommend the one that comes with IAR Embedded Workbench. Their free
version has a 32K limited C compiler, but their assembler does not
have a code size limit as I understand it, and their CSPY debugger
works with assembler code, also.

For a tutorial on how to code in assembler for the ARM you can
download the "ARM ARM" (the ARM Architecture Reference manual). I
think you can get this from arm.com, or order a hardcopy from amazon.com.

>  is there any linux program to upload the program to lpc2138 ???

lpc21isp is a fine open source program that can do this. Join this
yahoo group and go to their files section:

http://groups.yahoo.com/group/lpc21isp/

Eric

Re: assembly tutorials

2006-02-27 by Eric Engler

--- In lpc2000@yahoogroups.com, "Eric Engler" <englere.geo@...> wrote:

> The only open source assembler I know of is the GNU "as" assembler
> (also called "gas"). 

I forgot to mention that this is the only assembler I know of that
works on linux. IAR EW may work under WINE, but I don't know for sure.

My only complaint about gas is the syntax. It does work well. We've
discussed the possibility of writing a translator that could take an
ARM standard syntax assembly file and convert it to the gas syntax for
actual assembly. But nobody has expressed a desire to write the
program :-(

Eric

Re: [lpc2000] Re: assembly tutorials

2006-04-02 by clemens fischer

> Eric Engler:

> (open source assembler "gas")
>
> If anyone knows of a different open source assembler, please tell me
> about it!

have a look at

  http://sun.hasenbraten.de/~frank/

and from there it's:

  http://sun.hasenbraten.de/vasm/

this work is copyrighted, but you can download the source. i'd advise to
email the author, though. my experience is that they allow using their
stuff and even keep you posted on things.

> http://groups.yahoo.com/group/lpc21isp/

i regret finding at least two versions of lpc21isp in the files section,
because people don't purge their outdated stuff. makes finding a good
set of tools/examples a cumbersome task.

  clemens

Re: assembly tutorials

2006-04-02 by Eric Engler

--- In lpc2000@yahoogroups.com, clemens fischer <ino-qc@...> wrote:

> > If anyone knows of a different open source assembler, please tell me
> > about it!
> 
> have a look at
> 
>   http://sun.hasenbraten.de/~frank/
> 
> and from there it's:
> 
>   http://sun.hasenbraten.de/vasm/

Looks like a good assembler, but he doesn't support the standard ARM
syntax, either :-(

Eric

Re: assembly tutorials

2006-04-09 by clemens fischer

Eric Engler in <e0pfpc+mdf7@...>:

>  --- In lpc2000@yahoogroups.com, clemens fischer <ino-qc@...> wrote:
> 
> >   http://sun.hasenbraten.de/~frank/
> >   http://sun.hasenbraten.de/vasm/
> 
>  Looks like a good assembler, but he doesn't support the standard ARM
>  syntax, either :-(

could somebody give an informal list of the differences between "gas"
and the ARM assembler? if the source is prepared using macro invocations
there's bound to be a preprocessor that can be told to make either of
them. note that you can use other preprocessors, too. see, for example,
http://www.nothingisreal.com/gpp/ for the "generic preprocessor" (site
unreachable ATM).

  clemens

Please help FIQ interrupte on LPC2138-MT

2006-04-09 by vpat1714vpat

I try to write  the FIQ interrupt program for LPC2138-MT. 
Input EINT1 is used for generate  the
interrupt  with button and pull-up resistor at P0.3.
Output P0.31 is connected to Led.  The simplest  FIQ Handler  is 
written for switching off  Led, when 
the interrupt comes  from EINT1 ( P0.3) , Hex-file and led.elf 
created by CrossWorks v 1.5, all necessary startup and system files 
are connected. The Compiler and Linker does not give any errors  in 
report.
That can be wrong here?      Thanks.

/* Target board  OLIMEX   LPC2138-MT	 */
#include <targets/LPC21xx.h>
void EXTintFIQ (void) __attribute__ ((interrupt("FIQ")));    // 
Declare FIQ ISR
void EXTintFIQ (void)
{
IO0SET 	= 0x80000000;	// Set 1 to LED pin P0.31
EXTINT  = 0x00000002;	// Clear the peripheral interrupt flag
}
int main (void)
{
IO0DIR	= 0x80000000;	// Set the LED pin P0.31 as output
PINSEL0        |= 0x000000C0;	   // Set  P0.3 as  EINT1
VICIntSelect 	= 0x00008000;	   	
VICIntEnable	= 0x00008000;      //Enable a Vic Channel as FIQ
IO0CLR = 0x80000000;	                 //  Led  On
__ARMLIB_enableFIQ();
while(1);           //Loop here forever   
}


     Section _vectors   in output file  led.elf   contain :
         ldr pc, [pc, #fiq_handler_address - . - 8] /* fiq handler */
E59FF014   ldr pc, [pc, #20]
    <fiq_handler_address>:
234        andeq r0, r0, r4, lsr r2
 
      Section _start     contain :
                   orr r1, r0, #0x11 /* FIQ mode */
   	E3801011   orr r1, r0, #0x00000011
                   msr cpsr_cxsf, r1
   	E12FF001   msr cpsr_cxsf, r1
                  ldr sp, =__stack_fiq_end__
   	E59FD150  ldr sp, [pc, #336]
   
    At the beginning of   EXTintFIQ  in output file  led.elf
    located  next operators : 
        E52DC004   str r12, [sp, #-4] !
   	E1A0C00D   mov r12, sp
   	E92DD80C   stmfd sp!, {r2-r3, r11-r12, lr-pc}
   	E24CB004   sub r11, r12, #0x00000004

             User  code  ……..

            And at the end of   EXTintFIQ  :
        E89D680C   ldmfd sp, {r2-r3, r11, sp-lr}
   	E8BD1000   ldmfd sp!, {r12}
   	E25EF004   subs pc, lr, #0x00000004

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.