Yahoo Groups archive

Lpc2000

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

Message

RE: [lpc2000] LPC2294 GCC Start

2004-12-15 by Richard Rauscher

Looks like you just have the addresses of the handlers, rather than
instructions
to load the PC with the address.  Here's a snippet of how mine (working)
looks:

	        .global _startup
	        .func   _startup
	_startup:
	 
	

	# Exception Vectors
	#  Mapped to Address 0.
	#  Absolute addressing mode must be used.
	#  Dummy Handlers are implemented as infinite loops which can be
modified.
	 
	Vectors:    LDR     PC, Reset_Addr
	                LDR     PC, Undef_Addr
	                LDR     PC, SWI_Addr
	                LDR     PC, PAbt_Addr
	                LDR     PC, DAbt_Addr
	                NOP                            /* Reserved
Vector */
	                LDR     PC,[PC,#-0xFF0]
	                LDR     PC, FIQ_Addr
	 
	Reset_Addr:     .word   Reset_Handler
	Undef_Addr:     .word   Undef_Handler
	SWI_Addr:       .word   SWI_Handler
	PAbt_Addr:      .word   PAbt_Handler
	DAbt_Addr:      .word   DAbt_Handler
	                .word   0                      /* Reserved
Address */
	IRQ_Addr:       .word   IRQ_Handler
	FIQ_Addr:       .word   FIQ_Handler
	 

...and the disassembly listing:
 

	FW.elf:     file format elf32-littlearm
	 
	Disassembly of section .text:
	 
	00000000 <_startup>:
	       0:   e59ff018    ldr pc, [pc, #24]   ; 20 <Reset_Addr>
	       4:   e59ff018    ldr pc, [pc, #24]   ; 24 <Undef_Addr>
	       8:   e59ff018    ldr pc, [pc, #24]   ; 28 <SWI_Addr>
	       c:   e59ff018    ldr pc, [pc, #24]   ; 2c <PAbt_Addr>
	      10:   e59ff018    ldr pc, [pc, #24]   ; 30 <DAbt_Addr>
	      14:   e1a00000    nop         (mov r0,r0)
	      18:   e51ffff0    ldr pc, [pc, #-4080]    ; fffff030
<VPB_DIV_ADDR+0x1fe02f30>
	      1c:   e59ff018    ldr pc, [pc, #24]   ; 3c <FIQ_Addr>
	 
	00000020 <Reset_Addr>:
	      20:   000000a0    andeq   r0, r0, r0, lsr #1
	 
	00000024 <Undef_Addr>:
	      24:   00000040    andeq   r0, r0, r0, asr #32
	 
	00000028 <SWI_Addr>:
	      28:   00000050    andeq   r0, r0, r0, asr r0
	 
	0000002c <PAbt_Addr>:
	      2c:   00000060    andeq   r0, r0, r0, rrx
	 
	00000030 <DAbt_Addr>:
	      30:   00000070    andeq   r0, r0, r0, ror r0
	      34:   00000000    andeq   r0, r0, r0
	 
	00000038 <IRQ_Addr>:
	      38:   00000080    andeq   r0, r0, r0, lsl #1
	 
	0000003c <FIQ_Addr>:
	      3c:   00000090    muleq   r0, r0, r0
	

As an aside, this works with both Keil (windows) and gnu (linux) build
environments.
 
hth,
 
--rich

	-----Original Message-----
	From: dimaissaev [mailto:dimaissaev@...] 
	Sent: Wednesday, December 15, 2004 1:44 AM
	To: lpc2000@yahoogroups.com
	Subject: [lpc2000] LPC2294 GCC Start
	
	
	
	Hello.
	
	I have found that if I (with Philips Utility) say "go from
addres 
	0x50"
	
	/*
	.text          0x00000000      0x10c crt0.o
	                0x000000ec                reset
	                0x00000000                _boot
	                0x00000050                _mainCRTStartup
	                0x000000ec                abort
	                0x00000050                _start
	                0x000000ec                _reset
	                0x000000ec                exit
	                0x00000050                start
	*/
	
	everything ok. What the EC address? What that mean?
	
	(I'm use "WinARM")
	Why "go from 0x00 don't work"?
	
	
	
	
	
Yahoo! Groups Sponsor	
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=129a1p115/M=294855.5468653.6549235.3001176/
D=groups/S=1706554205:HM/EXP=1103190260/A=2455397/R=0/SIG=119u9qmi7/*htt
p://smallbusiness.yahoo.com/domains/> 	
 
<http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=group
s/S=:HM/A=2455397/rand=642678086> 	

	
________________________________

	Yahoo! Groups Links
	

	*	To visit your group on the web, go to:
		http://groups.yahoo.com/group/lpc2000/
		  
	*	To unsubscribe from this group, send an email to:
		lpc2000-unsubscribe@yahoogroups.com
<mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
		  
	*	Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service <http://docs.yahoo.com/info/terms/> . 




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

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.