building problems

Poletti Francesco fpoletti at libero.it
Mon Nov 11 17:19:12 UTC 2002


Hy, I have this kind of problem. I'm trying to make the porting of rtems for a 
arm7 architecture, I have a simulator. 

This is my .cfg file

> 	$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).obj \
> 	    $(LINK_OBJS) $(LINK_LIBS)
> 	$(NM) -g -n $(basename $@).obj > $(basename $@).num
> 	$(SIZE) $(basename $@).obj
> 	$(OBJCOPY) -O binary \
>            $(basename $@).obj $(basename $@).bin
> 	arm-rtems-objdump -d $(basename $@).obj > $(basename $@).as
> 	arm-rtems-objdump -x $(basename $@).obj > $(basename $@).x
> 	cp $(basename $@).bin  $(basename $@).exe
> endef
>

This is a piece of my bsp_start_default:

>void bsp_start_default( void )
>{ unsigned long c = "b";
>   *((volatile unsigned long*) SWARM_UART0_TXBASE) = (unsigned long )(c);
>   

After building rtems I have:

>000089c4 <bsp_start_default>:
>     89c4:       e1a0c00d        mov     ip, sp
>     89c8:       e92ddcf0        stmdb   sp!, {r4, r5, r6, r7, sl, fp, ip,
> lr, pc}
>     89cc:       e3a03209        mov     r3, #-1879048192        ;
> 0x90000000 89d0:       e59fa108        ldr     sl, [pc, #264]  ; 8ae0
> <bsp_start_default+0x11c>
>     89d4:       e59f7108        ldr     r7, [pc, #264]  ; 8ae4
> <bsp_start_default+0x120>
>     89d8:       e2832a81        add     r2, r3, #528384 ; 0x81000
>     89dc:       e59f3104        ldr     r3, [pc, #260]  ; 8ae8
> <bsp_start_default+0x124>
>     89e0:       e59f4104        ldr     r4, [pc, #260]  ; 8aec
> <bsp_start_default+0x128>
>     89e4:       e5975000        ldr     r5, [r7]
>     89e8:       e59a6000        ldr     r6, [sl]
>     89ec:       e59f10fc        ldr     r1, [pc, #252]  ; 8af0
> <bsp_start_default+0x12c>
>     89f0:       e5823000        str     r3, [r2]
>
>     8ae8:       00030390        muleq   r3, r0, r3
>

I dont understand why when I went to write in the uart the assembler commands 
is str r3,[r2] ; the r2 register have the right address but in the r3 
register I found the value of the address where there is the "b" char. I 
think that isn't good, but what is wrong? Probably the compilation options 
but why? 





More information about the users mailing list