Hi,
I am very new to embedded linux. I have a pxa255 based board and I am planning to put linux on it. To start with I am writing a small program by which I can just toggle the LED. Below is snapshot for assembly program which ON the LED.
.text /*Executable code follows*/ _start: .global _start /* "_start" is required by the linkera*/ .global main /* "main" is our main program */ b main /* Start running the main program */ /* Insert your code here */
MAIN: MOV R1, #0x40000000 /* GPDR0 for configuring the PIN 10 as output*/ ADD R1,R1, #0x00E00000 ADD R1,R1, #0x0000000C
/*MOV R5, #0x3B9AC9FF*/
MOV R2, #0B01000000000 STR R2,[R1] /* Pin 10 now configured as Output*/
LOOP: MOV R0,#0 MOV R6, #0x40000000 /* Register6 with a large value stored*/
MOV R1,#0x40000000 /* Address of GPSR0 - set register*/ ADD R1,R1, #0x00E00000 ADD R1,R1, #0x00000018
MOV R2, #0B01000000000 /* Set the 10th bit */
STR R2,[R1] /* LED shall turn ON here*/
BAL LOOP /* mov pc,lr need to see what it is ??? Return to the caller*/ .end
It's not working. Seems I missing lots of things here. First thing which comes is how to write linker file for it. Can someone please guide me or give me pointer so that I can study it. I have found few sample linker files from Linux kernel code also and trying to figure out how to write them.
Please also let me know where else I am missing so that I can work in that direction.
Any kind of help or pointers will be really helpful.
Regards Chads