We are working on a project that needs use of assembly language, to develop 
low-level programs for Openmoko. However, I am facing a problem while using 
assembly.

When I write a very simple program (that just exits the program on arm 
architecture):


..section .text
..globl _start

_start:
SWI 0x11

and compile it using GNU Assembler, provided with the toolchain for Openmoko. 
It just compiles fine, and then it is also linked and run fine using the 
Openmoko Toolchain. As shown below:


[r...@dhcppc7 arm]# arm-angstrom-linux-gnueabi-as test.S -o test.obj
[r...@dhcppc7 arm]# arm-angstrom-linux-gnueabi-ld test.obj -o test
[r...@dhcppc7 arm]# arm-angstrom-linux-gnueabi-run test

It works fine. (I have also tried it to print text on screen it also works fine 
when using arm-angstrom-linux-gnueabi-run simulator, but never works when sent 
to Openmoko)

However, when I copy this compiled file test to Openmoko and run it there it 
gives this error:


r...@om-gta02:/usr/src/assembly# ./test
Illegal instruction


The exact statement at which the error occurs is:

SWI 0x11

and the error is same for all numbers given after SWI except for 0x0.

However, I have written and tried programs that does not use any software 
interrupts and they work just fine.

Please help me how can I use software interrupts, It would be of great help in 
our project.

Regards,
Waqar Ali
Research Engineer,
Next Generation Intelligent Networks Research Center (NexGin RC)



      
_______________________________________________
hardware mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/hardware

Reply via email to